×


Search For:


10 Most Useful Ubuntu Linux Commands

This article covers some useful Linux commands to help you get started with working efficiently with Linux system. When operating a Linux OS, you need to use a shell — an interface that gives you access to the operating system’s services. Most Linux distributions use a graphic user interface (GUI) as their shell, mainly to provide ease of use for their users.

That being said, it's recommended to use a command-line interface (CLI) because it’s more powerful and effective. Tasks that require a multi-step process through GUI can be done in a matter of seconds by typing commands into the CLI.


How to use the cd command in Linux ?

To navigate through the Linux files and directories, use the cd command. It requires either the full path or the name of the directory, depending on the current working directory that you're in.

There are some shortcuts to help you navigate quickly:

  • cd .. (with two dots) to move one directory up.
  • cd to go straight to the home folder.
  • cd- (with a hyphen) to move to your previous directory.


How does the ls command works ?

The ls command is used to view the contents of a directory. By default, this command will display the contents of your current working directory.

There are variations you can use with the ls command:

  • ls -R will list all the files in the sub-directories as well.
  • ls -a will show the hidden files.
  • ls -al will list the files and directories with detailed information like the permissions, size, owner, etc.


Install Nginx on CentOS 8 - Best Method ?

This article covers how to install the Nginx server on a CentOS machine and add a firewall rule to allow traffic coming towards the Nginx server. Also, we've discussed how to remove Nginx from CentOS.

The Nginx is a free, open source, lightweight and high-performance web server designed for high-traffic use cases. It is also acting as a popular Web server behind the Apache Web server and Microsoft's IIS. Nginx is more resource-friendly than Apache. It can be served in front of other web servers as a reverse proxy.


How to Install Nginx Web Server ?

1. Install the nginx package with:

$ sudo dnf install nginx

2. After the installation is finished, run the following commands to enable and start the server:

$ sudo systemctl enable nginx
$ sudo systemctl start nginx

This will make Nginx start at system boot.


Send Processes to the Background in Debian 10 - Best Method ?

This article covers the best method to send processes to the background in your Linux system. This is helpful, if you have started a command on terminal and that command is taking to much time. Now you want to move that in background, so that you can continue with other tasks.


To list all jobs running in background use jobs command. It will show all running commands with their job id:

$ jobs


How to Place a Running Foreground Process into the Background in Linux ?

A foreground process is the a process. In order to place a foreground process into the background, we must first put the process to sleep, and then place it in the background.

Execute the command to run your process.

Press CTRL+Z to put the process into sleep.

Run the bg command to wake the process and run it in the background.


Install Java on CentOS 7 System - Best Method ?

This article covers how to install and manage multiple Java versions on CentOS 7 system. At the end you also learned how to set default Java version. Java is used for developing anything from lightweight mobile to desktop applications.


How to Install Java 8 on CentOS ?

1. Update the system before installing any new programs:

$ yum -y update

2. Install Java 8:

$ yum install java-1.8.0-openjdk

3. Verify Java is Installed

$ java -version


Set Up UFW Firewall on Ubuntu 18.04 - Best Method ?

This article covers how to set up UFW on Ubuntu 18.04 system. It advised to deny all the incoming connections except necessary ports. Uncomplicated Firewall or UFW is an interface to iptables that is designed to simplify the process of configuring a firewall. While iptables is a firm and flexible tool, it can be sometimes tricky for beginners to learn how to use it to properly configure a firewall. If a user is looking to get started securing his or her network, UFW may be the appropriate solution.


UFW is installed on Ubuntu by default. If it has been uninstalled for some reason, we can install it with the following command:

$ sudo apt install ufw

By default, UFW denies all incoming connections and allows all outgoing connections. It means that a client trying to reach our server would not be able to connect. When an application from our server tries to connect any other server outside, it will be allowed. The following commands serve the purpose:

$ sudo ufw default deny incoming
$ sudo ufw default allow outgoing


Modify User Password in Linux - Best method ?

This article covers how to change own and another user account passwords. It's recommended that to change your password frequently and use a unique password for each account for security purpose. Basically, you will learn how to change a password on any Linux distribution, including Ubuntu, Debian, and CentOs.

To change a password on behalf of a user, first sign on or "su" to the "root" account. Then type, ``passwd user'' (where user is the username for the password you are changing). The system will prompt you to enter a password. Passwords do not echo to the screen when you enter them.

You can also change your own password, by typing ``passwd'' (without specifying a username). You will be prompted to enter your old password for verification, and then a new password.


How to Change a Password in Linux?

To change the password in Linux you need to open the terminal and type the following command:

$ sudo passwd

After executing the command, you will be asked to enter the new password twice.