-
Notifications
You must be signed in to change notification settings - Fork 4
/
bash_cheatsheet.sh
92 lines (85 loc) · 866 Bytes
/
bash_cheatsheet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#Basic
=======
cd
ls
pwd
mv
cp
rm
mkdir
clear
exit
whoami
hostname
uname -a
#Utility
========
ssh
pssh
scp
rsync
kill
pkill
service
unzip
tar -xzvf
script
awk
find . -name '*.cfg'
screen
tmux
which
whatis
du -hsx * | sort -rh | head -10 #largest files
neofetch
#Filesystem
==========
df -h
inxi -Sp # paritions and mountpoints
swapon # swap info
mount
umount
chmod
chown
free -m
head -n 4 /proc/meminfo
#Package Manager
===============
apt-get update
apt-get upgrade
apt install
apt remove
#Text
=========
echo
cat
head
tail
more
less
grep -rni
diff
wc -l
#Grep
=======
grep "pattern" fileName
-x (exact match)
-v (exact unmatch)
-w (full words)
-o (output matched string, not line)
-i (ignore case)
-r (curr dir, and subdirs)
-c (count # matches)
#Network
=============
ifconfig
ping
curl
http
ncat
nmap
netstat
#Graphics
=============
nvidia-smi
vdpauinfo