Common LINUX Command

The following is a list of commonly used LINUX/UNIX commands which may be of value during your Telnet sessions. Remember that LINUX/UNIX is case sensitive. Options or flags which can be used with a command are placed in [ ]. The [ ] are not part of the command and should not be included in the command that you type.

login usernameallows you to login for a Telnet session
passwdchanges your password
logoutlogs you out of a Telnet session
cd change directory; cd .. moves you backwards to the next higher subdirectory level; cd / moves you to the highest directory level
chmod permissions filenameschanges the permissions for a file; permissions should include a letter designating who gets permissions (u for the user, g for the group, o for others, or a for all) followed by a + or - (to give or take away the permission) followed by the kind of permission (r for read access, w for write access, x for execute if the file is a program or script); the complete command that you type should look like:

chmod g-w filename

chown user:group filenameschanges ownership of a file
clearclears the screen
cp oldfiles newfilescopies a file; this leaves the old file intact and makes a new copy with a new filename
datetells you the current date and time
dfdisplays how much space on the disks (harddrive partitions) is free
du [-a] [-s] directoriestells you how much disk space your files occupy; the -a option displays the space used by each file, not just each directory; the -s option displays the total space used for each directory but not subdirectory
finger username@servernameprovides information concerning a user; finger without the username@servername will provide information concerning who is using the server at that time
helpprovides online help; several topics have been included in the help system available on the servers
ls [-l] [-a] [-p] [-r] [-t] [-x]lists the files in a directory; -l displays detailed informtion about each file and directory, including persmissions, owners, size and time/date when the file was last modified; -a option displays all the files and subdirectories including hidden files (with names that begin with a dot); -p displays a slash at the end of each directory name to distinquish them from filenames; -r displays files in reverse order; -t displays files in order of modification time; -x displays the filenames in columns across the screen.
lynx servername or URLLynx is a text-based, non-graphical web brower for use in Telnet session
man [-k keywords] topicdisplays the reference manual page about a LINUX command; the -k keywords option allows you to see all man pages that contain that keyword; topic is the command or topic which you want information about
mesg [n|y]lets you control whether other people can use the talk command to interrupt you with on-screen messaging; mesg n will block the interruptions; mesg y will allow interruptions
mkdir new_directorymakes a new subdirectory with the name specified by new_directory
mv [-i] oldname newnamerenames a file or moves it from one filename or directory to another; the -i option tells mv to prompt you before it replaces an existing filename
nslookup IP address or server aliasprovides conversion of an IP address to an alias of a computer if it is registered in DNS (Domain Name Service) or will provide the IP address for an alias
passwdchanges your password
pinea program which allows you to read and send mail; information concerning the use of pine can be found elsewhere in the documentation or by reading the online manual pages for pine ( man pine )
ping IP address or server aliassends a ping packet to another server; this provides information concerning the time it takes for information to make the round trip to the other computer; it will also tell you whether the other server is on-line at that time
psdisplays information about your processes/jobs/programs which are running on the server
rm [-i] [-r] filenamesremoves or deletes files; the -i option asks you to confirm that you want to delete each file; the -r option is dangerous because it allow you to delete an entire directory and all of the files it contains
rmdir directoryremoves a directory; you can use the -i and -r options which are described in the rm command
tail [-r] [-lines] filenamedisplays the last few lines of a file; -r displays the lines in reverse order; -lines specifies the number of lines, starting at the end of the file, you want to see
talk username@servernameallows you to talk to another user by typing messages to each other on-screen; to prevent someone from talking to you, see the mesg n command
touch [-a] [-c] [-m] [date] filenameschanges the date and time for a file without changing the content of the file; -a changes onlyt the date and time the file was last accessed; -c doesn't create a file if it does not already exist; -m changes only the date and time the file was last modified; date specifies the date and time to give the file in the mmddhhnn format (month, day, hour, minute); touch with a new filename with create a new, empty file.
traceroute IP address or server aliasprovides information concerning the route which packets must take to get from your computer (the server in this case) to a remote computer/server; typically used to diagnose possible problems in packet routing
viVI is a text editor. Further information concerning the editing commands for VI can be found in the help document.
wprovides information concerning who is logged into the system and some details on how they are connected
whotells you who is using the server at that time
write usernamesends a message to another person using the system; to prevent someone from writing to you, see the mesg n command