1.1 Essential Linux Commands
1.1 Essential Linux Commands
Printing Commands
lpq check the status of your entries on the print queue
lpr add an entry to the print queue
lprm remove an entry from the print queue
1
Networking Commands
netstat show the network status for this system
ping is there anybody out there? Check a host for existence
traceroute show me how to get from here to there
Miscellaneous Commands
cal display a calendar on the screen
clear clear the screen
date display the current date and time on the screen
echo display a message on the screen
man read a manual page (type man man to learn more)
passwd change your password
perl run Perl (a great programming language . . . )
su create a shell under the ID of some other user
telnet log into a remote computer
uname display the machine and operating system name
users list the current login sessions on the system
vi run vi (a great text editor . . . )
whereis locate a binary (executable), source, or manual page disk-file
which list the path to a particular binary disk-file (executable)
who who is currently logged in
whoami ’cause I’ve forgotten . . .
Ctrl-D signal end-of-file to running process (key combination)
2
Essential Systems Administrator Commands
Note that you will need to be logged in as root to use these commands
effectively. Remember, as root you have complete power over Linux (so be
careful).
3
1.2 vi Quick Reference
This quick reference will get you started. To learn more, from the Linux
command-line, type: man vi.
vi +/pattern file - edit a file called file and go to the first line that
matches the string pattern
vi’s modes
vi can be in one of three modes:
non-edit mode - keys typed adjust or move around the edit buffer
ex mode - commands are executed within vi, and the commands affect
the edit buffer
4
J join the current line with that line immediately below it
5
:sh temporarily exit vi to access a Linux shell
Searching
/pattern search forward in edit buffer for a match to pattern
/ repeat last forward search
?pattern search backward in edit buffer for a match to pattern
? repeat last backward search
n repeat previous search (regardless of direction)