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

From Computer Science
Jump to: navigation, search
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
''This page is a part of the [[Linux and CS Systems Bootcamp]].  This page assumes you have your computer setup to connect to the CS server, or have the appropriate software installed on your computer to run commands.  Go back to the Linux and CS Systems Bootcamp main page if you don't have our system setup yet.''
+
''This page is a part of the [[Linux and CS Systems - Getting Started]].  This page assumes you have your computer setup to connect to the CS server, or have the appropriate software installed on your computer to run commands.  Go back to the Linux and CS Systems Getting Started main page if you don't have our system setup yet.''
  
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.
+
This page contains a list of Linux commands that might be of use to you.  For each of these commands, you can find more information by searching online (e.g., search for "linux head command") or using the terminal manual (be logged in on the terminal and type "man head").
  
 +
=Basic Commands=
 +
In some of the other parts of the Linux and CS Systems Getting Started, a number of basic Linux commands have been introduced and demonstrated, including: uptime, df, whomi, hostname, pwd, clear, nano, cd, mkdir, cp, ls, rm, rmdir, mv, wc.
 +
 +
=Other Commands=
 
Other commands to be aware of include the following.
 
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.
 
* head, tail - for printing out just the first few lines or last few lines from a text file.
Line 14: Line 18:
 
* finger - see who is logged on to the system
 
* finger - see who is logged on to the system
 
* passwd - change your password
 
* passwd - change your password
 +
* chfn - change your finger information (name, etc.)
 +
* whoami - see which user you are currently logged in as (in case you have different accounts for multiple courses)
 
* date - see the current date and time
 
* date - see the current date and time
 
* cal - calendar
 
* cal - calendar
Line 22: Line 28:
 
* cat - concatenate, but can use to print a file, like cat hello2.txt
 
* cat - concatenate, but can use to print a file, like cat hello2.txt
 
* sort - sort text files
 
* sort - sort text files
 +
* tree - displays files and directories in a directory tree format
 
* More commands - are in /bin, /usr/bin, /usr/local/bin, /usr/games
 
* 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.
+
And see [http://cs.indstate.edu/~sbaker/faq/UnixQR.pdf Steve's Unix Quick Reference].
<pre>
 
man passwd
 
</pre>
 
And then you exit the man program by typing q, and can use the arrows to scroll up or down.
 

Revision as of 05:36, 13 January 2020

This page is a part of the Linux and CS Systems - Getting Started. This page assumes you have your computer setup to connect to the CS server, or have the appropriate software installed on your computer to run commands. Go back to the Linux and CS Systems Getting Started main page if you don't have our system setup yet.

This page contains a list of Linux commands that might be of use to you. For each of these commands, you can find more information by searching online (e.g., search for "linux head command") or using the terminal manual (be logged in on the terminal and type "man head").

Basic Commands

In some of the other parts of the Linux and CS Systems Getting Started, a number of basic Linux commands have been introduced and demonstrated, including: uptime, df, whomi, hostname, pwd, clear, nano, cd, mkdir, cp, ls, rm, rmdir, mv, wc.

Other Commands

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
  • chfn - change your finger information (name, etc.)
  • whoami - see which user you are currently logged in as (in case you have different accounts for multiple courses)
  • 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
  • tree - displays files and directories in a directory tree format
  • More commands - are in /bin, /usr/bin, /usr/local/bin, /usr/games

And see Steve's Unix Quick Reference.