File System Hierarchy
- [ ]
/(aka root) - [ ]
/binand/sbin - [ ]
/opt - [ ]
/usr - [ ]
/var - [ ]
/home - [ ]
/etc - [ ]
/proc [ ]
/tmp-
[ ] Test
- [ ] What is '/'?
- [ ] What is stored in '/bin'? what about
/etc? - [ ] What '/home' is usually used for?
- [ ] What type of files can you find in '/var'?
- [ ] What is unique about
/tmp?
Navigation
- [ ] Commands
- [ ]
pwd- where am I? - [ ]
cd- change directory
- [ ]
[ ] relative vs. absolute paths
-
[ ] Test
- [ ] How to check your current path?
- [ ] Where
cd ..will take you? - [ ] What would be the effect of running
cd .? - [ ] What will happen when running 'cd -'?
Files
-
[ ] Types of files
- [ ] Regular
- [ ] Directory
- [ ] Socket
- [ ] Character Device
- [ ] Block Device
- [ ] Link
- [ ] Named Pipe
-
[ ] Commands
- [ ]
ls- list files and directories - [ ]
-afor listing hidden files - [ ]
-lfor list formt - [ ]
-torder by time - [ ]
-Fbetter distinguish between regular files and directories - [ ]
touch- creating files (original intention is updating timestamp) - [ ] nice to know:
touch file{1..5} - [ ]
rm- remove files - [ ]
-rfor recursive - [ ]
-fto force removal, no questions asked - [ ]
mkdir- create directories - [ ]
-p- for creating multiple nested directories - [ ]
rmdir- remove directories - [ ]
cat- concatenate files (common usage: read a file) - [ ]
mv- move files directories (also rename files and directories) - [ ]
cp- copy a file - [ ]
-rfor recursive (copy a directory) - [ ]
less- display files on a page-by-page basis
- [ ]
-
[ ] Test
- [ ] How to list hidden files?
- [ ] How to create an empty new file?
- [ ] How to remove a directory?
- [ ] How to rename a file?
- [ ] How to copy an entire directory with all its files?
Pattern Matching
This also known as File Globbing
- [ ] Patterns
- [ ]
*- matches zero or more of any character - [ ]
?- matches one of any character
- [ ]
Commands
- [ ]
man- manual for commands - [ ]
which- get full path for given command - [ ]
whatis- one-line manual page descriptions - [ ]
history- command history list- [ ] use ![number line] to execute a command from the list
Random
-
[ ] Terminal
- [ ]
clear- clear the terminal screen (ctrl+l can be also used) - [ ]
ctrl+r- history search of commands - [ ]
exit(orlogout) - terminate a process, quit the shell
- [ ]
-
[ ] Commands
- [ ]
echo- display a line of text - [ ]
alias- define or display command shortcuts/aliases - [ ]
wc- count lines, words, ...
- [ ]
-
[ ] Distributions
- [ ] Fedora
- [ ] Ubuntu
- [ ] RHEL, CentOS
- [ ] Mint
- [ ] Debian
- [ ] Arch Linux
- [ ] openSUSE
I/O redirection
- [ ] File Descriptor
- [ ] stdin 0 (standard input) <
- [ ] stdout 1 (standard output) >
- [ ] stderr 2 (standard error) 2>
[ ] Append >>
-
[ ] Pipe
- [ ] For example:
cat file | wc -lto count number of lines
- [ ] For example:
-
[ ]
tee- [ ] Writing output to two different streams
- [ ] Test
[ ] How to redirect output?
[ ] What would be the result of the following command
blop 2> file?
Text Editor
Learning how to use one of them is more than enough
- [ ] vim
- [ ]
ito start typing - [ ]
:wqto exit (orshit+zz)
- [ ]
- [ ] nano
- [ ] emacs
- [ ] atom
[ ] sublime
-
[ ] Test (mainly for vim)
- [ ] How to remove an entire line?
- [ ] How to copy 5 lines?
- [ ] How to jump to the end of the line
- [ ] How to remove one word
- [ ] How to jump to the end of the file
Users
-
[ ] Types of users
- [ ] regular
- [ ] root
-
[ ] Commands
- [ ]
useradd- add users - [ ]
usermod- modify users - [ ]
userdel- delete users - [ ]
who- show who is logged on - [ ]
lastlog- recent login of users
- [ ]
-
[ ] Files
- [ ]
/etc/passwd- stores users information - [ ]
/etc/shadow- passwords
- [ ]
-
[ ] Test
- [ ] how to add a new user?
- [ ] should you be using your user or root?
Network
-
[ ] Commands
- [ ]
ping- test the reachability of a host - [ ]
-cfor number of packets - [ ]
ip- manage routing, network devices, interfaces and tunnels - [ ]
ip afor interfaces - [ ]
ip rfor routing - [ ]
ip neighfor any ARP related operation - [ ]
ethtool- query and manipulate driver and hardware settings - [ ]
-pfor interface led blinking - [ ]
-tfor running tests to check your network interface - [ ]
-Sfor getting statistics - [ ]
arp- manipulate the system ARP cache - [ ]
dhclient- DHCP client - [ ]
netstat- display network connections - [ ]
-nfor IP addresses instead of hostnames - [ ]
-tto show only TCP connections - [ ]
-pto show the PID of the program - [ ]
-lto show only listening sockets - [ ]
lsof- list open files - [ ]
-ifor sockets - [ ]
traceroute- print the route packets trace to network host - [ ]
mtr- network diagnostic tool (traceroute + ping)
- [ ]
-
[ ] Files
- [ ]
/proc/net/dev- network interfaces list - [ ]
/pro/net/arp- ARP table - [ ]
/etc/sysconfig/network-scripts/*- network configuration files in RHEL based OSs - [ ]
/etc/network/interfaces- network configuration files in Ubuntu
- [ ]
-
[ ] Types of interfaces
- [ ] Regular
- [ ] Dummy
- [ ] Virtual IP
- [ ] Veth
-
[ ] Bonding
- [ ] Modes
- [ ] How to activate
-
[ ] Network Namespaces
- [ ]
ip netns - [ ]
ip netns addfor adding namespaces - [ ]
ip netns listfor listing namespaces - [ ]
ip netns delfor removing namespaces - [ ]
ip netns execfor executing commands inside a network namespace
- [ ]
-
[ ] Network Kernel Parameters
- [ ]
sysctl net.* - [ ]
/proc/sys/net/*
- [ ]
-
[ ] Packet Sniffers (one is enough)
- [ ]
tcpdump - [ ]
wireshark - [ ]
dhcpdump - [ ]
httpry
- [ ]
-
[ ] Test
- [ ] How to list the interfaces in your system?
- [ ] How to display the routing table?
- [ ] How to change the MTU of an interface?
Debugging & Troubleshooting
-
[ ] CPU and Memory
- [ ]
top- processes memory and cpu consumption - [ ]
free- amount of free and used memory - [ ]
-gfor the amount of memory in gigabytes - [ ]
vmstat- virtual memory statistics - [ ]
htop- interactive process viewer - [ ]
atop- system and process monitor - [ ]
/proc/meminfo
- [ ]
-
[ ] Network Commands
- [ ]
netstat- network connections - [ ]
traceroute- network connections - [ ]
IPTraf- IP LAN monitoring - [ ]
iftop- network bandwidth monitoring
- [ ]
-
[ ] Disk and Filesystem
- [ ]
iotop- I/O monitor - [ ]
iostat- I/O statistics for devices and partitions
- [ ]
Processes
-
[ ] States
- [ ] Running
- [ ] Waiting
- [ ] Stopped
- [ ] Zombie
-
[ ] Files
- [ ]
/proc/[PID]
- [ ]
-
[ ] Running in the background
- [ ] For example:
my_program &
- [ ] For example:
Archives
-
[ ] Commands
- [ ] tar
- [ ] gzip
- [ ] zip
- [ ] unzip
-
[ ] Test
- [ ] How to create an archive?
- [ ] How to extract the content of an archive?
Files - Part 2
- [ ] Commands
- [ ]
find- search for files - [ ]
sort- sort, merge, or sequence check text files - [ ]
sort- sort, merge, or sequence check text files
- [ ]
Storage & Filesystem
[ ] inode
-
[ ] Links
- [ ] soft link
- [ ] hard link
-
[ ] Commands
- [ ]
file- determine file type - [ ]
stat- file or file system status
- [ ]
-
[ ] LVM
- [ ] pv
- [ ] vg
- [ ] lv
-
[ ] Test
- [ ] Can you create soft links between different file systems? what about hard links?
- [ ] What information inode stores?
Hardware
- [ ] Commands
- [ ]
lshw- list hardware - [ ]
lspci- list all PCI devices - [ ]
dmidecode- DMI table decoder
- [ ]
For latest updated checklist visit DevOpsBit
Top comments (2)
epsi-rns.github.io/system/2020/02/...