Linux List of CLI Command lookup
Most Common General Commands
ls
-l
, -a
, -h
ls -l
cd
..
cd ..
cp
-r
, -v
cp -r source/ destination/
mv
-i
, -v
mv -i file1 file2
rm
-r
, -f
rm -rf directory/
mkdir
-p
mkdir -p dir1/dir2/dir3/
touch
None
touch file.txt
cat
None
cat file.txt
grep
-i
, -v
, -E
grep -i "hello" file.txt
find
-name
, -type
find . -name "*.txt"
chmod
+x
, -w
chmod +x script.sh
chown
-R
, user:group
chown -R user:group directory/
ps
-ef
, -u
ps -ef
kill
-9
kill -9 processID
tar
-c
, -x
, -z
tar -czf archive.tar.gz directory/
gzip
-d
gzip -d archive.gz
unzip
None
unzip archive.zip
ssh
-p
, -i
ssh -p 2222 user@example.com
scp
-r
, -P
scp -r localdir user@example.com:remotedir
curl
-O
, -L
curl -O https://example.com/file.txt
wget
-O
wget -O file.txt https://example.com/file.txt
ping
-c
ping -c 5 example.com
traceroute
-n
traceroute -n example.com
ifconfig
None
ifconfig
netstat
-t
, -u
netstat -tulpn
sudo
None
sudo apt-get update
apt-get
install
, update
apt-get update
apt-cache
search
apt-cache search nginx
dpkg
-i
, -r
dpkg -i package.deb
rpm
-i
, -e
rpm -i package.rpm
yum
install
, update
yum install package
dnf
install
, update
dnf install package
pacman
-S
, -Syu
pacman -Syu
systemctl
start
, enable
systemctl start nginx
journalctl
-u
, -f
journalctl -u nginx -f
nano
None
nano file.txt
vi
None
vi file.txt
vim
None
vim file.txt
Most Common Networking Commands
ifconfig
None
ifconfig
ip
addr
, link
ip addr show
netstat
-t
, -u
netstat -tulpn
ss
-t
, -u
ss -tulpn
ping
-c
ping -c 5 example.com
traceroute
-n
traceroute -n example.com
dig
+short
dig +short example.com
host
None
host example.com
nslookup
None
nslookup example.com
telnet
None
telnet example.com 80
nc
-l
, -p
nc -l 8080
ssh
-p
, -i
ssh -p 2222 user@example.com
scp
-r
, -P
scp -r localdir user@example.com:remotedir
curl
-O
, -L
curl -O https://example.com/file.txt
wget
-O
wget -O file.txt https://example.com/file.txt
iptables
-L
, -A
iptables -L
firewall-cmd
--list-all
firewall-cmd --list-all
ufw
status
, enable
ufw status
tcpdump
-i
, -n
tcpdump -i eth0 -n
telnet
None
telnet example.com 80
nc
-l
, -p
nc -l 8080
ssh
-p
, -i
ssh -p 2222 user@example.com
scp
-r
, -P
scp -r localdir user@example.com:remotedir
curl
-O
, -L
curl -O https://example.com/file.txt
wget
-O
wget -O file.txt https://example.com/file.txt
iptables
-L
, -A
iptables -L
firewall-cmd
--list-all
firewall-cmd --list-all
nmap
-sT
, -sU
nmap -sT example.com
tcpdump
-i
, -n
tcpdump -i eth0 -n
Last updated