[Home]  [Links]  [grouch] 


It is confusing and frustrating to face a completely new operating system. The extensive commands and programs included with the typical Linux-based distribution can overwhelm the new user. Ease your way into this new system by learning to use some of these tools. Like most systems, there are a lot more available than are used on a day to day basis. Just learning a handful at first will greatly increase your comfort. Don't limit yourself to just the graphical user interface. Learn to use both GUI and CLI. Remember that ctrl c can interrupt most programs, if you get stuck.

mc - Midnight Commander. This is a very handy file browser for the CLI (command line interface). Use the F1 key for help. If it is not already installed, look on your distribution CDROM. Run it from a full-screen console or an xterm. If any of your keys are not recognized, it has a "Learn Keys" option under the "Options" menu.

man - MANual pages. Displays manual pages for commands, configuration files, and system calls. Example: man man will display the manual pages for the man command. Use your arrow keys, the PageUp and PageDown keys, or space and backspace to navigate the man pages. Use q to quit.

ls - LiSt files. This will display files in the current or specified directory. It has several options to control the amount of information displayed. See man ls for the details. Example: ls /home will display the contents of the /home directory.

cd - Change Directory. Changes your pwd (Present Working Directory), as in cd /home. Note that under most shells, cd ~ will take you home, to your home diretory.

cat - conCATenate files. Combines files or sends the content of a file to the screen. (Caution: if you cat a binary file to the screen, you may leave your console in an unreadable state. Search for information on restorefont and restorepalette for a cure for this. In the meantime, use file [filename] to find out if a file is binary or text.)

less - "less is more than more". This displays the contents of a file and allows you to use the arrow keys and page up / down keys to move through the display. Use ctrl q to quit.

cp - CoPy files. A powerful command with lots of options. See man cp for details. Example: cp file1 file2 will make a copy of file1 in your current directory, named file2. Example 2: cp -a /home/foo/* /home/bar will copy every file in the /home/foo directory into the /home/bar directory and preserve as many attributes as possible, such as permissions, date stamp, symlinks.

mv - MoVe files. Use this to move files or directories to a different location or to rename them. mv foo /tmp will move the file (or directory) named foo into the /tmp directory. mv foo bar will rename foo to bar unless bar is the name of a subdirectory in your present working directory. In the latter case, foo would be moved into the directory bar. Look before you leap.

rm - ReMove files. Use this carefully to delete files; it is permanent. See man rm for information about the options available with this command. (If someone tells you to rm -rf /* you should be very suspicious of that person's intentions. Running that as root would erase your entire system. Running it as a regular user will erase every file and directory to which you have write permission. Be careful.)

tar - Tape ARchive. Used to archive or unarchive files and directories but does not compress the archive. Most common usage: tar zxvf [filename].tar.gz which unzips (z) by sending it to gunzip first, extracts (x), gives verbose (v) reports, the file (f) [filename].tar.gz, which may or may not include directories. Depending on your version of tar, it may also handle bzip2 files using either I, j, or y to send the file through bzip2, bunzip2 instead of z for gzip, gunzip. Creating a zipped archive would be tar zcvf [filename.tar.gz] [directory to archive] the c is for "create", [filename.tar.gz] is whatever you want to call the new archive.

rpm - Redhat Package Manager. Several distributions use rpm files, and many people seem to think you can only deal with these from KDE or GNOME or some other GUI (Graphical User Interface) tool. See man rpm to discover the many options available. Most used: rpm -Uvh [packagename].rpm where U is Upgrade, v is verbose, h is for hash marks (#) progress indicator.

apt - Advanced Package Tool. Debian GNU/Linux provides this for maintaining the system. Typical usage:
apt-get update - this will retrieve information about the latest software packages available from servers listed in /etc/apt/sources.list
apt-cache search foo - searches the packages for "foo"
apt-cache show foo - displays information about some package named "foo"
apt-get install foo - installs the latest package named "foo", along with any dependencies "foo" needs
apt-get dist-upgrade - upgrades all currently installed packages to the latest versions found by the last apt-get update

When your needs go beyond the above, I recommend taking a look at The Linux Cookbook: Tips and Techniques for Everyday Use by Michael Stutz.