Ubuntu's Articles

Ubuntu is a free and open-source Linux distribution based on Debian. Ubuntu is officially released in three editions: Desktop, Server, and Core for the internet of things devices and robots. All the editions can run on the computer alone, or in a virtual machine.

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.
How to Install VMware Workstation Player in Ubuntu
VMware Workstation Player is the desktop application that allows you to run second, operating system on your PC. VMware Workstation Player is free for personal and non-commercial use. However VMware Workstation Pro is available which provides full functionality. VMware Workstation Player is available for both OS, Windows and Linux. This article guide you to how to install VMware Workstation Player in Linux OS. Bellow is recommended requirement to install VMware Workstation Player. So, if you have belllow minimum hardwares in your system, you are ready to install VMware Workstation Player.  Hardware Requirement 1.3GHz or faster core speed 2GB RAM minimum/ 4GB RAM or more recommended Follow the bellow steps to download and install VMware Workstation Player Click here on the belllow link of all VMware products. Now scroll down to the product VMware Workstation Player and click to the download button. Now click download VMware Workstation for Linux 64-bit. It will download latest version of VMware Workstation Player, e.g., VMware-Player-15.5.0-14665864.x86_64.bundle. Open Terminal and go through the downloaded file folder and set permission to execuete file. sudo chmod +x ~/Downloads/VMware-Player-15.5.0-14665864.x86_64.bundle And run the installer file. sudo ~/Downloads/VMware-Player-15.5.0-14665864.x86_64.bundle That's it. It will run configuration and install VMware Workstation Player in your system. Now press Window key and search for VMWare and open it. It will ask to accept terms and conditions. Then it will ask for update and then insert key. And it will open Vmware Workstation home. Now you can download OS installer .iso file and install it as your secondary OS. Click this link to configure and install new OS in VMware Workstation Player.
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.
Jupyter Notebook installation in Ubuntu
In this article, we will share with you how to install Jupyter notebook with python 3 in ubuntu and how to run it and write the first python 3 examples in Jupyter notebook. Jupyter notebook is a most famous wen base editor for running your python code example. it is very easy to use for every python beginner developer. Here I will install Jupyter notebook with python 3. so, you first should install python 3 in your ubuntu system. how to install python 3 in your ubuntu system? just click on the below link and you can be done it. Now, we will install the Jupyter notebook. just follow the below step. Step - 1 Install IPython shell First, we need to install IPython shell help of run the following command in your terminal. sudo apt install ipython3 Step - 2 Install Jupyter Now, we install Jupyter in our ubuntu system help of the following command in terminal. pip3 install jupyter After done this Jupyter installation process then we should add the execution path. export PATH=$PATH:~/.local/bin/ Step - 3 Run Jupyter Now, all process is done and now we run the Jupyter notebook and how to write first python simple code and how to run it in Jupyter notebook. just run the following command on your project root directory. jupyter notebook After hitting this command in terminal then your Jupyter notebook by default open http://localhost:8888 port. Look, how to look like the Jupyter notebook landing page and how to create the first python program with python 3? just see the following screenshot. After click on the python 3 then open a new window and it looks like this. then you can able to write any Python code and it will be executed by hit Shift + Enter I hope it will help you. Thanks.
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.