Linux Terminal - More Commands to Know
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
You can also watch a [video demo] of using some of these commands and looking for help on some of these commands.
And see Steve's Unix Quick Reference.