SSD Grow


Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Essential Linux Commands: A Beginner’s Guide to Key Functions


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Table of Content


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Did you know that about 90% of the Internet is powered by Linux servers? If you want to manage or deploy applications on a Linux server, such as a VPS, you’ll need to know some basic Linux commands. However, for Linux beginners, the Linux terminal (also known as the shell) can be intimidating. There are a vast number of Linux terminal commands to learn and comprehend, and we cannot cover all of them today. Nevertheless, let’s explore some of the basic Linux commands you’ll need to get started navigating the shell.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The pwd is short for Present Working Directory. It’s a command-line utility tool that returns the path to the directory you’re in at that moment.

The output contains the full system path of the current working directory. By default, pwd ignores the symbolic links but with a proper option, you can look at the full physical path of the current working directory.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ cd /home/dd/Pictures
$ pwd
/home/dd/Pictures


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Use the P switch to find the full physical path if you have traversed inside a directory which is symbolically linked.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ pwd -P
/home/dd/Pictures/test_dir


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

CD command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The cd command stands for “change directory,” and it allows you to navigate from one directory to another.

To navigate to a particular folder with cd command, pass the folder path as the parameter, like so

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ cd /home/dd/Documents
$ pwd
/home/dd/Documents


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
With no options, the cd command changes the working directory to the user’s home directory.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ cd
$ pwd
/home/dd


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Another way of doing the same i.e to navigate to the home directory quickly is to use the ~ switch.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ cd ~
$ pwd
/home/dd


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
You may want to navigate to the previous working directory without typing the entire folder path again. cd – does exactly that.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ cd /home/dd/Documents
$ pwd
/home/dd/Documents
$ cd -
$ pwd
/home/dd


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

MV Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The mv command is a utility command that moves files and folders from one location to another. The mv command can move a single file, multiple files, and directories.

To move a single file using mv, pass the name of the file that needs to be moved as a first parameter and the new file name as a second parameter. In this case, mv commands rename the filename.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ mv a.txt b.txt
// renames the file a.txt to b.txt
$ mv some_directory new_directory
// renames the folder some_directory to new_directory


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To move a group of files to a folder, pass the name of the files followed by the destination folder name with cd command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ mv a.txt b.txt c.txt some_directory
OR
$ mv *.txt some_directory


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
By default the mv command overwrites the destination file. To prompt before overwriting the destination file, use the -i option.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ mv -i a.txt b.txt
mv: overwrite 'b.txt'?


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

RM Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The rm command is short for “remove.” It’s used to delete files and directories.

Be cautious when you use the rm command because once a file or directory is deleted, you cannot recover it later.

To delete a single file, just pass the name of the file along with the rm command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ rm file.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
It is also possible to delete multiple files at one go.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ rm file1.txt file2.txt image.png


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To delete a directory, use the -r switch, which means to delete all files and folders recursively.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ rm -r some_directory


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To perform deletion safely and interactively, use the -i switch, which prompts before each delete action is performed.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ rm -i file.txt

rm: remove regular file ‘file.txt’? y


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

MKDIR command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
mkdir command is “make a directory.” To create a directory, pass the name of the directory along with mkdir command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ mkdir test_directory


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Sometimes, you need to create a nested directory structure. Rather than creating directories one by one, use the -p option to create an entire directory structure.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ mkdir -p dir1/dir2/dir3
$ tree dir1
dir1
└── dir2
└── dir3


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
If you want mkdir to give details of what operation it is performing in the process of creating directories, use the -v switch.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ mkdir -v -p dir_1/dir_2/dir_3
mkdir: created directory 'dir_1'
mkdir: created directory 'dir_1/dir_2'
mkdir: created directory 'dir_1/dir_2/dir_3'


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

LS Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
ls is the list command in Linux, and it shows full list of files or contents of a directory. Just type ls and press the Enter key. The entire contents of the directory will be shown.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ls


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Use the -l switch to show the list of files of the current directory in a long list format.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ls -l


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
In Linux, hidden files start with a . (dot) symbol and are invisible to the regular directory. The -a switch will list the entire contents of the current directory including the hidden files.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ls -la


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Sometimes you may want to get the details of a directory rather than its content. To get the details of a directory, use -d option. For example, if you use ls -l /home, it will display all the files under /home directory. But if you want to display the information about the /home directory then use -ld option as shown below.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ls -ld /etc
drwxr-xr-x 162 root root 12288 Jun 18 09:42 /etc


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

TOUCH Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Touch is a Linux command that’s used to quickly create a text file.

To simply create a blank file with the touch command, use the following syntax.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$$ touch a.txt
// Creates a file by the name a.txt
$ touch a.txt b.txt c.txt
// Creates multiple files
$ touch {A..Z}.txt
// Creates files with names from A.txt to Z.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
You can also use touch to modify the access and modification timestamps of files.

If you want to update the access time of an existing file to the current time without creating it, use the -c switch. If the file exists, touch will update the access time, otherwise it will do nothing.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ touch -c a.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To change the access time of a file use the -a switch with touch command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ touch -a a.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To change the modification time of a file use the -m switch with touch command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ touch -m a.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To change both the access and modification times use the -a and -m switches together.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ touch -am a.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To change the access and modification time to a specific datetime, use the -t switch and specify the datetime in the format [[CC]YY]MMDDhhmm[.ss].

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ touch -c -t 1806181015 a.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Once you have updated the access or modification time using touch command, verify the access/modification time with stat command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ stat touch.txt
File: 'touch.txt'
Size: 1838 Blocks: 24 IO Block: 4096 regular file
Device: 2fh/47d Inode: 4471138 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/dwijadas) Gid: ( 1000/dwijadas)
Access: 2018-06-19 12:38:26.274344027 +0530
Modify: 2018-06-19 12:38:21.120301504 +0530
Change: 2018-06-19 12:38:21.152289411 +0530
Birth: -


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

LESS Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The less command in the Linux terminal is used to view files. It’s similar to the more command, but allows navigation in both forward and backward direction. less does not need to read the entire input file before processing, so with large input file it starts faster than other text editors like vi.

To view a file using less, just pass the filename along with the less command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ less a.txt


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

You can now navigate to the file using the navigation keys. A few of them are given below:

  • [Arrows]/[Page Up]/[Page Down]/[Home]/[End]: Navigate the file.
  • [Space bar]: Next page.
  • b: Previous page.
  • ng: Jump to line number n. The default is the start of the file.
  • nG: Jump to line number n. The default is the end of the file.
  • /pattern: Search for pattern. Regular expressions can be used.
  • G: go to the end of the file
  • g: go to the start of file
  • q or ZZ: exit the less pager
  • 10j: Jump 10 lines forward.
  • 10k: Jump 10 lines backwards.
  • Ctrl+G: show the current file name along with line, byte and percentage statistics.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

LSB_RELEASE Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
You might be interested to know which Linux distribution or the OS version number you are using. One of the options to find this information is to use the lsb_release command. The lsb_release command displays LSB (Linux Standard Base) information about your specific Linux distribution.

To get the LSB distribution information, use the following command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ lsb_release


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To display the single line text distribution, use -d switch.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ lsb_release -d


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To display the release number of the distribution, use -r switch.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ lsb_release -r


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To display the codename according to the distribution release, use -c switch.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ lsb_release -c


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The lsb_release command with -a option displays all the information for the Linux OS you’re using:

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ lsb_release -a


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

UNAME Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The uname command is used to display the software- and hardware-related information such as the kernel release or version, processor type, hostname, etc., in your Linux system, and is built-in with the shell.

To display all the information of a system, use -a switch with uname command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ uname -a


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

The output of the above command will display following information.

  • Kernel name
  • Hostname
  • Kernel release
  • Kernel version
  • Machine hardware name
  • Processor type
  • Hardware platform
  • Operating system

Rather than displaying all the information, it is also possible to get information about your point of interest with the following switch along with uname command.


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
SwitchSwitch description
-sDisplay the kernel name
-nDisplay the hostname
-rDisplay the kernel release
-vDisplay the kernel version
-mDisplay the machine hardware name
-pDisplay the processor type or ‘unknown’
-iDisplay the hardware platform or ‘unknown’
-oDisplay the name of operating system

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

HISTORY Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
History is a very useful command that displays all the commands that have been used recently. In its simplest form, just run the history command with no optiosn and it will print out the bash history of the current user in the terminal.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ history
1 cp a.txt b.txt
2 ssh [email protected]
3 ping 123.456.78.9
4 ssh [email protected]
5 rm /home/dd/Documents/a.txt
...
...


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The output of the history command displays line numbers. It is also possible to repeat a command by specifying its line number.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ !3


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
For a better view of the output of the history command, filter it with less command to view the output one page at a time.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ history | less


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
Alternatively, if you want to view just the last 10 commands, filter the output of history with the tail command:

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ history | tail


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To view the last 30 commands you have entered, pass the number i.e 30 as a parameter of history command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ history 30


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The history of commands is stored in the file ~/.bash_history by default. If you run cat ~/.bash_history, it will display all the commands that you have entered but will not include the line numbers or formatting.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

PS Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The process status command (ps) displays information about active processes in your system. It is generally used to find process identifier number and supports searching of processes by user, group, process id or executable name.

In the simplest form, ps command displays the running processes for a user within the terminal window. To invoke it, just type ps in the terminal.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ps
PID TTY TIME CMD
14591 pts/1 00:00:00 bash
14891 pts/1 00:00:00 ps


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

The output of the ps command will show the rows of data containing the following information.

  • PID
  • TTY
  • Time
  • Command

To view all the running processes in your system, use either of the following commands.


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ps -A
OR
$ ps -e


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To view more information about processes, pass the -F option with the ps command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ps -e -F


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To find daemon processes running in your system, use the -d switch.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ps -d


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
You can also find information about specific process by filtering the output of ps command with grep.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ps -d | grep httpd


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
To view all processes owned by a user, use -u switch by specifying either user ID or user name.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ps -u dd


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
A common and convenient way of using ps to fetch more complete information about the processes running in the system is to use the following command.

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ ps aux


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

where:
a = Displays processes for all users.
u = Displays user/owner for each process.
x = Displays processes those are not attached to the terminal.

In a nutshell, the aux options allows one to view all the running processes in a system in BSD Unix style. The output of ps aux will contain following fields.

Column name

Description

USER

The owner of the process

PID

Process ID

%CPU

CPU time used in percentage

%MEM

Physical memory used in percentage

VSZ

Virtual memory used in bytes.

RSS

Resident Set Size, the non-swappable physical memory used by the process in KiB

TTY

Terminal from which the process is started.

STAT

Process state

START

Starting time and date of the process

TIME

Total CPU time used of the process

COMMAND

The command with all the arguments which started the process


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

TOP Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

One of the most widely used commands to monitor processes and system resource usage on Linux is the top command. It is installed by default on every Linux distribution. The processes are displayed in a list with multiple columns containing information like process name, pid, user, CPU usage percentage, memory usage percentage, and more.

To view the running processes, just run the top command without any options like below.


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ top


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

The output of the above command contains a lot of information about the system. The header areas include uptime, load average, cpu usage, memory usage data.

The process list shows all the processes with various details in separate columns. The following column names are included in the output of top command and are as follows.


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Column hame

Description

PID

Process ID

%CPU

CPU usage by the process

%MEM

Memory usage by the process

COMMAND

The command (executable file) of the process

Sort by Memory/CPU/Process ID/Running time

You can now sort the process list by memory usage, CPU usage, process ID, and running time.

  • To sort the process list by memory usage, press the M key.
  • To sort the process list by CPU usage, press the P key.
  • To sort the process list by process id , press the N key.
  • To sort the process list by process id , press the T key.

Reverse the sorting order

By default the processes are displayed in descending order. Press R to reverse the sorting order of the processes based on currently sorted column. By default the sorting is done through %CPU usage.

Change the update delay

The top command updates the information on the screen every 3.0 seconds by default. To change the update delay time, press the d key. top will ask to provide the time interval between each refresh.

Display full command path

By default, the command column does not display the full path of the command. To view the full path of the command, press the c key.

Add/Remove column

By default the top command displays only few columns. If you want to add/remove columns or change the order of columns, then press the f key.

In the following screen, you will find few fields are marked with * and they are displayed in the order in which they appear in this list. Navigate to the list using up/down arrow keys and press the d key to toggle the display of that field. Once done, press the q key to go back to the process list.

There are much more options to manipulate the output of the top command, which are out of scope for this tutorial. For more options on the top command, consult its man pages.


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

MAN Command


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

As a Linux beginner, you’ll find yourself forgetting exactly what your commands do from time to time. That’s where the man command can be a lifesaver!

The man command will give you information about Linux commands, including its usage options and the various arguments it accommodate.

 To learn more about a command, just run man followed by the command (in this case, mkdir)


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

$ man mkdir


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Conclusion


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87
The journey through essential Linux commands offers beginners a vital foothold in understanding and utilizing this powerful operating system. Each command represents a gateway to efficient system management, file navigation, and task execution. Embracing these fundamentals equips users with the tools to navigate the Linux landscape with confidence, setting the stage for deeper exploration and mastery of its capabilities. As beginners continue to apply and expand their knowledge of these key functions, they lay the groundwork for a rewarding and productive experience in the world of Linux computing.

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Category


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Share


Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Related Articles


Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87

Warning: Undefined array key "_border_border" in /www/wwwroot/ssdgrow.com/wp-content/plugins/elementor/includes/conditions.php on line 87