Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VIM MINI TUTORIAL
- (see also slides)
- kherkghiughi
- HELLO world
- HELLO moon
- HELLO planet venus
- gg - go to top of document
- G - go to bottom of document
- /text - search for text
- dw - delete current word
- read vimtutor
- DO NOT USE vi CHEATSHEETS!!!!
- [student@rocky ~]$ history
- 1 ls
- 2 vi countdown
- 3 chmod +x countdown
- 4 cat countdown
- 5 echo $PATH
- 6 pwd
- 7 cp countdown /usr/local/bin/
- 8 whoami
- 9 sudo cp countdown /usr/local/bin/
- 10 countdown 1
- 11 history
- 12 countdown 0
- 13 history
- 14 echo $PATH
- 15 sudo reboot
- 16 history
- 17 ##### ON GRUB PROMPT: add "systemd.unit=multi-user.target"
- 18 history
- 19 clear
- 20 sudo systemctl start graphical.target
- 21 history
- 22 history
- 23 sudo -i
- 24 id
- 25 id linda
- 26 sudo usermod -aG wheel linda
- 27 id linda
- 28 su - linda
- 29 history
- 30 id
- 31 cat /etc/groups
- 32 cat /etc/group
- 33 exit
- 34 ls
- 35 exit
- 36 sudo apt install openssh-server
- 37 sudo systemctl status sshd
- 38 history
- 39 sudo systemctl status sshd
- 40 ip a
- 41 countdown 12
- 42 uname --help
- 43 uname --all
- 44 uname -a
- 45 ls -h
- 46 ls --help
- 47 ls --help | less
- 48 ls -lrt
- 49 netstat -tulpen
- 50 ps aux
- 51 ps -aux
- 52 whoami
- 53 WHOAMI
- 54 whoami --help
- 55 hostname
- 56 hostname --help
- 57 hostname -i
- 58 hostname -a
- 59 date
- 60 date --help | less
- 61 date +%m-%d-%y
- 62 date +%d-%m-%y
- 63 date +%d-%m-%Y
- 64 date +%d-%M-%Y
- 65 uanem
- 66 uname
- 67 uname -a
- 68 uname -r
- 69 passwd --help | less
- 70 passwd -S linda
- 71 sudo passwd -S linda
- 72 touch hello
- 73 ls -l
- 74 cd /
- 75 touch hello
- 76 cd tmp
- 77 touch hello
- 78 cd
- 79 pwd
- 80 date
- 81 ls -l hello
- 82 touch hello
- 83 ls -l hello
- 84 last
- 85 w
- 86 who
- 87 w
- 88 history
- 89 passwd --help | less
- 90 last
- 91 which last
- 92 sudo rm /usr/bin/last
- 93 sudo dnf provides */finger
- 94 which last
- 95 sudo rm -f /usr/bin/last
- 96 last
- 97 man man
- 98 man last
- 99 man find
- 100 man man
- 101 ls -l /etc/passwd
- 102 which passwd
- 103 man passwd
- 104 man 5 passwd
- 105 man -a passwd
- 106 man -k user
- 107 man man
- 108 man apropos
- 109 man mandb
- 110 sudo mandb
- 111 man -k user
- 112 man -k user | wc
- 113 man -k user | grep 8
- 114 man -k user | grep 8 | wc
- 115 man ls
- 116 info ls
- 117 pinfo ls
- 118 cd /usr/share/doc
- 119 ls
- 120 cd grep
- 121 ls
- 122 ls -l
- 123 less NEWS
- 124 cd ..
- 125 cd pam
- 126 ls
- 127 less Linux-PAM_SAG.txt
- 128 cd
- 129 countdown 12
- 130 ls
- 131 ls -a
- 132 ls -l
- 133 ls -lrt
- 134 pwd
- 135 cd /etc
- 136 ls a*
- 137 ls -d a*
- 138 ls -d a?.*
- 139 ls -d a[uv]*
- 140 ls -d a[u-z]*
- 141 cd
- 142 pwd
- 143 cd /etc
- 144 cd
- 145 mkdir hellodir
- 146 ls
- 147 ls -l
- 148 rmdir hellodir/
- 149 cd /usr
- 150 ls
- 151 du -sh
- 152 cd /etc
- 153 ls
- 154 less DIR_COLORS
- 155 cd /var
- 156 ls
- 157 cd log
- 158 ls -l
- 159 ls -lrt
- 160 cd
- 161 journalctl
- 162 history
- 163 du -hs
- 164 cd /var
- 165 di -hs
- 166 du -hs
- 167 sudo du -hs 2>/dev/null
- 168 #sudo rm -rf / --no-preserve-root
- 169 cd
- 170 man hier
- 171 ssh [email protected] man hier
- 172 ssh [email protected] "man hier"
- 173 ssh [email protected] man hier | less
- 174 ssh [email protected] "man hier | less"
- 175 ssh [email protected] man hier | less
- 176 sudo ifconfig
- 177 man ifconfig
- 178 ip a
- 179 sudo ip a
- 180 sudo ip addr add dev ens160 10.0.0.10/24
- 181 ip a
- 182 ping 10.0.0.10
- 183 sudo ifconfig
- 184 sudo ifconfig -a
- 185 sudo ldd /usr/sbin/ifconfig
- 186 sudo ldd /usr/sbin/ip
- 187 which ifconfig
- 188 sudo rm -f $(which ifconfig)
- 189 sudo tail /var/log/messages
- 190 cd /var
- 191 sudo tail log/messages
- 192 cd cache/
- 193 pwd
- 194 cd /usr/share/doc/
- 195 tail ../../../var/log/messages
- 196 tail /var/log/messages
- 197 cd
- 198 sudo cp -R /tmp/ .
- 199 ls
- 200 sudo cp -R /tmp .
- 201 ls
- 202 mv hello bye
- 203 ls -l
- 204 history
- 205 sudo touch mydonut
- 206 echo with sprinkles please > mydonut
- 207 cat mydonut
- 208 ls -il mydonut
- 209 ln mydonut yourdonut
- 210 ls -il *donut
- 211 ln mydonut herdonut
- 212 ls -il *donut
- 213 rm yourdonut
- 214 ls -il *donut
- 215 ln -s mydonut whatever
- 216 ln -s mydonut hisdonut
- 217 mv whatever whateverdonut
- 218 ls -il *donut
- 219 cat hisdonut
- 220 echo im not interested >> whateverdonut
- 221 ls -il *donut
- 222 rm mydonut
- 223 ls -il *donut
- 224 cat hisdonut
- 225 ln herdonut mydonut
- 226 ls -il *donut
- 227 history
- 228 ls -l /
- 229 sudo lsblk
- 230 sudo /boot
- 231 sudo ls /boot
- 232 sudo ln /etc/hosts /boot/hosts
- 233 find / -name "hosts"
- 234 sudo find / -name "hosts"
- 235 sudo find / -name "hosts*"
- 236 sudo find / -user "linda"
- 237 sudo find / -user "linda" 2> /dev/null
- 238 sudo find / -size +2G
- 239 ls -l /proc/kcore
- 240 sudo mkdir /root/linda; sudo find / -user linda -exec cp {} /root/linda/ \;
- 241 ps aux
- 242 ps aux | less
- 243 history
- 244 man locate
- 245 locate hosts
- 246 sudo updatedb
- 247 locate hosts
- 248 sudo tar -cvf backup.tar /etc /home
- 249 ls -l
- 250 ls -lh
- 251 sudo tar -czvf backup.tar.gz /etc /home
- 252 man tar
- 253 sudo tar -czvf backup.tar.gz /etc /home --exclude=/home/backup*
- 254 sudo tar -czvf backup.tar.gz --exclude=/home/student/backup* /etc /home
- 255 sudo tar -cjvf backup.tar.bz2 --exclude=/home/student/backup* /etc /home
- 256 sudo tar -cJvf backup.tar.xz --exclude=/home/student/backup* /etc /home
- 257 ls -l
- 258 ls -lh
- 259 tar tvf backup.tar.gz
- 260 tar xvf backup.tar.xz
- 261 ls
- 262 tar xvf backup.tar.xz -C /tmp
- 263 ls /tmp
- 264 countdown 20
- 265 mkdir -p /tmp/files/pictures /tmp/files/photos /tmp/files/videos
- 266 cd /tmp/files
- 267 ls
- 268 cp /etc/[a-c]* .
- 269 ls
- 270 mv [ab]* photos/
- 271 ls
- 272 ls photos/
- 273 mv c* videos/
- 274 #sudo find /etc -size
- 275 man find
- 276 sudo find /etc -size -1000c
- 277 sudo find /etc -size -1000c -exec cp {} pictures/
- 278 sudo find /etc -size -1000c -exec cp {} pictures/ \;
- 279 sudo find /etc -type f -size -1000c -exec cp {} pictures/ \;
- 280 ls pictures/
- 281 pwd
- 282 ln -s /var var
- 283 ls
- 284 sudo tar czvf homes.tar /home
- 285 ls -l
- 286 mkdir /tmp/archive
- 287 tar xvf homes.tar -C /tmp/archive
- 288 ls /tmp/archive/
- 289 tree /tmp/archive/
- 290 sudo nano /etc/hosts
- 291 cat /etc/hosts
- 292 vimtutor
- 293 pwd
- 294 cd
- 295 vim vimschool.txt
- 296 history
- 297 sudo less /var/log/messages
- 298 sudo more /var/log/messages
- 299 sudo head /etc/passwd
- 300 sudo head -5 /etc/passwd
- 301 sudo tail -5 /etc/passwd
- 302 sudo head -5 /etc/passwd | tail -1
- 303 cat /etc/hosts
- 304 tac /etc/hosts
- 305 sudo dnf provides */cowsay
- 306 sudo grep lisa /etc/*
- 307 sudo grep lisa /etc/* 2>/dev/null
- 308 ps aux | grep ssh
- 309 ps aux | grep -i ssh
- 310 ps aux | grep -i sshd
- 311 ps aux | grep -i sshd | grep -v grep
- 312 sudo dnf install httpd -y
- 313 sudo grep DocumentRoot /etc/httpd/conf/httpd.conf
- 314 sudo grep -A 10 DocumentRoot /etc/httpd/conf/httpd.conf
- 315 sudo grep -l root /etc/*
- 316 sudo grep -lR root /etc/* 2>/dev/null
- 317 sudo grep -lR linda /etc/* 2>/dev/null
- 318 sudo grep lisa /etc/* 2>/dev/null
- 319 vim regexfun
- 320 grep 'anna' regexfun
- 321 grep '^anna' regexfun
- 322 grep 'anna$' regexfun
- 323 grep '^anna$' regexfun
- 324 grep '^anna\b' regexfun
- 325 grep '^anna' regexfun
- 326 grep 'b.t' regexfun
- 327 grep 'b.*t' regexfun
- 328 grep 'b.+t' regexfun
- 329 grep -E 'b.+t' regexfun
- 330 grep -E 'b.?t' regexfun
- 331 grep 'bo\{2}\t'
- 332 grep 'bo\{2}\t' regexfun
- 333 grep 'bo\{2\}t' regexfun
- 334 cat regexfun
- 335 history
- 336 cat regexfun
- 337 grep '^anna ' regexfun
- 338 vim regexfun
- 339 grep '^anna ' regexfun
- 340 grep '^anna\b' regexfun
- 341 grep 'anna\b' regexfun
- 342 cat /etc/passwd
- 343 cut -f 1 /etc/passwd
- 344 cut -f 1 -d : /etc/passwd
- 345 cut -f 4 -d : /etc/passwd
- 346 cut -f 5 -d : /etc/passwd
- 347 cut -f 1 -d : /etc/passwd | sort
- 348 cut -f 3 -d : /etc/passwd | sort
- 349 cut -f 3 -d : /etc/passwd | sort -n
- 350 echo hello
- 351 echo hello | tr
- 352 echo hello | tr :lower: :upper:
- 353 echo hello | tr [:lower:] [:upper:]
- 354 echo hello | tr [a-z] [A-Z]
- 355 echo hello | tr [a-k] [l-z]
- 356 sed -n 5p /etc/passwd
- 357 for i in one two three; do mkdir $i; done
- 358 ls
- 359 for i in one two three; do echo hello > $i/hellofile; done
- 360 cat one/hellofile
- 361 sed -i 's/anna/linda/g' regexfun
- 362 cat regexfun
- 363 for i in one two three; do sed -i -e 's/hello/bye/' $i/hellofile; done
- 364 cat one/hellofile
- 365 #for i in "*scenario*"; do sed -i -e 's/feyenoord/noway/' $i/intro.md; done
- 366 awk -F : '{ print $4 }' /etc/passwd
- 367 awk -F : '/linda/ { print $4 }' /etc/passwd
- 368 awk -F : '$3 > 999 { print $1 }' /etc/passwd
- 369 history
- 370 pinfo sed
- 371 ls > myfile
- 372 cat myfile
- 373 who > myfile
- 374 cat myfile
- 375 ls >> myfile
- 376 cat myfile
- 377 ls > /dev/null
- 378 lsblk
- 379 ls > /dev/sda
- 380 grep -R root /proc
- 381 grep -R root /proc 2>/dev/null
- 382 grep -R root /etc &> myfile
- 383 less myfile
- 384 ps aux | tee psfile | grep ssh
- 385 cat psfile
- 386 history
- 387 vim .bash_history
- 388 countdown 14
- 389 exit
- 390 wc .bash_history
- 391 history
- 392 history -d 388
- 393 history
- 394 echo $HISTFILE
- 395 echo $HISTFILESIZE
- 396 echo $HISTSIZE
- 397 export HISTSIZE=10000
- 398 export HISTFILESIZE=10000
- 399 countdown 12
- 400 sudo -i
- 401 env
- 402 env | grep HIST
- 403 alias sander="help"
- 404 sander
- 405 alias
- 406 sudo vim /etc/profile
- 407 ls /etc/profile.d/
- 408 sudo vim /etc/profile.d/bighist.sh
- 409 vim .bash_profile
- 410 vim .bashrc
- 411 vim .bash_logout
- 412 ls -al
- 413 ls
- 414 tar -czvf student.tgz --exclude=backup* .
- 415 tar -cz --exclude=backup* .
- 416 sleep 10
- 417 sleep 3600
- 418 bg
- 419 ps aux | grep 3600
- 420 sleep 1800 &
- 421 jobs
- 422 fg 1
- 423 sudo dd if=/dev/zero of=/dev/null &
- 424 sudo jobs
- 425 dd if=/dev/zero of=/dev/null &
- 426 sudo jobs
- 427 dd if=/dev/zero of=/dev/null &
- 428 sudo top
- 429 killall dd
- 430 ls -l
- 431 pwd
- 432 ls -ld .
- 433 rm -f back*
- 434 systemctl status crond
- 435 sudo crontab -e
- 436 sudo journalctl
- 437 sudo lsblk
- 438 sudo umount /dev/sdb1
- 439 sudo mount /dev/sdb1 /mnt
- 440 cd /mnt
- 441 ls
- 442 ls -l
- 443 touch dummyfile
- 444 sudo touch dummyfile
- 445 ls
- 446 sudo umount /dev/sdb1
- 447 lsof /mnt
- 448 cd
- 449 sudo umount /dev/sdb1
- 450 ls /mnt
- 451 history
Advertisement
Add Comment
Please, Sign In to add comment