Anna

How to Change User Name in Linux

How to Change Username in Linux?

The existing username in Linux can be changed with the help of the built-in “usermod” command that also changes the user’s home directory.

rm rf Linux Command Explained

rm -rf Linux Command | Explained

The “rm -rf” command in Linux is the combination of “-r” and the “-f” options that deletes the specified directory “recursively” and “forcefully”.

ls-ltr Command in Linux Explained

ls-ltr Command in Linux | Explained

The “ls -ltr” lists the content of the specified directory in a (-l)long list format (-r)reversely which is sorted by its last modification date and time(-t).

Whereis Command in Linux Explained

whereis Command in Linux | Explained

Linux offers a pre-installed “whereis” command that retrieves the location of the binary, source code, and manual page files of the specified command.

How to Use Who Command in Linux

who Command in Linux | Explained

In Linux, the “who” is the pre-installed command line utility that provides currently logged-in users along with their additional login information.

How to echo Shell Commands

How to echo Shell Commands?

Linux bash scripting uses the “set -x” and “set -v” commands to echo the defined set of shell commands placed in it at any point.

How to Stop Docker in Linux

How to Stop Docker in Linux?

To stop the Docker under Linux, utilize the “systemctl” and “service” command line manager with the “stop” utility. Follow the detailed procedure here

Restart PostgreSQL in Ubuntu

How to Restart PostgreSQL in Ubuntu?

To restart the “PostgreSQL” server in Ubuntu, use the “systemctl” and “service” command line managers with the “sudo” support in case of non-root users.

What is $$ in Bash Shell Script

What is $$ in Bash Shell Script?

In Linux, the bash shell variable “$$” returns the current bash shell process id that can be checked through the “echo” and the “ps(process)” commands.

How to Use split() with awk in Linux

How to Use split() with awk in Linux?

The “split()” is the “awk” command line function that splits the defined string into an “awk” array separated by the delimiter(default/user-choice).

What is $PWD in Linux

What is $PWD in Linux?

The “$PWD” is an environment variable that contains the absolute path of the current working directory starting from the “root(\)” directory.

How to Argument String to Integer in Bash

How to Argument String to Integer in Bash?

To convert the argument string to an integer using the “$((…))” arithmetic expansion operator, “expr,” “let,” “bc,” and “awk” commands in the bash script.

Bash Multiplication and Addition

Bash Multiplication and Addition

In Linux, the bash addition and multiplication operations can be performed using the “arithmetic expansion,” “expr,” and the “let” command line utility.

How To Set Date and Time On Linux

How to Set Date and Time On Linux?

To set the manual date and time of the system, use the “date”, “timedatectl”, “hwclock”, and “ntpdate” commands and the “Date &Time” option via GUI.

Where are my sshd Logs in Linux

Where to Find sshd Logs in Linux?

The sshd Logs are stored in the “/var/log/auth.log” file. These log details can be displayed using the “grep”, “lastlog”, and the “journalctl” commands.

How to Color diff Output

How to Color diff Output?

To color diff output use the “diff –color” command for the newer version of “diff” and the “colordiff” command line tool for the older versions.

How to Add New Lines When Using echo

How to Add New Lines When Using echo?

To add new lines, use the “-e(backspace interpreter)” and “$(bash variable)” with the “echo” command. An “echo” tool can also be used multiple times to do this.

How to Install the Latest cURL on Linux

How to Install the Latest cURL on Linux?

In Linux and its distributions, the “curl” can be installed via default package managers i.e “apt” (Ubuntu/Debian), “yum” (CentOS/RHEL), and “dnf” (Fedora).

How To Generate A Strong Password In Linux

How to Generate a Strong Password in Linux?

To generate a strong password, use the “urandom”, “makepasswd”, “gpg”, “apg”, “pwgen”, and “openssl rand” commands. It can also be done using the “Perl” script.

How to Loop Over the Lines of a File

How to Loop Over the Lines of a File?

Use the “for” and “while” loops in the shell script to read the file content line by line. Both these loops provide simple syntax to perform this task easily.