Popular linux commands

Below is the list of popular linux commands.

  1. man – prints manual page of the command
  2. whereis – prints the location of command
  3. which – prints the location of the command
  4. type – prints the location of command
  5. echo – prints the string, variable or file
  6. mail – used to send an email
  7. logout – log off from the system
  8. date – prints system time stamp
  9. cal – shows the calendar

zdump command
zdump command is used to display time in different time zone. For example – If you want to see the time in GMT, you can use below command.

zdump GMT
dirname command
dirname command is used to get the name of directory in which file is stored. For example if the full path of file is /usr/home/f1.txt, then dirname will be /usr/home

basename command
basename command is used to get only main name of file. For example if the full path of file is /usr/home/f1.txt, then basename will be f1.txt

sleep command
sleep command is used to wait for fixed amount of seconds. For example to sleep for 2 seconds, use below syntax.

sleep 2

You may also like...