Difference between revisions of "Linux Terminal - More Commands to Know"

From Computer Science
Jump to: navigation, search
(Created page with " Up to this point, the following are commands that have been demonstrated: uptime, df, whomi, hostname, pwd, clear, nano, cd, mkdir, cp, ls, rm, rmdir, wc. Other commands to...")
 
Line 1: Line 1:
 +
''This page is a part of the [[Linux and CS Systems Bootcamp]]''
  
 
Up to this point, the following are commands that have been demonstrated: uptime, df, whomi, hostname, pwd, clear, nano, cd, mkdir, cp, ls, rm, rmdir, wc.
 
Up to this point, the following are commands that have been demonstrated: uptime, df, whomi, hostname, pwd, clear, nano, cd, mkdir, cp, ls, rm, rmdir, wc.

Revision as of 14:07, 13 August 2019

This page is a part of the Linux and CS Systems Bootcamp

Up to this point, the following are commands that have been demonstrated: uptime, df, whomi, hostname, pwd, clear, nano, cd, mkdir, cp, ls, rm, rmdir, wc.

Other commands to be aware of include the following.

  • head, tail - for printing out just the first few lines or last few lines from a text file.
  • grep - search a file for some particular text (grep "something" file.txt)
  • man - show manual information about a command.
  • chmod - change file/directory permissions.
  • more - list file contents, use q to quit
  • less - list file contents, use q to quit
  • du - display disk usage information for a directory (du -h -d 1)
  • free - display memory usage information (free -h)
  • finger - see who is logged on to the system
  • passwd - change your password
  • date - see the current date and time
  • cal - calendar
  • bc - binary calculator
  • locate - find files that have been used in the system. Sometimes doesn’t find a file.
  • find - search directories for files. Does actually walk the directories, so finds files locate misses. But is slower.
  • stat - information about files/directories - permissions, access dates, etc.
  • cat - concatenate, but can use to print a file, like cat hello2.txt
  • sort - sort text files
  • More commands - are in /bin, /usr/bin, /usr/local/bin, /usr/games

For all of these you can find help either online (search google for something like linux passwd) or in the terminal using the man command. For example, you can get help about passwd by typing the following.

man passwd

And then you exit the man program by typing q, and can use the arrows to scroll up or down.