Unix Command Cheat Sheet
Unix Command Cheat Sheet
Below is a broken down list of Unix commands you may find useful
© Tips by TheDocBlog : Webmaster Tips and Resource Blog · URL of this document: http://thedocblog.com/unix-command-cheat-sheet-49.html · Document created: May 27th, 2009, 3:27 pm
within most Unix command shells.
* Press CTRL+C to escape from help, manual menus and other full
window options.
Basic Commands:
who or w Displays who is currently logged on the server & the user
information.
uptime How long the server has been running.
date Shows the current system date.
whoami Who you are logged in as, your user.
df Displays how much disc space is left on each drive / partition.
General Commands:
pwd Displays your current directory.
cd dirname or cd /full/directory/path/ Changes your directory.
cd websites or cd /usr/local/www/domain.com/www/
cd.. Backup a directory (cdup is the same as cd..)
cd ../../../ Backup 3 directories.
su Brings up password prompt for root user.
su username Changes the login to that username.
ls and ls -l Typed within a directory for a directory listing.
mkdir dirname Creates a directory.
mv olddirectory newdirectory Renames a directory or file to a new
name.
Admin Commands:
top What's running, load averages, server status information.
rm -r directory Removes a directory permanently.
cp filename /path/to/new/location/ or cp filename /directory/ Moves file
to a new location.
cp directory /path/to/new/location/ Moves that directory into the given
path directory.
cp directory/ /path/to/new/location/ Movies the files within that
directory to within the new location.
dig domain.com Displays name server, name servers, and other
information about the domain.
finger username Displays information about a username and group
status
ps ax Lists all processes running on the server.
kill pid pid=process id. This command terminates the process # or id.
netstat Active Connections On The Machine.
ln -s /target/path/to/open linkname Creates a short cut / symbolic link
to a target directory.
This entry was posted on Wednesday, January 25th, 2006 at 8:01 pm and is filed under Admin & Servers
You can follow any responses to this entry through the Comments (RSS)
feed. You can leave a response, or trackback from your own site.
Tips by TheDocBlog : Webmaster Tips and Resource Blog is proudly powered by WordPress.
PDF created by ContuttoPDF.