Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@rhcsa1 ~]# history
- 1 free -m
- 2 lscpu
- 3 df -h
- 4 lsblk
- 5 vim countdown
- 6 chmod +x countdown
- 7 ./countdown 14
- 8 ./countdown 14 lab
- 9 tar -czvf /root/archive.tgz /etc
- 10 ls -l
- 11 file archive.tgz
- 12 tar -tvf archive.tgz
- 13 tar -czvf /root/archive.tgz /etc/
- 14 tar -tvf archive.tgz
- 15 tar -czvf /root/archive.tgz /etc/*
- 16 tar -tvf archive.tgz
- 17 rm archive.tgz
- 18 tar -czvf /root/archive.tgz /etc/*
- 19 tar -tvf archive.tgz
- 20 cd /etc
- 21 tar -czvf /root/archive.tgz .
- 22 tar -tvf /root/archive.tgz
- 23 cd
- 24 rm archive.tgz
- 25 tar -czvf /root/archive.tgz -C /etc
- 26 tar -czvf /root/archive.tgz -C /etc .
- 27 history
- 28 grep -v '^$' /etc/dnsmasq.conf
- 29 grep -v '^$' /etc/dnsmasq.conf | sort
- 30 history
- 31 useradd bob
- 32 find / -type f -user bob
- 33 mkdir /root/userfiles ; find / -type f -user bob -exec cp {} /root/userfiles/ \;
- 34 history
- 35 mkdir /root/userfiles ; find / -type f -user bob -exec cp {} /root/userfiles/ \; 2> errors.txt
- 36 cat errors.txt
- 37 uname -r
- 38 visudo
- 39 useradd linda
- 40 echo password | passwd --stdin linda
- 41 visudo
- 42 which useradd
- 43 which userdel
- 44 which passwd
- 45 su - linda
- 46 visudo
- 47 su - linda
- 48 visudo
- 49 id student
- 50 exit
- 51 visudo
- 52 history
- 53 man -k sander
- 54 touch hello
- 55 locate hello
- 56 updatedb
- 57 locate hello
- 58 touch goedemiddag
- 59 locate goedemiddag
- 60 less /etc/passwd
- 61 vim /etc/login.defs
- 62 useradd --help | less
- 63 cd /etc/skel/
- 64 touch lijk
- 65 useradd anna
- 66 ls -al /home/anna
- 67 tail /etc/passwd
- 68 ls -l /etc/passwd
- 69 tail /etc/shadow
- 70 man 5 shadow
- 71 cd
- 72 grep anna /etc/passwd
- 73 grep 1004 /etc/group
- 74 groupadd profs
- 75 usermod -aG profs anna
- 76 grep anna /etc/passwd
- 77 grep anna /etc/group
- 78 id anna
- 79 lid -g wheel
- 80 history
- 81 vim /etc/login.defs
- 82 cd /etc/skel
- 83 touch newfile
- 84 groupadd profs
- 85 groupadd students
- 86 useradd -G profs anna
- 87 usermod -aG profs anna
- 88 usermod -aG profs linda
- 89 usermod -aG students lisa
- 90 usermod -aG students linda
- 91 useradd -G profs anouk
- 92 vim /etc/group
- 93 for i in anna anouk linda lisa; do echo password | passwd --stdin $i; done
- 94 history
- 95 su - linda
- 96 ls -l /tmp/linda1
- 97 id linda
- 98 su - linda
- 99 chmod 077 /tmp/linda1
- 100 su - linda
- 101 mkdir -p /data/specials
- 102 chgrp sales /data/specials
- 103 chgrp student /data/specials
- 104 ls -ld /data/specials/
- 105 chmod g+w /data/specials
- 106 chmod g-w /data/specials
- 107 mkdir /data/specials/dir{1-9}
- 108 touch /data/specials/file{1-9}
- 109 ls -l /data/specials/
- 110 touch /data/specials/file[1-9]
- 111 ls -l /data/specials/
- 112 cd /data/specials/*
- 113 rm -fr /data/specials/*
- 114 touch /data/specials/file{1..9}
- 115 mkdir /data/specials/dir{1..}
- 116 ls -l /data/specials/
- 117 mkdir /data/specials/dir{1..9}
- 118 ls -l /data/specials/
- 119 chgrp students /data/specials/ -R
- 120 ls -l /data/specials/
- 121 chmod -R +w /data/specials/
- 122 chmod -R -x /data/specials/
- 123 ls -l /data/specials/
- 124 chmod -R +x /data/specials/
- 125 ls -l /data/specials/
- 126 chmod -R -x /data/specials/
- 127 chmod -R +X /data/specials/
- 128 ls -l /data/specials/
- 129 mkdir -p /data/profs /data/students
- 130 ls -l /data/
- 131 chown :profs /data/profs
- 132 chgrp student /data/students
- 133 ls -l /data/
- 134 chmod 770 /data/*
- 135 ls -k
- 136 ls -l
- 137 ls -l /data
- 138 chmod g+w,o-rx /data/profs
- 139 cd
- 140 touch /home/linda/rootfile
- 141 su - linda
- 142 touch /home/linda/stuck
- 143 chattr +i /home/linda/stuck
- 144 rm -f /home/linda/stuck
- 145 chattr -i /home/linda/stuck
- 146 su - anna
- 147 chmod g+s /data/profs
- 148 ls -ld /data/profs
- 149 su - anna
- 150 su - anouk
- 151 chmod +t /data/profs
- 152 su - anouk
- 153 chmod o+x /data/profs
- 154 ls -ld /data/profs
- 155 history
- 156 umask
- 157 su - linda
- 158 su - lisa
- 159 cd /data
- 160 ls -,
- 161 ls -l
- 162 chmod 3770 *
- 163 ls -l
- 164 chattr +i students/
- 165 cd students/
- 166 ls
- 167 touch student1
- 168 echo hello > hello
- 169 exit
- 170 ./countdown 12
- 171 ./countdown 1
- 172 ./countdown 15
- 173 ./countdown 13
- 174 chattr -i /data/students/
- 175 poweroff
- 176 lsblk
- 177 fdisk /dev/sda
- 178 lsblk
- 179 mount /dev/sda3 /mnt
- 180 mkfs.ext4 /dev/sda3
- 181 mount /dev/sda3 /mnt
- 182 cd /mnt
- 183 ls
- 184 cp /etc/hosts .
- 185 history
- 186 cd
- 187 lsblk
- 188 mount
- 189 findmnt
- 190 lsblk
- 191 cd .mnt
- 192 cd /mnt
- 193 umount /dev/sda3
- 194 lsof /mnt
- 195 cd
- 196 fdisk /dev/sda
- 197 cat /proc/partitions
- 198 lsblk
- 199 mkfs.ext4 /dev/sda5
- 200 mkfs.xfs /dev/sda6
- 201 mkdir /ext4 /xfs
- 202 vim /etc/fstab
- 203 mount -a
- 204 mount
- 205 lsblk
- 206 reboot
- 207 lsblk
- 208 vim /etc/default/grub
- 209 grub2-mkconfig -o /boot/grub2/grub.cfg
- 210 vim /etc/default/grub
- 211 cat /etc/redhat-release
- 212 findmnt --help
- 213 cat /etc/redhat-release
- 214 man fstab
- 215 history
- 216 umount /dev/sda5
- 217 vim /etc/fstab
- 218 fdisk /dev/sda
- 219 reboot
- 220 lsblk
- 221 cat /etc/fstab
- 222 blkid
- 223 blkid | awk '/sda5/ { print $2 }'
- 224 blkid | awk '/sda5/ { print $2 }' >> /etc/fstab
- 225 vim /etc/fstab
- 226 reboot
- 227 history
- 228 tune2fs --help
- 229 mount | grep ext
- 230 xfs_admin --help
- 231 xfs_admin -L data /dev/sda5
- 232 umount /dev/sda5
- 233 xfs_admin -L data /dev/sda5
- 234 vim /etc/fstab
- 235 grep LABEL /etc/fstab
- 236 mount -a
- 237 blkid
- 238 free -m
- 239 reboot
- 240 free -m
- 241 grep -i active /proc/meminfo
- 242 free -m
- 243 fdisk /dev/sda
- 244 mkswap /dev/sda6
- 245 blkid
- 246 blkid | awk '/sda6/ { print $2 }'
- 247 blkid | awk '/sda6/ { print $2 }' >> /etc/fstab
- 248 vim /etc/fstab
- 249 free -m
- 250 swapon -a
- 251 free -m
- 252 reboot
- 253 fdisk -l /dev/sda
- 254 xxd -l 512 /dev/sda
- 255 history
- 256 dnf install nmap
- 257 ls -l $(which dnf) $(which yum)
- 258 df -h
- 259 dd if=/dev/sr0 of=/rhel9.iso bs=1M
- 260 mkdir /repo
- 261 echo "/rhel9.iso /repo iso9660 defaults 0 0" >> /etc/fstab
- 262 cat /etc/fstab
- 263 vim /etc/fstab
- 264 mount -a
- 265 mount
- 266 cd /repo
- 267 ls
- 268 ls BaseOS/
- 269 dnf config-manager --add-repo="file:///repo/BaseOS"
- 270 dnf config-manager --add-repo="file:///repo/AppStream"
- 271 dnf repolist
- 272 dnf search nmap
- 273 dnf install nmap
- 274 cd /etc/yum.repos.d/
- 275 ls
- 276 vim repo_BaseOS.repo
- 277 vim repo_AppStream.repo
- 278 dnf install nmap
- 279 history
- 280 dnf list selinux*
- 281 dnf provides */Containerfile
- 282 cd ..
- 283 dnf provides */dnsmasq.conf
- 284 seinfo
- 285 dnf groups list
- 286 dnf goups install "Virtualization Host"
- 287 dnf groups install "Virtualization Host"
- 288 cat yum.repos.d/repo_BaseOS.repo
- 289 systemctl enable --now tuned
- 290 systemctl status tuned
- 291 tuned-adm list
- 292 sysctl -a
- 293 sysctl -a | wc -l
- 294 sysctl -a | grep swappi
- 295 echo vm.swappiness = 33 > /etc/sysctl.d/swappiness.conf
- 296 sysctl -p /etc/sysctl.d/swappiness.conf
- 297 sysctl -a | grep swappi
- 298 mkdir /etc/tune/myprofile
- 299 mkdir /etc/tuned/myprofile
- 300 vim /etc/tuned/myprofile/tuned.conf
- 301 tuned-adm list
- 302 vim /usr/lib/tuned/latency-performance/tuned.conf
- 303 tuned-adm profile myprofile
- 304 sysctl -a | grep swapp
- 305 vim /etc/tuned/tuned-main.conf
- 306 tuned-adm list
- 307 systemctl status tuned
- 308 tuned-adm profile hpc-compute
- 309 tuned-adm list
- 310 history
- 311 cd
- 312 ip a
- 313 ping nu.nl
- 314 ip route show
- 315 cat /etc/resolv.conf
- 316 systemctl status NetworkManager
- 317 nmtui
- 318 ip a
- 319 ping nu.nl
- 320 man nmcli-examples
- 321 dnf install -y git
- 322 git clone https://github.com/sandervanvugt/rhcsa
- 323 cd rhcsa
- 324 ls
- 325 cat resources.txt
- 326 reboot
- 327 hwclock
- 328 date
- 329 hwclock --systohc
- 330 date -s 17:46
- 331 timedatectl set-time -h
- 332 systemctl status chronyd.service
- 333 vim /etc/chrony.conf
- 334 systemctl restart chronyd
- 335 chronyc sources
- 336 systemctl status firewalld
- 337 firewall-cmd --list-all
- 338 firewall-cmd --get-services
- 339 firewall-cmd --add-service sane
- 340 firewall-cmd --list-all
- 341 firewall-cmd --add-service sane --permanent
- 342 history
- 343 systemctl -t help
- 344 systemctl list-unit-files
- 345 systemctl list-units
- 346 systemctl list-units -t socket
- 347 systemctl list-units -t service
- 348 systemctl status sshd
- 349 dnf install -y httpd
- 350 systemctl status httpd
- 351 systemctl start httpd
- 352 systemctl status httpd
- 353 systemctl enable httpd
- 354 systemcat httpd.service
- 355 systemctl cat httpd.service
- 356 systemctl show httpd.service
- 357 systemctl edit httpd.service
- 358 systemctl cat httpd.service
- 359 systemctl daemon-reload
- 360 systemctl restart httpd
- 361 killall httpd
- 362 systemctl status httpd
- 363 ls /etc/systemd/system/multi-user.target.wants/
- 364 systemctl disable --now httpd.service
- 365 ls /etc/systemd/system/multi-user.target.wants/
- 366 systemctl enable httpd.service
- 367 systemctl disable httpd.service
- 368 systemctl mask httpd.service
- 369 systemctl start httpd.service
- 370 systemctl unmask httpd.service
- 371 systemctl start httpd.service
- 372 journalctl
- 373 journalctl -p err
- 374 journalctl -f
- 375 journalctl -u sshd.service
- 376 journalctl -u sshd.service -p err
- 377 systemctl status rsyslog
- 378 vim /etc/rsyslog.conf
- 379 vim /etc/systemd/journald.conf
- 380 mkdir var/log/journal
- 381 mkdir /var/log/journal
- 382 ls /var/log
- 383 ls /var/log/journal/
- 384 systemctl restart systemd-journal-flush.service
- 385 ls /var/log/journal/
- 386 systemctl get-default
- 387 systemctl set-default multi-user.target
- 388 reboot
- 389 systemctl list-units
- 390 reboot
- 391 systemctl list-units
- 392 systemctl set-default graphical.target
- 393 systemctl start graphical.target
- 394 systemctl list-dependencies
- 395 mount | grep efi
- 396 systemctl cat httpd.service
- 397 history
- 398 poweroff
- 399 ./countdown 15
- 400 ./countdown 1
- 401 ./countdown 14
- 402 lsblk
- 403 fdisk /dev/nvme0n1
- 404 gdisk /dev/sda
- 405 lsblk
- 406 pvcreate /dev/nvme0n1p1
- 407 xxd /dev/nvme0n1p1 | less
- 408 vgcreate vgdata /dev/nvme0n1p1
- 409 vgdisplay vgdata
- 410 echo $(( 511 * 4 ))
- 411 vgs
- 412 lvcreate -n lvdata vgdata -L 2G
- 413 lvcreate -n lvdata vgdata -l 100%FREE
- 414 man lvcreate
- 415 blkid
- 416 mkfs.xfs /dev/vgdata/lvdata
- 417 mount /dev/vgdata/lvdata /mnt
- 418 mount
- 419 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 420 vim /etc/fstab
- 421 mount -a
- 422 mkdir /lvdata
- 423 mount -a
- 424 touch /lvdata/twice
- 425 ls /mnt
- 426 umount /mnt
- 427 dd if=/dev/random of=/lvdata/bigfile bs=1M
- 428 df -h
- 429 lvs
- 430 vgs
- 431 vgextend vgdata /dev/nvme0n1p2
- 432 vgs
- 433 lvextend --help | less
- 434 lvextend /dev/vgdata/lvdata -r -l +50%FREE
- 435 df -h
- 436 vgs
- 437 man lvcreate
- 438 vgcreate vgno /dev/sdc1 /dev/sdc2 /dev/sdc3
- 439 history
- 440 getenforce
- 441 setenforce permissive
- 442 getenforce
- 443 setenforce enforcing
- 444 ls -lZ /etc
- 445 ps Zaux | grep http
- 446 systemctl enable --now httpd
- 447 ps Zaux | grep http
- 448 ls -Z /var/www
- 449 ls -Zd /var/tmp
- 450 history
- 451 ls -lZ /etc
- 452 vim /etc/httpd/conf/httpd.conf
- 453 mkdir /web
- 454 echo hello world > /web/index.html
- 455 systemctl restart httpd
- 456 curl localhost
- 457 getenforce
- 458 setenforce permissive
- 459 curl localhost
- 460 grep AVC /var/log/audit/audit.log
- 461 ls -Z /var/www
- 462 man semanage-fcontext
- 463 # semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 464 # restorecon -R -v /web
- 465 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 466 ls -Zd /web
- 467 restorecon -Rv /web
- 468 getenforce
- 469 setenforce enforcing
- 470 getenforce
- 471 curl localhost
- 472 history
- 473 man -k _selinux
- 474 dnf list selinux*
- 475 dnf install selinux-policy-doc
- 476 man -k _selinux
- 477 man -k _selinux | wc -l
- 478 man -k _selinux | grep http
- 479 man httpd_selinux
- 480 ls -Z /etc/hosts
- 481 cp /etc/hosts .
- 482 ls -Z /etc/hosts hosts
- 483 rm /etc/hosts
- 484 mv hosts /etc/
- 485 ls -Z /etc/hosts
- 486 restorecon -v /etc/hosts
- 487 vim /etc/httpd/conf/httpd.conf
- 488 systemctl restart httpd
- 489 systemctl status httpd
- 490 setenforce permissive
- 491 systemctl restart httpd
- 492 grep AVC /var/log/audit/audit.log
- 493 journalctl | grep sealert
- 494 sealert -l 85bc3c26-5dde-4ad3-9ccc-75a0e318ea45 | less
- 495 # semanage port -a -t PORT_TYPE -p tcp 82
- 496 semanage port -a -t http_port_t -p tcp 82
- 497 setenforce enforcing
- 498 systemctl restart httpd
- 499 man semanage-port
- 500 journalctl | grep sealert
- 501 sealert -l d8aed78c-3297-47b7-99eb-7d1a768f880d | less
- 502 semanage port -l
- 503 semanage port -l | grep http
- 504 semanage port -l | grep 80
- 505 man httpd_selinux
- 506 vim /usr/lib/firewalld/services/http.xml
- 507 vim /usr/lib/firewalld/services/ftp.xml
- 508 vim /usr/lib/firewalld/services/http.xml
- 509 getsebool -a
- 510 getsebool -a | wc -l
- 511 semanage fcontext -l | wc -l
- 512 getsebool -a | grep ftp
- 513 setsebool -P ftpd_anon_write on
- 514 reboot
- 515 history
- 516 vim /etc/hosts
- 517 ping -c 1 nfsserver
- 518 showmount -e nfsserver
- 519 mount nfsserver:/nfsshare /mnt
- 520 mount nfsserver:/nfsdata
- 521 mount nfsserver:/nfsdata /mnt
- 522 mount
- 523 umount /mnt
- 524 dnf install autofs
- 525 vim /etc/auto.master
- 526 vim /etc/auto.misc
- 527 vim /etc/auto.master
- 528 vim /etc/auto.nfsdata
- 529 systemctl enable --now autofs
- 530 ls /
- 531 cd /nfsdata
- 532 ls -a
- 533 cd files
- 534 mount
- 535 cd ..
- 536 vim /etc/auto.master
- 537 vim /etc/auto.ldap
- 538 systemctl restart autofs
- 539 cd /home/
- 540 l
- 541 ls
- 542 cd ldap
- 543 cd ldapuser1
- 544 cd ..
- 545 cd whoever
- 546 cd
- 547 mount
- 548 vim /etc/fstab
- 549 systemctl list-units -t timer
- 550 systemctl list-units | grep logrotate
- 551 systemctl status logrotate.service
- 552 systemctl status logrotate.timer
- 553 systemctl cat logrotate.timer
- 554 dnf install -y sysstat
- 555 systemctl list-unit-files sysstat.*
- 556 systemctl cat sysstat-collect.timer
- 557 systemctl cat sysstat-collect.service
- 558 man -k systemd | wc -l
- 559 man systemd.directives
- 560 man systemd-time
- 561 man -k time
- 562 man -k time | grep systemd
- 563 man systemd.time
- 564 systemctl daemon-reload
- 565 cd rhcsa/
- 566 ls
- 567 ls -d /etc/cron*
- 568 ls /etc/cron.d/
- 569 vim /etc/crontab
- 570 su - anna
- 571 journalctl
- 572 history
- 573 vim /etc/containers/registries.conf
- 574 podman
- 575 rpm -qa | grep container
- 576 pwd
- 577 ls
- 578 podman info
- 579 podman images
- 580 podman pull nginx
- 581 podman images
- 582 ls
- 583 vim Containerfile
- 584 podman build -t mymap .
- 585 podman images
- 586 podman run localhost/mymap
- 587 cat /etc/containers/registries.conf
- 588 less /etc/containers/registries.conf
- 589 podman login registry.redhat.io
- 590 podman run localhost/mymap:latest
- 591 podman run localhost/mymap:latest echo hello
- 592 podman run ubi8
- 593 podman run ubi8 env
- 594 podman run ubi8 echo hello from $HOSTNAME
- 595 podman search mariadb
- 596 podman inspect localhost/mymap:latest | less
- 597 podman ps
- 598 podman search ubi
- 599 podman run --name sleepy docker.io/redhat/ubi9 sleep 3600
- 600 podman ps
- 601 podman ps -a
- 602 podman run -d --name sleepy docker.io/redhat/ubi9 sleep
- 603 podman rm sleepy
- 604 podman run --name=ghost busybox
- 605 podman images
- 606 podman ps
- 607 podman ps -a
- 608 podman inspect 2b87 | less
- 609 podman run --name=ghost -it busybox
- 610 podman run -it busybox
- 611 podman ps
- 612 podman attach ccc
- 613 podman ps
- 614 dnf install container-tools
- 615 podman run --name mydb quay.io/centos7/mariadb-103-centos7
- 616 podman ps
- 617 podman ps -a
- 618 podman logs mydb
- 619 skopeo inspect docker://quay.io/centos7/mariadb-103-centos7
- 620 podman rm mydb
- 621 podman run --name mydb -e MYSQL_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
- 622 history
- 623 exit
- 624 podman ps
- 625 find / -name "3ce23*"
- 626 podman stop sleepy
- 627 podman ps
- 628 podman kill mydb
- 629 podman ps -a
- 630 for i in podman ps -a | awk '{ print $1 }'; do echo $i; done
- 631 for i in $(podman ps -a | awk '{ print $1 }'); do echo $i; done
- 632 for i in $(podman ps -a | awk '{ print $1 }'); do podman rm $i; done
- 633 podman ps -a
- 634 df -h
- 635 podman rmi -a
- 636 ./countdown 27
- 637 vim /etc/httpd/conf/httpd.conf
- 638 man semanage-port
- 639 semanage port -a -t http_port_t -p tcp 81
- 640 semanage port -m -t http_port_t -p tcp 81
- 641 useradd --help | less
- 642 useradd lori -s /sbin/nologin
- 643 cd /etc
- 644 grep -l strator
- 645 grep -l strator *
- 646 grep -lR strator *
- 647 find /etc -exec grep "strator" \;
- 648 find /etc -exec grep "strator" {} \;
- 649 find /etc -type f -exec grep "strator" {} \; 2>/dev/null
- 650 find /etc -type f -exec grep -l "strator" {} \; 2>/dev/null
- 651 ln -s /etc/hosts /tmp/hosts
- 652 ls -l /etc/hosts /tmp/hosts
- 653 groupadd sales
- 654 mkdir /data/sales
- 655 chgrp /data/sales
- 656 chgrp sales /data/sales
- 657 chmod 2770 /data/sales
- 658 ls -ld /data/sales
- 659 cd /data/sales
- 660 touch any
- 661 ls -l,
- 662 ls -l
- 663 vgs
- 664 lvcreate -n fifty -l 50 vgdata
- 665 lvs
- 666 tuned-adm --help | less
- 667 tuned-adm recommend
- 668 tuned-adm profile virtual-guest
- 669 tuned-adm profiles
- 670 tuned-adm profile
- 671 cd
- 672 cd rhcsa/
- 673 ls
- 674 git pull
- 675 less resources.txt | less
- 676 history
- 677 exit
- 678 ps faux | less
- 679 cd rhcsa
- 680 ls
- 681 less mini-exam-30min.txt
- 682 exit
- 683 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement