|
pwd
|
Show current directory
|
|
mkdir <dir>
|
Make directory <dir>
|
|
cd <dir>
|
Change directory to <dir>
|
|
cd ..
|
Go up one directory
|
|
ls
|
List files
|
|
cat <file>
|
print the contents of <file>
|
|
cat <file1> <file2>
|
concatenate <file1> and
<file2> and print the result |
|
less <file>
|
view and paginate <file>
|
|
cp <file1> <file2>
|
copy <file1> to <file2>
|
|
mv <file1> <file2>
|
move <file1> to <file2>
|
|
rm <file>
|
delete <file>
|
|
head <file>
|
show the first 10 lines of
<file> |
|
tail <file>
|
show the last 10 lines of
<file> |
|
nano <file>
|
edit the contents of <file>
|
|
CTRL-c
|
Stop current command
|
|
CTRL-a
|
Go to start of line
|
|
CTRL-e
|
Go to end of line
|
|
CTRL-r
|
Search history
|
|
TAB
|
Auto-complete current command or filename
|
|
TAB TAB
|
Show possible completion options
|
|
|
Use TAB completion as much as possible, it both makes typing faster and prevents typing errors!
|
|
Saving files
|
|
|
Ctrl-O
|
Save file (confirm with Y)
|
|
Ctrl-X
|
Close file (confirm saving with Y)
|
|
Cut and paste
|
|
|
ALT-A
|
Start marking text
|
|
CTRL-K
|
Cut marked text or line
|
|
CTRL-U
|
Paste text
|
|
Navigate file
|
|
|
CTRL-A
|
Beginning of line
|
|
CTRL-E
|
End of line
|
|
CTRL-C
|
Show line number
|
|
CTRL-_
|
Go to line number
|
|
Search
|
|
|
CTRL-W
|
Find text
|
|
ALT-W
|
Find next occurrence
|
|
ifconfig
|
Display current network configuration
|
|
ifconfig <iface> up
|
activate interface <iface>
|
|
ifconfig <iface> down
|
deactivate interface <iface>
|
|
ifconfig <iface> <ip> netmask <mask>
|
configure interface <iface> with given <ip> and <mask>
|
|
ping <ip>
|
check if <ip> is reachable
|
|
command < file
|
Input of command from file
|
|
command > file
|
Output of command to file
|
|
command > /dev/null
|
Discard output of command
|
|
command >> file
|
Append output of command to file
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.