Hello fellow Linux- fanatic ! This is the Part2 of Basic shell commands (you can read PART 1 here).& it lists out some very useful & must know commands. Also read my Part1 of Basic Shell commands, who have still not read it.

Linux Commands

$ ps                               (short for process status)displays information for all running processes along with their PID (process identification number)

$ top                             displays top processes based on number of criteria like memory, CPU usage etc. It has following information displayed:-

  • PID:                    The process ID of the process
  • USER:                The user name of the owner of the process
  • PR:                      The priority of the process
  • NI:                       The nice value of the process
  • VIRT:                 The total amount of virtual memory used by the process
  • RES:                    The amount of physical memory the process is using
  • SHR:                   The amount of memory the process is sharing with other processes
  • S:                          The process status (D = interruptible sleep, R = running, S = sleeping, T =     traced or stopped, or Z = zombie)
  • %CPU:                The share of CPU time that the process is using
  • %MEM:               The share of available physical memory the process is using
  • TIME+:              The total CPU time the process has used since starting
  • COMMAND:      The command line name of the process (program started)

$ kill                              is used to kill a process. It requires a PID to kill the desired process, PID can be obtained with ps command

$ mount                        is used to mount an external device or ISO image etc to your system. Syntax for mounting a device is “mount -t type device directory”. For example  “ mount -t vfat /dev/sdb1 /media/disk” to mount a USB drive

$ umount                     is used to unmount a mounted drive. Syntax for unmount is  “ unmount   [directory | device ]”

$ df                                 displays amount of space available in file- system

$ du                                displays disk usage of file & folders of a file-system

NOTE:- df & du commands are discussed in detail in my post HERE

$ grep                            is a powerful finder tool that is used to search files or folder or a pattern.

$ tar                              (short for tape archive) is used to highly compress/uncompress files & folders. Syntax for tar command is “tar –option tar_name  targetfile/folder” .

Below are the options used with tar

  • -cvf                        to compress
  • -tvf                        to list content of tar archive
  • -xvf                       to decompress an archive

 

That concludes my post . I will be sharing more posts in future with Linux commands & their detailed usage. And please share your feedback/queries below.  For now ADIOS!!!

 

If you think we have helped you or just want to support us, please consider these :-

Connect to us: Facebook | Twitter | Google Plus

Become a Supporter - Make a contribution via PayPal

[paypal_donation_button align="left" border="1"]

Linux TechLab is thankful for your continued support.