Show Menu
Cheatography

Sys Admin Cheat Sheet Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Important Commands

man = manuel
ls = list
.. = back
. = current
pwd = present working directory
ps = processes
cd = change directory
file = file type
clear = clear screen
more/less/cat = printing text tool
grep = searching too (what to find, where to search)
| = piping
find = find certain file (find / where, "file name", -print)
su = switch users
sudo = substitute user 
echo = write single line of text to file
ln -S = create symbolic link <target><new name>
systemctl = system control
visudo - edits the sudo-ers file
fork = copies parent process
init/systemd = 1st process, becomes parent of child processes whos parent process stopped/died before them. 
nice = sets priority for CPU time/usage
renice = re-sets nice

Root Commands

Mac:
chown <userid>: /Users/<userid>/ = change ownership to allow user to access
chmod <userid>: /Users/<userid>/ = allow user to read and write files

Linux:
chown <userid>: /home/<userid>/ = change ownership to allow user to access
chmod <userid>: /home/<userid>/ = allow user to read and write files
 

Important Diectories

/etc - config­uration

vi/vim

 
vi = vim/visual
Command Mode
vi x = delete character
vi u = undo
vi w = jump forward one word
vi b = jump back one word
vi / = search
vi n = next
vi d = delete (w for word, d for line)
vi
Insert Mode
vi i = insert
vi a = append
vi o = open new line

w = write to disk
:q = quit

Signals every admini­strator should know

 

Handy Notes

> = redirect (file > destin­ation)
>> = add (file >> destin­ation)
/dev/null = black hole for unneeded data
2 = standard error (error messages)
1 = actual result­s/real output
whoami = returns username
uptime = returns uptime

Sizes

1 kB
1000B
1KiB
1024
1GiB
1,073,­741,824