Ubuntu's Tags

Choosing the right Linux distribution for your VPS
VPS hosting services are the perfect alternatives of dedicated hosting. Many enterprises leverage VPS hosting to scale their websites and applications. If you're considering setting up a Virtual Private Server (VPS) for your website or application, one of the first decisions you'll need to make is which Linux distribution (operating systems) to use. With so many options available, it can be overwhelming to choose the right one for your needs. In this blog post, we'll explore the most popular Linux distributions for Linux VPS hosting and help you make an informed decision. Let's dive deeper into understanding what a Linux distribution is. A distribution, or "distro" for short, is a collection of software that's built on top of the Linux kernel. Each distro has its own set of features, tools, and configurations that make it unique. Some distros are designed for specific use cases, such as servers, desktops, or embedded systems, while others are more general-purpose. When it comes to VPS hosting, there are a few factors to consider when choosing a Linux distribution: Security: Talking about one of the prominent advantages of linux VPS hosting, the security of your VPS is critical, especially if you're storing sensitive data or processing payments. With MilesWeb’s Linux VPS hosting, users will get top-notch security in the form of SSL certificates (to secure domain’s information) and managed support to monitor server resources. Here is a table given below to highlight its competitive features and pricing. Performance: VPS hosting is all about performance, so you'll want a distro that's optimized for speed and efficiency. MilesWeb’s VPS hosting offers 99.95% uptime with minimal latency.  Ease of use: While Linux has a reputation for being complex, some distros are more user-friendly than others. If you're new to Linux, you may want to choose a distro that has a more intuitive interface. In fact, MilesWeb’s VPS servers include cPanel and Plesk control panels that makes it easier for users to manage their domains.  Support: If you run into issues with your VPS, you'll want to be able to get help quickly. Choosing a distro with human technical support options can help ensure that you have assistance with the issues you are facing. With those factors in mind, let's take a closer look at some of the most popular Linux distributions for VPS hosting: Ubuntu Ubuntu is one of the most popular Linux distros out there, and for a good reason. It's user-friendly, well-supported, and has a large community of users and developers. Ubuntu releases new versions every six months, which means you'll always have access to the latest security updates and features. Additionally, Ubuntu is based on Debian, another popular Linux distribution, so it benefits from the extensive testing and development that goes into that distro. One potential downside of Ubuntu is that it can be resource-intensive, which may impact performance on smaller VPS instances. However, Ubuntu also offers a lightweight version called Ubuntu Server, which is optimized for servers and can run on lower-end hardware. Debian Debian is one of the oldest and most stable Linux distributions available. It's known for its robust security features and long-term support, making it a popular choice for servers and other mission-critical applications.Debian is focused on stability, therefore it may not always have the latest features or packages available, which may be a concern if you need bleeding-edge software. A potential downside of Debian is that it can be less user-friendly than some other distros. If you're new to Linux or don't have much experience with command-line interfaces, you may find Debian to be challenging to work with. CentOS CentOS is a community-driven Linux distribution that's based on Red Hat Enterprise Linux (RHEL). It's designed to be stable and secure, with a focus on enterprise-level features and support. Because CentOS is based on RHEL, it benefits from the extensive testing and development that goes into that commercial distribution. Additionally, CentOS offers a minimal install option that's optimized for servers and can run on lower-end hardware. Conclusion Choosing the right Linux distribution for your VPS hosting depends on a number of factors, including security, performance, ease of use, and support. Ubuntu, Debian, CentOS, Fedora, and Arch Linux are all popular choices that offer different benefits and trade-offs. Ultimately, the best distro for you will depend on your specific needs and preferences. When choosing Linux distribution, it's important to do your research and consider your options carefully. Look for a distro that's well-maintained, has a large community or commercial support options, and is optimized for the specific use case of VPS hosting. By researching well for choosing the right Linux distribution for your VPS, you can ensure that you have a secure, fast, and reliable platform for your website or application.
How to Install Latest Version of Nodejs in Ubuntu
Node js is one of the most popular programming languages in the IT industry. Here we will share with you how to install node js latest version in ubuntu 16.04 with example. First, you make sure the node is installing in your ubuntu system or not? check this running by the following command. node -v // or nodejs -v If you did not find a node in your ubuntu server then you can now install node js in your server help of the following command. here we will share with you how to install all node js version by running the command in your terminal. Install node v12 (Current version): sudo apt-get update curl -sL | sudo -E bash - sudo apt-get install -y nodejs Install node v10 LTS (For new users: install this one): sudo apt-get update curl -sL | sudo -E bash - sudo apt-get install -y nodejs Install node v8 (Old version): sudo apt-get update curl -sL | sudo -E bash - sudo apt-get install -y nodejs Install node v6 (Old version): sudo apt-get update curl -sL | sudo -E bash - sudo apt-get install -y nodejs After installing nodejs in your ubuntu system then if you want to uninstall nodejs from the server then run the following commanat in your terminal. Uninstall / Remove Nodejs sudo apt-get purge nodejs it is only removing node related packages i.e. relevant packages, nothing more. On the other hand, when you do: sudo apt-get purge --auto-remove nodejs it is necessarily doing: sudo apt-get purge nodejs sudo apt-get autoremove Conclusion As you can see, nodejs installing and uninstalling is very easy process We hope that small tutorials help everyone. Thanks.
How To Check and Increase Swap Space in Ubuntu
A computer has limited amount of physical memory, So when your computer run out of physical RAM, then computer need more space, where inactive data is stored in virtual memory on disk. Swap space or Swap memory is the virtual memory(RAM) on Hard disk. Swap space is useful when applications that aren't being used can be stored on disk until they are used. While Swap space is not in memory use, it is also used as Disk space. Swap space is useful in adding more RAM, it should be noted that reading memory from disk is slower than reading memory from RAM. So if you need more RAM, best option is to increase RAM in the system, but if you plans to add more RAM later, then you can add more Swap space. Check Swap space To add the Swap space, first you need to check how much Swap space is already in the system. Generally there are half of the RAM, Swap space is needed. Run the following command in the Terminal window to check current Swap space in the system. sudo swapon -s If you already have Swap sapce, then you will get bellow output otherwise you only get headings: Filename                Type        Size    Used    Priority /dev/sda5               partition    999420    0        -2 Or run the bellow command to get in more details. sudo free -h And you will see information similar to bellow details:               total        used        free      shared  buff/cache   available Mem:           7.7G        2.9G        2.9G        535M        1.9G        3.9G Swap:          975M          0B        975M Add more Swap space Currently there is no Swap space available in my ubuntu system. Suppose now I want to create 1GB of Swap space in the system. There are generally 2 methods to create Swap space. 1. Using fdisk command First turn off Swap partition if it will be in use. sudo swapoff -a Now we need to create new partition on Disk. I will create Swap space on sda drive. Run the bellow command and it will enter to disk partition menu to create new partition. sudo fdisk /dev/sda Press n to create new partition. Now you will asked to enter first cylinder value. Press enter to use default value or enter first cylinder value and then hit enter. Now enter last cylinder value. You can use any format to enter Cylinder value, for example 1000M or 1GB of space. This is the disk we are using for Swap space, so type 1GB and hit enter. We have created disk partition, now we are changing type of partition. For that type t and it will ask number for the disk partiotion, which is in most cases it will be 5. Now type partititon type id, for us 82 id is for Linux swap / Solaris. Type L to get all partition type id. So type 82 and it will change disk partition to Linux swap / Solaris. Now type w to save and exit. Now you are back to the command line. We have successfully created disk partition. Now we need to modify  /etc/fstab to mount new Swap space. First check if you have created right disk partition sudo fdisk -l Run the mkswap command with partition disk sudo mkswap /dev/sda5 Now modify /etc/fstab file and add new partition in the list using Vim or Nano Editor. It will make new partition permanent. sudo nano /etc/fstab Add bellow lines. /dev/sda5             swap            swap            default          0   0 In the last, run this command and activate Swap space. sudo swapon /dev/sda5 Now reboot the system and all changes are takes effective. 2. Using fallocate command This is the easy and fast method than the above method. First create swap file sudo fallocate -l 1GB /swapfile If fallocate fails or it not available, you can also use dd: sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576 Now change the file permission by running chmod command sudo chmod 600 /swapfile Create Swap space in the system sudo mkswap /swapfile Activate new Swap space sudo swapon /swapfile Now modify /etc/fstab file and add new partition in the list using Vim or Nano Editor. sudo nano /etc/fstab And add the following lines at the end of file. /swapfile   none swap    sw 0 0 Verify the Swap space sudo free -h That's it, it will create 1GB of swap space. Conclusion So, this way you can check and add new Swap space. I hope this article helped you.
Install a new Operating System in VMware Workstation Player
VMware Workstation Player is the desktop virtual box application which runs in Linux and Windows operating system. You can create and run new Linux and Windows operating system. In the last article, we have discussed on how to install VMware Workstation Player in Ubuntu. Click here if you are looking for How to install VMware Workstation Player in Ubuntu. In this article, we will discuss on how to install guest operating system on fresh installed VMware Workstation Player. You will also need OS installer disk image file. Download latest Windows 10 Disk image file or Linux Ubuntu file from here. We will install Ubuntu 19.10 as guest operating system on the top of the Ubuntu 16.04 LTS. First open VMware Workstation Player, you will see bellow screen. Now click on Create a New Virtual Machine or press shortcut CTRL+N or go through menu File > Create a New Virtual Machine. It will open New Virtual Machine Wizard box. We will use Disk image file to install operating system. So click Use ISO Image radio and browse through guest operating system disk image file and then click next button. You can also use Physical drive to install Operating system. Now it will ask for username and password. Input username and password and click Next button. Browse the operating system installation location and click Next button. Select disk capacity for guest operating system. For Ubuntu, minimum space required is 20 GB. Last click on Finish button and wait for process complete. That's it. New operating system is installed. Now click Open a Virtual Machine or press shortcut key CTRL+O and select virtual machine that you want to start. It will boot operating system. This way, you can install new guest operating system in VMWare Workstation Player and run multiple operating system. I hope this article will help you to run secondary operating system.
Install and configure WordPress in Ubuntu
Wordpress is the most popular open-source CMS framework for website building. Wordpress runs on the top of the PHP language and uses MySQL or MariaDB as database. Wordpress is easy to run blogging or cart websites and it does not need costly server. Also it does not need heavy programming knowledge to run Wordpress project and it is open-source CMS web framework. Thats is why Wordpress is most popular in running websites. There are many ways to install and run Wordpress project. In this article, We will download Wordpress project from the official site and configure as this is the easy way to install and configure ubuntu. Prerequisites You need to be logged in as non-root user with sudo permission. You should already installed LAMP stack installed in your server. Download and install Wordpress After installing LAMP stack, first of all, download latest Wordpress project compressed tar file. For that, go to the apache2 root folder. cd /var/www/html Download latest version of Wordpress project compressed file. wget -c Extract project folder, Now your project is ready to run. tar -xzvf latest.tar.gz Give necessary permission for project sudo chown -R www-data:www-data /var/www/html/wordpress Create MySQL database You have downloaded Wordpress project, now you will need to create and setup database. So first, login to MySQL command line shell. mysql -u root -p Type password and you will redirect to MySQL command line shell. Create database using bellow command. CREATE DATABASE wordpress_database; Create new user and grant permission to database GRANT ALL PRIVILEGES ON wordpress_database.* TO 'wordpress_username_here'@'localhost' IDENTIFIED BY 'wordpress_password'; And flush privileges FLUSH PRIVILEGES; Last exit MySQL command line. EXIT; Setup and run Wordpress project Now you have also created database. In the last, setup Wordpress project and run in the browser. First go to the project root directory and copy or rename wp-config-sample.php file to wp-config.php file. sudo cp wp-config-sample.php wp-config.php Then open wp-config.php file and change database credentials to yours one. /** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress_database' ); /** MySQL database username */ define( 'DB_USER', 'wordpress_username_here' ); /** MySQL database password */ define( 'DB_PASSWORD', 'wordpress_password' ); And run your website address in browser and you will get bellow screen Wordpress setup wizard. Just run through setup wizard. First select language.   Input admin details. Thats it. Your Wordpress website is configured and now you can login to your Wordpress admin panel and setup website. Conclusion This way, you can simply run Wordpress website. I hope this will help you to setup new Wordpress website.  
How To Install the Django Web Framework on Ubuntu
Django is one of the best and very popular web application framework of Python. in this article we will share with you how to install Django in your ubuntu system and how to run your first python web application in a web browser. Django provides us hight security in web application and it also provides many ready-made helper it's can help us to build web applications very fast. This article will help you to install Django in ubuntu OS and how to run your first python web application in your web browser. Before installing Django you should install python, the following link helps you in install python. Step - 1 Install python and PIP Ubuntu 16.04 have installed python 2 by default. but we need to python 3. so, first wee need to install python 3 in our ubuntu system. run the following command in your terminal to install pip. sudo apt-get install python3 python3-pip The installed Python version is: python3 -V Python 3.5.3 The installed PIP version is: pip3 -V pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5) Step - 2 Install Django Django is open-source and is also available on GitHub you can download from there using pip and install Django in your ubuntu system. in this article I use pip3 for the installation of Django in ubuntu. run the following command in the terminal. pip3 install Django Check version: django-admin --version 2.2.6 Step - 3 Create a Django Application Now, we will show how to create our first Django application in our ubuntu system. the django-admin command provides us to create one new fresh django application. you can create an application anywhere in your system directory. just go to your right path and run the following command in terminal. cd /var/www django-admin startproject first_django_app After, create your first Django the application then we should run the default migration help of the following command in your terminal. cd first_django_app python3 migrate Step - 4 Create a Super Admin Now, we need to create one SuperUser / Admin for the administration of the Django web application. run the following command on your project root directory for creating SuperUser / Admin. python3 createsuperuser Step - 5 Run Django Application Now, your Django application ready to run and use. by default Django not allow any external hosts to access or run Django application in a web browser. so first we add some hosts in first_django_app/ a file. just change the following code line and add hosts that use to run the Django application. I mostly use localhost to run any web application. so, I will add my localhost host in a file. # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['' , 'localhost'] look above changes I added my two hosts there. so I will able to run my Django web application on both hosts and localhost. now run the following command for run the Django web application in our web browser. python3 runserver //Or python3 runserver localhost:8000 After, hit above command in your terminal then now open http://localhost:8000 URL in your browser to run the Django application. after a run, it looks like the following screenshot. Step - 6 Open The Admin Django's By default admin route is /admin. http://localhost:8000/admin Then enter your username and password there. which we created in Step - 4. after login as a SuperUser the screen looks like. We hope you like this article.
John the Ripper Installation and Crack Password
John the Ripper is a free, most popular and open-source password cracking tool developed by Openwall. It was first developed for Unix operating system and now runs many operating systems including Unix, macOS, Windows, DOS, Linux, and OpenVMS. Its main purpose is to detact weak Passwords. John the Ripper uses several cracking modes that crack hashed password. You can also use custom cracking mode using in-built compiler. John the Ripper uses dictionary attack and brute force attacks to crack the password. In this article we will install John the Ripper software and use some useful commands to crack password. Prerequisite We assume you have already knows about Linux system and about Terminal and command line. We akso assume you have some basic knowledge about cracking, encryption and decryption of password. Installation There are many ways to install JohnTheRipper. Here we will use some of the easy ways to install. The easiest way to install JohnTheRipper is directly from command line. For that open Terminal by pressing shortcut CTRL+ALT+T and run the bellow command. sudo apt install john Now type john in Terminal and you will see bellow message. Run the test mode john --test Or you can also download from Github and build. First let's build John the Ripper. Run the following command one bye one. First install required tools for the installation. sudo apt-get install build-essential libssl-dev Also install recommended software. sudo apt-get install yasm libgmp-dev libpcap-dev libnss3-dev libkrb5-dev pkg-config libbz2-dev zlib1g-dev Change working dirctory to ~/src folder. cd ~/src Download latest version of JohnTheRipper from GitHub. git clone git:// -b bleeding-jumbo john Go to project dirctory. cd ~/src/john/src And build from code. ./configure && make -s clean && make -sj4 Test the installed build. ../run/john --test Crack Ubuntu Password Linux saves its password in /etc/shadow file. So run bellow command to get User password. This will take time depends on your system configuration and password strength. sudo john /etc/shadow If it successfully cracks password, then it will return with following response. laravelcode@MyPC:~/src/john/src$ sudo john /etc/shadow Created directory: /root/.john Loaded 1 password hash (crypt, generic crypt(3) [?/64]) Press 'q' or Ctrl-C to abort, almost any other key for status 123456           (laravelcode) 1g 0:00:00:22 100% 2/3 0.04476g/s 135.6p/s 135.6c/s 135.6C/s 123456..pepper Use the "--show" option to display all of the cracked passwords reliably Session completed   Crack hashed password One use of John The Ripper is to decrypt the hashed password. For the simplicity, we used simple password. First create password.txt file and put user and hashed password in user:password format. And run the command: john password.txt If password is successfully cracked, then it will get bellow response: Loaded 1 password hash (bcrypt [Blowfish 32/64 X2]) Press 'q' or Ctrl-C to abort, almost any other key for status 123456           (laravelcode) 1g 0:00:00:54 100% 2/3 0.01847g/s 15.59p/s 15.59c/s 15.59C/s 123456..12345 Use the "--show" option to display all of the cracked passwords reliably Session completed You can also choose specific encryption method with --format option: john -format=raw-md5 password.txt Or use specific wordlist file with --wordlist option: john --wordlist=wordlist.lst password.txt Pass --show argument to get cracked password. john password.txt --show The password is also saved to ~/.john/john.pot file. Crack password protected zip/rar file The other example we use is to crack password protected zip/rar file. There is 2 executable file at location john/run/zip2john and john/run/rar2john in John the Ripper programme. To crack the password protected zip file, execute zip2john file with 2 argument as bellow: ./zip2john ../ ../saved-file.txt The first ../ is the location of the password protected zip file and ../saved-file.txt is the file where password will be saved. Similarly for rar file, use ./rar2john command to crack password for rar file. After getting password at saved-file.txt file, crack hashed password with bellow command. john –format=zip/rar saved-file.txt And you will get cracked password. Conclusion In the last, I will only tell that this is just basic example of cracking password. There are many ways to crack password using many software. Try to search more ways and more software searching from internet.  
How to Install and Configure MongoDB on Ubuntu
In this article, we will share with you how to install MongoDB in ubuntu. MongoDB is one of the open-source database and currently most used in modern web applications for high performance. MongoDB is JSON based database you can use MongoDB in most off programing language but it mostly uses with nodejs. We are here show you all installation process step by step so, please follow this step and easily configure and install MongoDB in your local system. Step - 1 : Adding the MongoDB Repository Before installing MongoDB you should install these repositories for a new updated version, in ubuntu is already included. simply run following command in your Ubuntu terminal. sudo apt-key adv --keyserver hkp:// --recv EA312927 After running this command you make sure you get the following output in the terminal. Executing: /tmp/tmp.3JTuFvsumc/ --keyserver hkp:// --recv EA312927 gpg: requesting key EA312927 from hkp server gpg: key EA312927: public key "Totally Legit Signing Key <>" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) Now run following command. sudo apt-get update Step - 2 : Installing and Verifying MongoDB Now, run the following command to install MongoDB. sudo apt-get install -y mongodb-org OR sudo apt-get install mongodb This command will install the latest several packages for MongoDB. After doing this process then go this directory root /etc/systemd/system/ and run the following command. sudo nano /etc/systemd/system/mongodb.service When you run this command then mongodb.service file open in ubuntu's nano editor and you show output looks like this. [Unit] Description=High-performance, schema-free document-oriented database [Service] User=mongodb ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf [Install] Next, start the newly created service with systemctl. sudo systemctl start mongodb After running this command then check systemctl status this started properly or not using the following command. sudo systemctl status mongodb Then check your output look like this. ● mongodb.service - An object/document-oriented database Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2019-12-16 12:25:28 IST; 4min 4s ago Docs: man:mongod(1) Main PID: 13931 (mongod) CGroup: /system.slice/mongodb.service └─13931 /usr/bin/mongod --config /etc/mongodb.conf Dec 16 12:25:28 dell-Vostro-15-3568 systemd[1]: Started An object/document-oriented database. Dec 16 12:29:21 dell-Vostro-15-3568 systemd[1]: Started An object/document-oriented database. Now check your MongoDB is installed successfully or not. so, simple check MongoDB version run by the following command. mongod --version After running this command you show something that look like the output in your terminal. db version v2.6.10 2019-12-16T12:31:13.714+0530 git version: nogitversion 2019-12-16T12:31:13.714+0530 OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016 Conclusion You can see Install the MongoDB in Ubuntu is very easy. You can check I hope you will like this article.