Articles

Unix commands list

Unix commands list

This guide has been prepared by me to help myself with the list of frequently used basic commands in UNIX/LINUX to be on my finger tip. Thought of sharing it with the others, in case, it might turn out helpful to other readers as well. This is Unix/Linux basic commands - 1,for 2nd part follow the link given at the end of this article. 


Unix/Linux file commands guide

This article will serve as a 5 minute guide or tutorial to learn/revisit basic unix or linux commands frequently used while working with files. Unix/Linux command is given along with their usage or description.

  • ls ► use this command in unix/linux to see all the directory listing. However, any hidden files will not be listed.
  • ls -al ► use this command in unix/linux to see formatted directory listing along with the hidden files.
  • ls -lt ► use this command in unix/linux to sort the directory listing by their time of modification.
  • pwd ► use this command in unix/linux to show your current working directory.
  • touch fileName ► use this command in unix/linux to create new file with its name as filename.
  • cd ► use this command in unix/linux to move to home directory.
  • cd dirName ► use this command in unix/linux to change current directory to dirName directory.
  • mkdir dirName ► use this command in unix/linux to make or create directory having name as dirName.
  • rm fileName ► use this command in unix/linux to remove or delete file having name as fileName.
  • rm -r dirName ► use this command in unix/linux to remove or delete directory dirName.
  • rm -f filename ► use this command in unix/linux to force remove the file filename.
  • more fileName ► use this command in unix/linux to get the content of file having name as filename
  • head fileName ► use this command in unix/linux to get output of first 10 lines of the file fileName.
  • tail fileName ► use this command in unix/linux to get output of last 10 lines of the file filename.
  • cp fileA fileB ► use this command in unix/linux to copy the content of fileA to fileB.
  • cp -r dirA dirB ► use this command in unix/linux to copy directory dirA to directory dirB and create dirB if not already created.
  • mv fileA fileB ► use this command in unix/linux to rename or move fileA to fileB.
  • cat >file ► use this command in unix/linux to place standard input into the file.

Unix or Linux process management commands guide

This section will serve as a 5 minute guide or tutorial to learn/revisit basic unix or linux commands frequently used while working with process management. Unix/Linux command is given along with their usage or description.

  • ps ► use this command in unix/linux to see currently working processes.
  • top ► use this command in unix/linux to display all the running processes.
  • kill pid ► use this command in unix/linux to kill the process with given pid.
  • killall processA ► use this command in unix/linux to kill all the process named as processA
  • pkill pattern ► use this command in unix/linux to kill all processes matching the given pattern.
  • bg ► use this command in unix/linux to list all the background jobs.
  • fg ► use this command in unix/linux to bring the most recent job to foreground.
  • fg n1 ► use this command in unix/linux to bring job n1 to the foreground.

Unix/Linux system info commands guide

This section will serve as a 5 minute guide or tutorial to learn/revisit basic unix or linux commands frequently used while working with system. Unix/Linux command is given along with their usage or description.

  • cal ► use this command in unix/linux to show current months calendar.
  • date ► use this command in unix/linux to show current date and time.
  • w ► use this command in unix/linux to see who all are currently logged in to the system.
  • whoami ► use this command in unix/linux to see who you are currently logged in as in the system.
  • uname -a ► use this command in unix/linux to see kernel information.
  • finger user ► use this command in unix/linux to display information about user.
  • man command ► use this command in unix/linux to show the manual for command.
  • free ► use this command in unix/linux to show memory and swap usage.
  • df ► use this command in unix/linux to see the disk usage.
  • du ► use this command in unix/linux to see the directory space usage.
  • whereis app ► use this command in unix/linux to show possible location of app.
  • which app ► use this command in unix/linux to show which application will be run by default.

Once you have grasped all the above command, please move to the next part to learn few more commands: Unix/Linux basic commands - 2


Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com
Page Views : 62    Published Date :May 22,2020   Author :rajneesh
Please Share this page

Popular Articles

Loading...
Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!