Appendix A. Linux Commands

alias

Creates a command that runs other commands. Aliases are a handy way to customize your system and to provide shortcuts for common activities. For example, the following alias creates an easy-to-remember name for unpacking a compressed archive:

alias extract='tar zxovf'

Put an alias into the file /etc/bashrc if you would like the alias to be always accessible to all users on the system. Type alias alone to see the list of aliases for your account. Use unalias to remove an alias.

alias ls="ls --color=tty"

Creates an alias for the command ls to enhance its format with color. In this example, the alias is also called ls and the color option is evoked only when the output is done to a terminal (not to files).

apropos topic

Shows which man (documentation) pages cover the topic specified.

bash filename

Runs a script, or file containing bash shell commands.

bunzip2 filename .bz2

bunzip2 stands for big unzip. The command decompresses files with the extension .bz2. Such files have been zipped with bzip2 compression utility, which is usually reserved for large files and/or directories.

cat filenames

Combines all listed files in order and displays them on the screen. Useful for showing plain text files; if they are long, they should be displayed with less or more. Also often used to combine files into a single file specified after a > character, as in:

cat a1 a2 a3 > complete_file
cd directory

cd stands for change directory. For example, if you want ...

Get Exploring the JDS Linux Desktop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.