Linux Resources
- Home
- Linux Resources
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.
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
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
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.
This article covers how to list users in Linux system and also differentiate difference between normal user and system user. Linux OS is unique because of its multi-user characteristic allowing multiple users on one system, at the same time. However, tracking all users is essential. The /etc/passwd file contains one line for each Linux user account, with seven fields delimited by colons. This is a text file. You can easily list users under Linux using the cat command or other commands such as grep command / egrep command and more. With this same approach, you can use the Linux commands to list all users on all Linux operating system, including Ubuntu, Debian, RHEL, Arch, Fedora, CentOS, and other distros.
To list all users on Linux, use the cat command as follows:
$ cat /etc/passwd
This article covers how to get CentOS version using different methods. There are several ways on how to check what version of CentOS is running on your system. The simplest way to check for the CentOS version number is to execute the cat /etc/centos-release command. Identifying the accurate CentOS version may be required to help you or your support team to troubleshoot your CentOS system.
Different commands to check CentOS version: