Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@server1 ~]# history
- 1 dnf install git -y
- 2 vim countdown
- 3 chmod +x countdown
- 4 ./countdown 16
- 5 ./countdown 16 lab
- 6 ssh student@192.168.29.147
- 7 ip a
- 8 tar czvf /root/archive.tgx /etc
- 9 ls -l
- 10 mv archive.tgx archive.tgz
- 11 ls
- 12 grep -v '^$' /etc/dnsmasq.conf
- 13 grep -v '^$' /etc/dnsmasq.conf | sort
- 14 grep -v '^$' /etc/dnsmasq.conf
- 15 grep -v '^$' /etc/dnsmasq.conf | sort
- 16 grep -v '^$' /etc/dnsmasq.conf | sort > /var/tmp/dnslines.txt
- 17 useradd bob
- 18 mkdir userfiles
- 19 find / -user bob -type f
- 20 find / -user bob -type f -exec cp -a {} userfiles/ \;
- 21 man sort
- 22 grep -v '^$' /etc/dnsmasq.conf | sort -d
- 23 history
- 24 ./countdown 13 break
- 25 history
- 26 exit
- 27 su - bob
- 28 passwd bob
- 29 su - bob
- 30 id student
- 31 id bob
- 32 visudo
- 33 su - bob
- 34 visudo
- 35 su - bob
- 36 visudo
- 37 ./countdown 1
- 38 ls -l /etc/skel
- 39 ls -a /etc/skel
- 40 ls -a /home/linda
- 41 vim /etc/login.defs
- 42 useradd --help | less
- 43 cat /etc/passwd
- 44 cat /etc/shadow
- 45 vim /etc/shadow
- 46 su - linda
- 47 ssh linda@localhost
- 48 vim /etc/shadow
- 49 less /etc/passwd
- 50 lid -g wheel
- 51 groupadd sales
- 52 id bob
- 53 usermod -aG sales bob
- 54 id bob
- 55 usermod -G wheel bob
- 56 id bob
- 57 usermod --help | less
- 58 usermod -G sales bob
- 59 ./countdown 16 lab and break
- 60 ./countdown 16 "lab and break"
- 61 vim /etc/login.defs
- 62 touch /etc/skel/newfile
- 63 groupadd profs
- 64 groupadd student
- 65 groupadd students
- 66 useradd anna -G profs
- 67 useradd anouk -G profs
- 68 useradd lisa -G students
- 69 useradd linda -G students
- 70 for i in linda lisa anna anouk; do echo password | passwd --stdin $i; done
- 71 tail -4 /etc/shadow
- 72 history
- 73 ls -l /etc/hosts
- 74 touch testfile
- 75 ls -l
- 76 chown linda testfile
- 77 ls -l
- 78 chown linda:profs testfile
- 79 ls -l
- 80 chgrp students testfile
- 81 ls -l
- 82 mkdir -p /data/profs /data/students
- 83 ls -l /data
- 84 chown :profs /data/profs
- 85 chgrp students /data/students
- 86 ls -l
- 87 ls -l /data
- 88 chmod 770 /data/students
- 89 chmod g+w,o-rx /data/profs
- 90 ls -l /data
- 91 history
- 92 cd /home/linda
- 93 touch rootfile
- 94 su - linda
- 95 touch rootfile2
- 96 su - linda
- 97 su - anna
- 98 chmod g+s /data/profs
- 99 ls -l /data/
- 100 su - anna
- 101 su - anouk
- 102 chmod +t /data/profs
- 103 ls -ld /data/profs
- 104 su - anouk
- 105 cd
- 106 ./countdown 1 questions
- 107 cd /home/linda
- 108 touch roofile
- 109 ls -l rootfile2
- 110 ls -l rootfile
- 111 ls -l rootfile2
- 112 rm rootfile2
- 113 touch newfile
- 114 ls -l newfile
- 115 su - linda
- 116 history
- 117 mkdir -p /files/profs /files/students
- 118 cd /files
- 119 ls -l
- 120 chgrp profs profs
- 121 chgrp students students
- 122 chmod 770 *
- 123 ls -l
- 124 umask
- 125 umask 002
- 126 umask
- 127 umask 022
- 128 exit
- 129 ./countdown 15 "lab and break"
- 130 lsblk
- 131 poweroff
- 132 fdisk /dev/nvme0n1
- 133 lsblk
- 134 mkfs.xfs /dev/nvme0n1p3
- 135 mount /dev/nvme0n1p3 /mnt
- 136 lsblk
- 137 mount
- 138 lsblk
- 139 findmnt
- 140 vim /etc/fstab
- 141 mount -a
- 142 reboot
- 143 fdisk /dev/nvme0n1
- 144 vim /etc/fstab
- 145 mkfs.xfs /dev/nvme0n1p5
- 146 mkfs.ext4 /dev/nvme0n1p6
- 147 mkdir /part5 /part6
- 148 mount -a
- 149 touch /part5/part_5_file
- 150 touch /part6/part6_file
- 151 vim /etc/fstab
- 152 fdisk /dev/nvme0n1
- 153 history
- 154 reboot
- 155 journalctl -xb
- 156 vim /etc/fstab
- 157 lsblk
- 158 blkid
- 159 blkid | grep p5
- 160 blkid | grep p5 | awk '{ print $2 }'
- 161 blkid | grep p5 | awk '{ print $2 }' >> /etc/fstab
- 162 vim /etc/fstab
- 163 mount -a
- 164 ls /part6
- 165 top
- 166 ps aux | grep zombie
- 167 kill -9 38339
- 168 ps aux | grep zombie
- 169 kill -SIGCHLD 38338
- 170 kill -9 38338
- 171 ps aux | grep zombie
- 172 dd if=/dev/zero of=/dev/null &
- 173 top
- 174 echo 0 > /sys/bus/cpu/devices/cpu1/online
- 175 top
- 176 nice --help | less
- 177 nice -20 sleep 100
- 178 echo 1 > /sys/bus/cpu/devices/cpu1/online
- 179 history
- 180 mount | grep proc
- 181 cd proc
- 182 cd /proc
- 183 ls
- 184 cd sys
- 185 ls
- 186 cd vm/
- 187 ls
- 188 sysctl -a
- 189 sysctl -a | wc
- 190 tuned-adm list
- 191 dnf install -y tuned
- 192 dnf install -y tuned-adm
- 193 tuned-adm --list
- 194 tuned-adm list
- 195 tuned-amd profile virtual-guest
- 196 tuned-adm profile virtual-guest
- 197 tuned-adm list
- 198 systemctl status tuned
- 199 cd /usr/lib/tuned/
- 200 ls
- 201 cd virtual-
- 202 cd virtual-guest/
- 203 ls
- 204 vim tuned.conf
- 205 pwd
- 206 ls -ld /etc/tuned
- 207 cd /etc/tuned
- 208 ls
- 209 mkdir sander
- 210 cp /usr/lib/tuned/latency-performance/tuned.conf sander/
- 211 tuned-adm list
- 212 tuned-adm profile sander
- 213 tuned-adm recommend
- 214 history
- 215 cd
- 216 history
- 217 ip link show
- 218 ip addr show
- 219 hostnamectl status
- 220 hostnamectl hostname server1.example.local
- 221 hostnamectl status
- 222 cat /etc/hostname
- 223 exit
- 224 vim /etc/hosts
- 225 ping google.com
- 226 vim /etc/nsswitch.conf
- 227 ping google.com
- 228 cat /etc/resolv.conf
- 229 nmtui
- 230 cd /etc/NetworkManager/
- 231 ls
- 232 cd system-connections/
- 233 ls
- 234 vim ens160.nmconnection
- 235 ip a
- 236 cd
- 237 systemctl -t help
- 238 systemctl list-unit-files
- 239 systemctl list-units
- 240 systemctl list-units -t timer
- 241 systemctl cat logrotate.timer
- 242 systemctl cat logrotate.service
- 243 systemctl cat logrotate.timer
- 244 systemctl status logrotate.timer
- 245 systemctl cat sshd.service
- 246 systemctl status sshd.service
- 247 kill -9 4660
- 248 systemctl status sshd.service
- 249 systemctl status sshd
- 250 dnf install -y httpd
- 251 service sshd status
- 252 systemctl status httpd
- 253 systemctl enable --now httpd
- 254 exit
- 255 history
- 256 fdisk /dev/nvme0n1
- 257 lslbk
- 258 lsblk
- 259 cat /proc/partitions
- 260 fdisk -l /dev/nvme0n1
- 261 mkfs.xfs /dev/nvme0n1p4
- 262 cd /boot
- 263 umount /dev/sda1
- 264 umount /boot
- 265 lsof /boot
- 266 findmnt
- 267 lsblk
- 268 blkid
- 269 mount | grep part6
- 270 tune2fs -L cow /dev/nvme0n1p5
- 271 mount LABEL=cow /mnt
- 272 vim /etc/fstab
- 273 fdisk /dev/nvme0n1
- 274 mkswap /dev/nvme0n1p6
- 275 free -m
- 276 vim /etc/fstab
- 277 swapon -a
- 278 free -m
- 279 history
- 280 dd if=/dev/zero of=/swapfile bs=1M count=1024
- 281 mkswap /swapfile
- 282 chmod 0600 /swapfile
- 283 vim /etc/fstab
- 284 swapon -a
- 285 free -m
- 286 cd
- 287 ./countdown 1
- 288 df -h
- 289 dd if=/dev/sr0 of=/rhel9.iso bs=1M
- 290 mkdir /repo
- 291 vim /etc/fstab
- 292 mount -a
- 293 ls /rhel9
- 294 ls /repo/
- 295 dnf install nmap
- 296 dnf config-manager -h | less
- 297 dnf config-manager --add-repo="file:///repo/BaseOS"
- 298 dnf config-manager --add-repo="file:///repo/AppStream"
- 299 dnf install nmap -y
- 300 cd /etc/yum.repos.d/
- 301 ls
- 302 vim repo_BaseOS.repo
- 303 vim repo_AppStream.repo
- 304 dnf install nmap -y
- 305 ssh student@192.168.29.147
- 306 history
- 307 cat repo_BaseOS.repo
- 308 cd
- 309 cat /etc/fstab
- 310 dnf list 'selinux*'
- 311 dnf search selinux
- 312 dnf provides */Containerfile
- 313 ls -l $(which dnf) $(which yum)
- 314 dnf groups list
- 315 dnf groups install "Virtualization Host"
- 316 dnf groups list hidden
- 317 history
- 318 dd if=/dev/nvme0n1 of=/dev/zero &
- 319 kill -USR1 37341
- 320 fg
- 321 dnf install -y git
- 322 git clone https://github.com/sandervanvugt/rhcsa
- 323 cd rhcsa/
- 324 ls
- 325 ./zombie
- 326 systemctl status httpd
- 327 exit
- 328 ./countdown 16 "setup repo server and client"
- 329 ./countdown 15 "tuned lab and coffee"
- 330 exit
- 331 systemctl cat httpd.service
- 332 systemctl show httpd.service
- 333 systemctl edit httpd.service
- 334 export EDITOR=/usr/bin/vim
- 335 systemctl edit httpd.service
- 336 systemctl cat httpd.service
- 337 systemctl daemon-reload
- 338 systemctl status httpd
- 339 kill -9 40478
- 340 systemctl status httpd
- 341 man -k systemd | less
- 342 man systemd.directives
- 343 man systemd.unit
- 344 ./countdown 13 "break and practice"
- 345 history
- 346 top
- 347 killall dd
- 348 top
- 349 dnf install nginx -y
- 350 systemctl mask httpd
- 351 systemctl unmask httpd
- 352 systemctl mask nginx
- 353 systemctl start nginx
- 354 systemctl status sshd
- 355 journalctl
- 356 journalctl -p err
- 357 journalctl -f
- 358 journalctl -u sshd.service
- 359 cd /var/log
- 360 ls
- 361 ls -l
- 362 grep 'Storage' /etc/systemd/journald.conf
- 363 ls -l /var/log/journal
- 364 mkdir /var/log/journal
- 365 ls /var/log/journal/
- 366 systemctl restart systemd-journal-flush.service
- 367 ls
- 368 ls journal/
- 369 lsblk
- 370 gdisk /dev/nvme0n2
- 371 pvcreate /dev/nvme0n2p1
- 372 pvs
- 373 vgcreate vgdata /dev/nvme0n2p1
- 374 pvs
- 375 vgs
- 376 vgdisplay
- 377 lvcreate -n lvdata -L 2G vgdata
- 378 lvcreate -n lvdata -l 100%FREE vgdata
- 379 lvs
- 380 mkfs.ext4 /dev/vgdata/lvdata
- 381 mkdir /lvdata
- 382 vim /etc/fstab
- 383 mount -a
- 384 mount
- 385 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 386 history
- 387 lsblk
- 388 gdisk /dev/nvme0n2
- 389 gdisk -l /dev/nvme0n2
- 390 cat /proc/partitions
- 391 partprobe
- 392 cat /proc/partitions
- 393 kpartx -a
- 394 kpartx -a /dev/nvme0n2
- 395 gdisk -l /dev/nvme0n2
- 396 cat /proc/partitions
- 397 reboot
- 398 cat /proc/partitions
- 399 lvs
- 400 df -h
- 401 vgs
- 402 vgextend vgdata /dev/nvme0n2p2
- 403 vgs
- 404 lvextend -r -l +50%FREE /dev/vgdata/lvdata
- 405 df -h
- 406 gdisk /dev/nvme0n2
- 407 poweroff
- 408 vim /etc/default/grub
- 409 grub2-mkconfig -o /boot/grub2/grub.cfg
- 410 systemctl isolate multi-user.target
- 411 man ifconfig
- 412 ./countdown 5 lab
- 413 ./countdown 12 break
- 414 getenforce
- 415 setenforce permissive
- 416 getenforce
- 417 setenforce enforcing
- 418 vim /etc/sysconfig/selinux
- 419 ls -Z /var/www
- 420 ps Zaux | grep http
- 421 ls -Z /var/www
- 422 mkdir /web
- 423 ls -dZ /web
- 424 vim /web/index.html
- 425 vim /etc/httpd/conf/httpd.conf
- 426 systemctl restart httpd
- 427 ps Zaux | grep http
- 428 curl localhost
- 429 curl http://localhost
- 430 vim /etc/hosts
- 431 curl server1
- 432 systemctl status httpd
- 433 systemctl stop firewalld
- 434 curl http://localhost
- 435 wget localhost
- 436 vim /etc/nsswitch.conf
- 437 curl localhost
- 438 wget http://localhost
- 439 wget server1.example.local
- 440 vim /etc/nsswitch.conf
- 441 curl localhost
- 442 getenforce
- 443 setenforce permissive
- 444 curl localhost
- 445 setenforce enforcing
- 446 grep AVC /var/log/audit/audit.log
- 447 ls -Z /var/www
- 448 man semanage-fcontext
- 449 semanage fcontext -a -t httpd_sys_content_t "/web(.*)?"
- 450 ls -dZ /web
- 451 restorecon -Rv /web
- 452 ls -dZ /web
- 453 getenforce
- 454 curl localhost
- 455 history
- 456 semenage fcontext -l
- 457 semanage fcontext -l
- 458 semanage fcontext -l | wc
- 459 dnf install -y selinux-policy-doc
- 460 man -k _selinux
- 461 man -k _selinux | wc
- 462 man -k _selinux | grep http
- 463 man httpd_selinux
- 464 vim /etc/httpd/conf/httpd.conf
- 465 systemctl restart httpd
- 466 systemctl status httpd
- 467 getenforce
- 468 setenforce permissive
- 469 systemctl restart httpd
- 470 setenforce enforcing
- 471 grep AVC /var/log/audit/audit.log
- 472 man semanage-port
- 473 semanage port -a -t http_port_t -p tcp 82
- 474 getenforce
- 475 systemctl restart httpd
- 476 history
- 477 getsebool -a | grep ftp
- 478 setsebool -P ftpd_anon_write on
- 479 getsebool -a | grep ftp
- 480 journalctl | grep sealert
- 481 sealert -l eab70786-ae59-41b6-a0b7-dbdc4b9a65f4 | less
- 482 journalctl | grep sealert
- 483 sealert -l 7d174313-e63c-473a-86f0-2038acfa409b | less
- 484 history
- 485 mv /etc/hosts /web/
- 486 cp /web/hosts /etc/
- 487 ls -Z /web/hosts
- 488 curl http://localhost/hosts
- 489 curl http://localhost/hosts 82
- 490 vim /etc/httpd/conf/httpd.conf
- 491 systemctl restart httpd
- 492 curl http://localhost/hosts
- 493 getenforce
- 494 ls -Z /web/hosts
- 495 restorecon /web/hosts
- 496 ls -Z /web/hosts
- 497 dnf install stratis-cli
- 498 systemctl enable --now stratisd
- 499 gdisk /dev/nvme0n2
- 500 reboot
- 501 lsblk
- 502 df -h
- 503 vim /etc/fstab
- 504 systemctl disable stratis
- 505 systemctl disable stratisd
- 506 xxd /dev/nvme0n2p6 | less
- 507 dd if=/dev/zero of=/dev/nvme0n2p6 bs=1M count=10
- 508 dd if=/dev/zero of=/dev/nvme0n2p5 bs=1M count=10
- 509 reboot
- 510 ./countdown 5
- 511 vim /etc/hosts
- 512 showmount -e nfsserver
- 513 dnf install -y nfs-utils
- 514 showmount -e nfsserver
- 515 ./countdown 14 lab and nfs-server setup according to slide
- 516 mount nfsserver:/nfsdata /mnt
- 517 mount
- 518 umount /mnt
- 519 dnf install -y autofs
- 520 vim /etc/auto.master
- 521 vim /etc/auto.misc
- 522 vim /etc/auto.master
- 523 vim /etc/auto.nfsdata
- 524 systemctl enable --now autofs
- 525 mount
- 526 cd /data
- 527 ls
- 528 ls -a
- 529 cd files
- 530 mount
- 531 touch here
- 532 vim /etc/auto.master
- 533 vim /etc/auto.ldap
- 534 systemctl restart autofs
- 535 cd /home/ldap/
- 536 ls -a
- 537 cd ldapuser1
- 538 cd ../
- 539 ls
- 540 cd ldapuser7
- 541 history
- 542 cat /etc/auto.ldap
- 543 grep home /etc/auto.master
- 544 reboot
- 545 history
- 546 systemctl status firewalld
- 547 firewall-cmd --list-all
- 548 firewall-cmd --get-services
- 549 firewall-cmd --add-service http
- 550 firewall-cmd --add-service http --permanent
- 551 firewall-cmd --list-all
- 552 ls /usr/lib/firewalld/services/
- 553 cp /usr/lib/firewalld/services/http.xml /etc/firewalld/services/sander.xml
- 554 vim /etc/firewalld/services/sander.xml
- 555 firewall-cmd --get-services
- 556 systemctl restart firewalld
- 557 firewall-cmd --get-services
- 558 firewall-cmd --add-service sander
- 559 firewall-cmd --add-service sander --permanent
- 560 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement