Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 ls
- 2 exit
- 3 tar cvzf archive.tgz /etc
- 4 tar tvf archive.tgz
- 5 history
- 6 grep -v '^$' /etc/dnsmasq.conf
- 7 grep -v '^$' /etc/dnsmasq.conf | sort
- 8 grep -v '^$' /etc/dnsmasq.conf | sort > /var/tmp/dnslines.txt
- 9 useradd bob
- 10 find / -user bob
- 11 find / -user bob -type f
- 12 mkdir /root/userfiles; find / -user bob -type f -exec cp {} /root/userfiles/ \;
- 13 ls -al /root/userfiles/
- 14 history
- 15 ls -ld /etc/sudo*
- 16 visudo
- 17 vim /etc/sudoers.d/bob
- 18 tail -1 /etc/passwd
- 19 su - bob
- 20 passwd bob
- 21 su - bob
- 22 cat /etc/sudoers.d/bob
- 23 id student
- 24 history
- 25 visudo
- 26 exit
- 27 history
- 28 su - lisa
- 29 grep lisa /etc/sudoers
- 30 cat /etc/passwd
- 31 head /etc/passwd
- 32 useradd --help | less
- 33 useradd bill -p password
- 34 tail -1 /etc/shadow
- 35 tail -5 /etc/shadow
- 36 echo password | passwd --stdin bill
- 37 tail -5 /etc/shadow
- 38 vim /etc/login.defs
- 39 useradd -p password peter
- 40 su - student
- 41 cd /etc/skel/
- 42 ls -a
- 43 touch hellefile
- 44 useradd bea
- 45 ls -l /home/bea
- 46 ls -al /home/bea
- 47 id lisa
- 48 id student
- 49 groupadd sales
- 50 usermod -aG sales lisa
- 51 usermod --help
- 52 usermod -G wheel lisa
- 53 id lisa
- 54 usermod -aG sales lisa
- 55 id lisa
- 56 exit
- 57 chage --help
- 58 chage -l lisa
- 59 chage -M 99 lisa
- 60 chage -l lisa
- 61 chage lisa
- 62 /home/student/countdown 15
- 63 vim /etc/login.defs
- 64 cd /etc/skel/
- 65 touch newfile
- 66 vim /etc/default/useradd
- 67 for i in anna anouk lisa linda; do useradd $i; done
- 68 for i in anna anouk lisa linda; do echo password | passwd --stdin $i; done
- 69 groupadd profs
- 70 groupadd students
- 71 usermod -aG profs anouk
- 72 usermod -aG profs anna
- 73 usermod -aG students linda
- 74 usermod -aG students lisa
- 75 ls -l /etc/hosts
- 76 cd /tmp
- 77 echo hello > hellofile
- 78 chown linda hellofile
- 79 chmod 077 hellofile
- 80 ls -l hellofile
- 81 su - linda
- 82 cd
- 83 cd /home/linda
- 84 touch lindafile
- 85 ls -l lindafile
- 86 echo linda > lindafile
- 87 su - linda
- 88 ls -l
- 89 chmod 640 lindafile
- 90 su - linda
- 91 cd
- 92 cd /tmp
- 93 mkdir testdir
- 94 touch testdir/file{1..10}
- 95 ls -l testdir/
- 96 chmod --helo
- 97 chmod --hel
- 98 chmod -R +x testdir/
- 99 ls -l testdir/
- 100 chmod -R -x testdir/
- 101 mkdir testdir/subdir
- 102 chmod -R +X testdir/
- 103 ls -ld testdir/
- 104 ls -l testdir/
- 105 cd
- 106 mkdir -p /data/profs /data/students
- 107 ls -l /data
- 108 chown :profs /data/profs
- 109 ls -l /data
- 110 chgrp students /data/students
- 111 ls -l /data
- 112 chmod 770 /data/students
- 113 ls -l /data
- 114 chmod g+w,o-rx /data/profs
- 115 ls -l /data
- 116 su - anna
- 117 chmod g+s /data/profs
- 118 ls -l /data
- 119 su - anna
- 120 su - anouk
- 121 chmod +t /data/profs
- 122 ls -l /data
- 123 su - anouk
- 124 umask
- 125 /home/student/countdown 15
- 126 mkdir -p /data/students /data/profs
- 127 ls /data
- 128 cd /data
- 129 chmod 770 *
- 130 ls -l
- 131 umask
- 132 cd profs
- 133 umask 002
- 134 touch rootfile
- 135 ls -l rootfile
- 136 lsblk
- 137 poweroff
- 138 vim /etc/fstab
- 139 fdisk -l
- 140 touch ff
- 141 mount -o remount,rw /
- 142 touch ff
- 143 vim /etc/fstab
- 144 blkid
- 145 blkid | grep sda5 | awk '{ print $2 '}
- 146 blkid | awk '/sda5/ { print $2 '}
- 147 blkid | awk '/sda5/ { print $2 '} >> /etc/fstab
- 148 vim /etc/fstab
- 149 reboot
- 150 blkid
- 151 history
- 152 xxd -l 512 /dev/sda
- 153 cat /etc/fstab
- 154 blkid
- 155 df -h
- 156 xfs_admin -L kona /dev/sda5
- 157 umount /dev/sda5
- 158 xfs_admin -L kona /dev/sda5
- 159 vim /etc/fstab
- 160 ln /home/student/countdown /usr/local/bin/countdown
- 161 ln /home/student/countdown /usr/local/sbin/countdown
- 162 history
- 163 free -m
- 164 fdisk /dev/sda
- 165 lsblk
- 166 mkswap /dev/sda6
- 167 vim /etc/fstab
- 168 swapon -a
- 169 free -m
- 170 dd if=/dev/zero of=/swapfile bs=1M count=1024
- 171 mkswap /swapfile
- 172 chmod 600 /swapfile
- 173 swapon /swapfile
- 174 free -m
- 175 history
- 176 df -h
- 177 dd if=/dev/sr0 of=/rhel9.iso bs=1M
- 178 mkdir /repo
- 179 vim /etc/fstab
- 180 mount -a
- 181 mount
- 182 ls /repo
- 183 ls /repo/BaseOS
- 184 history
- 185 tail -1 /etc/fstab
- 186 df -h
- 187 countdown 1
- 188 dd if=/dev/sr0 of=/dummy
- 189 history
- 190 ls /repo
- 191 dnf config-manager --add-repo="file:///repo/BaseOS"
- 192 dnf config-manager --add-repo="file:///repo/AppStream"
- 193 cd /etc/yum.repos.d/
- 194 ls
- 195 vim repo_BaseOS.repo
- 196 cd
- 197 dnf repolist
- 198 dnf search nmap
- 199 dnf install nmap
- 200 vim /etc/yum.repos.d/repo_BaseOS.repo
- 201 vim /etc/yum.repos.d/repo_AppStream.repo
- 202 dnf install nmap
- 203 history
- 204 cat /etc/yum.repos.d/repo_BaseOS.repo
- 205 ls /repo
- 206 cd /etc/yum.repos.d/
- 207 vim repo_BaseOS.repo
- 208 dnf list 'selinux*'
- 209 dnf provides */seinfo
- 210 seinfo
- 211 dnf provides */Containerfile
- 212 dnf group list
- 213 dnf module list
- 214 dnf module info nginx
- 215 cd
- 216 top
- 217 dd if=/dev/zero of=/dev/null &
- 218 top
- 219 echo 0 > /sys/bus/cpu/devices/cpu1/online
- 220 top
- 221 echo 1 > /sys/bus/cpu/devices/cpu1/online
- 222 top
- 223 killall dd
- 224 cat /proc/sys/vm/swappiness
- 225 echo 40 > /proc/sys/vm/swappiness
- 226 cat /proc/sys/vm/swappiness
- 227 sysctl -a | grep swapp
- 228 vim /etc/sysctl.d/swappi.conf
- 229 tuned-adm list
- 230 ls /usr/lib/tuned/
- 231 ls /usr/lib/tuned/virtual-guest/tuned.conf
- 232 cat /usr/lib/tuned/virtual-guest/tuned.conf
- 233 tuned-adm profile powersav e
- 234 tuned-adm profile powersave
- 235 tuned-adm list
- 236 countdown 13
- 237 systemctl status NetworkManager
- 238 ip addr show
- 239 nmtui
- 240 ip a
- 241 nmtui
- 242 exit
- 243 hostnamectl status
- 244 reboot
- 245 exit
- 246 timedatectl status
- 247 timedatectl set-time 17:48
- 248 date -s 17:48
- 249 systemctl status chronyd
- 250 vim /etc/chrony.conf
- 251 systemctl restart chronyd
- 252 chronyc sources
- 253 history
- 254 systemctl -t help
- 255 systemctl list-units -t service
- 256 systemctl cat rsyslog.service
- 257 systemctl status sshd.service
- 258 systemctl status sshd
- 259 systemctl disable --now sshd
- 260 systemctl status sshd
- 261 systemctl enable --now sshd
- 262 systemctl status sshd
- 263 kill -9 6928
- 264 systemctl status sshd
- 265 systemctl cat sshd
- 266 systemctl status sshd
- 267 history
- 268 dnf install vsftpd
- 269 systemctl cat vsftpd
- 270 systemctl cat sshd
- 271 systemctl cat vsftpd
- 272 systemctl edit vsftpd.service
- 273 systemctl cat vsftpd
- 274 systemctl edit vsftpd.service
- 275 systemctl cat vsftpd
- 276 systemctl status vsftpd
- 277 systemctl enable --now vsftpd
- 278 systemctl status vsftpd
- 279 kill -9 7244
- 280 kill -9 7245
- 281 systemctl status vsftpd
- 282 systemctl cat vsftpd
- 283 history
- 284 systemctl show vsftpd
- 285 man -k systemd
- 286 man -k systemd | wc -l
- 287 man systemd.directives
- 288 man systemd.resource-control
- 289 systemctl disable --now vsftpd
- 290 systemctl mask vsftpd
- 291 systemctl start vsftpd
- 292 journalctl
- 293 journalctl -p err
- 294 journalctl -u sshd
- 295 journalctl -xb
- 296 journalctl -f
- 297 dmesg
- 298 systemctl status sshd
- 299 systemctl status sshd -l
- 300 journalctl -u sshd
- 301 grep Storage /etc/systemd/journald.conf
- 302 mkdir /var/log/journal
- 303 ls -l /var/log/journal/
- 304 systemctl restart systemd-journal-flush.service
- 305 ls -l /var/log/journal/
- 306 history
- 307 lsblk
- 308 gdisk /dev/sdb
- 309 lsblk
- 310 pvcreate /dev/sdb1
- 311 pvs
- 312 vgcreate vgdata /dev/sdb1
- 313 vgs
- 314 lvcreate -n lvdata -L 1G vgdata
- 315 lvcreate -n lvdata -l 100%FREE vgdata
- 316 mkfs.ext4 /dev/vgdata/lvdata
- 317 vim /etc/fstab
- 318 mkdir /lvdata
- 319 mount -a
- 320 history
- 321 tail -1 /etc/fstab
- 322 mount
- 323 tail -1 /etc/fstab
- 324 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvadata
- 325 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 326 gdisk -l /dev/sdb
- 327 fdisk /dev/sda
- 328 lsblk
- 329 vgcreate vgfiles /dev/sda9
- 330 lvcreate -l 255 -n lvfiles /dev/vgfiles
- 331 mkfs.ext4 /dev/vgfiles/lvfiles
- 332 mount /dev/vgfiles/lvfiles /mnt
- 333 df -h
- 334 vgs
- 335 vgextend vgfiles /dev/sdb2
- 336 vgs
- 337 df -h
- 338 lvs
- 339 lvextend -l +50%FREE /dev/vgfiles/lvfiles
- 340 lvs
- 341 df -h
- 342 resize2fs /dev/vgfiles/lvfiles
- 343 df -h
- 344 lvextend -r -v -l +50%FREE /dev/vgfiles/lvfiles
- 345 df -h
- 346 lvextend -r -L -1G /dev/vgfiles/lvfiles
- 347 lvreduce -r -L -1G /dev/vgfiles/lvfiles
- 348 history
- 349 lvextend --size 500M -r /dev/vgfiles/lvfiles
- 350 lvextend --size +500M -r /dev/vgfiles/lvfiles
- 351 vim /boot/grub2/grub.cfg
- 352 vim /etc/default/grub
- 353 grub2-mkconfig -o /boot/grub2/grub.cfg
- 354 reboot
- 355 systemctl get-default
- 356 systemctl set-default multi-user.target
- 357 systemctl get-default
- 358 systemctl set-default graphical.target
- 359 systemctl list-units -t target
- 360 systemctl cat bluetooth.target
- 361 systemctl cat graphical.target
- 362 history
- 363 getenforce
- 364 dnf install -y httpd
- 365 systemctl start httpd
- 366 ps Zaux | grep http
- 367 ls -Z /var/www
- 368 vim /etc/httpd/conf/httpd.conf
- 369 mkdir /web
- 370 vim /web/index.html
- 371 ls -ldZ /web
- 372 systemctl restart httpd
- 373 curl localhost
- 374 setenforce permissive
- 375 curl localhost
- 376 vim /etc/httpd/conf/httpd.conf
- 377 systemctl restart httpd
- 378 curl localhost
- 379 getenforce
- 380 setenforce enforcing
- 381 curl localhost
- 382 grep AVC /var/log/audit/audit.log
- 383 history
- 384 ps Zaux | less
- 385 ls -Zd /web
- 386 ls -Zd /var/www/html/
- 387 man semanage-fcontext
- 388 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 389 ls -Zd /web
- 390 restorecon -Rv /web
- 391 getenforce
- 392 curl localhost
- 393 history
- 394 man -k _selinux
- 395 dnf install -y selinux-policy-doc
- 396 man -k _selinux
- 397 man -k _selinux | grep http
- 398 man httpd_selinux
- 399 vim /etc/httpd/conf/httpd.conf
- 400 systemctl restart httpd
- 401 grep AVC /var/log/audit/audit.log
- 402 man httpd_selinux
- 403 man semanage-port
- 404 semanage port -a -t http_port_t -p tcp 82
- 405 systemctl restart httpd
- 406 getsebool -a | wc
- 407 getsebool -a | grep http
- 408 setsebool -P httpd_enable_homedirs on
- 409 semanage boolean -l -C
- 410 semanage fcontext -l -C
- 411 semanage port -l -C
- 412 dnf provides */sealert
- 413 journalctl | grep sealert
- 414 sealert -l b2868c7a-5f63-475e-ba90-cc2ca5ac502b | less
- 415 sealert -l ab0a8163-d944-4edc-bb26-a49240b62054 | less
- 416 history
- 417 mv /etc/hosts /var/www/html/
- 418 ls -Z /var/www/html/
- 419 restorecon -Rv /var/www/html
- 420 history
- 421 ssh student@192.168.29.152
- 422 dnf install -y nfs-utils
- 423 dnf list nfs*
- 424 showmount -e 192.168.29.152
- 425 mount 192.168.29.152:/nfsdata /mnt
- 426 mount
- 427 dnf install -y autofs
- 428 vim /etc/hosts
- 429 cp /var/www/html/hosts /etc/
- 430 ls -Z /etc/hosts
- 431 vim /etc/hosts
- 432 showmount -e nfsserver
- 433 vim /etc/auto.master
- 434 vim /etc/auto.nfsfiles
- 435 systemctl enable --now autofs
- 436 mount
- 437 cd /nfsfiles/
- 438 ls -a
- 439 cd files
- 440 mount
- 441 history
- 442 grep nfsfiles /etc/auto.master
- 443 cat /etc/auto.nfsfiles
- 444 vim /etc/auto.master
- 445 vim /etc/auto.ldap
- 446 systemctl restart autofs
- 447 cd /home/ldap
- 448 ls -a
- 449 cd ldapuser1
- 450 cd ../ldapuser2
- 451 cd ..
- 452 ls
- 453 history
- 454 systemctl status firewalld
- 455 firewall-cmd --list-all
- 456 ls /usr/lib/firewalld/services/
- 457 cat /usr/lib/firewalld/services/http.xml
- 458 cp /usr/lib/firewalld/services/http.xml /etc/firewalld/services/sander.xml
- 459 firewall-cmd --get-services | grep sander
- 460 systemctl restart firewalld
- 461 firewall-cmd --get-services | grep sander
- 462 firewall-cmd --add-service http
- 463 firewall-cmd --add-service http --permanent
- 464 history
- 465 systemctl list-units -t timer
- 466 systemctl list-unit-files logro*
- 467 systemctl cat logrotate.timer
- 468 systemctl status logrotate.timer
- 469 systemctl status logrotate.service
- 470 dnf install -y sysstat
- 471 systemctl list-unit-files sysstat*
- 472 systemctl cat sysstat-collect.timer
- 473 cd
- 474 git clone https://github.com/sandervanvugt/rhcsa
- 475 dnf install -y git
- 476 git clone https://github.com/sandervanvugt/rhcsa
- 477 cd rhcsa/
- 478 ls
- 479 cd
- 480 su - linda
- 481 vim /etc/crontab
- 482 countdown 12
- 483 vim /etc/containers/registries.conf
- 484 podman run nginx
- 485 podman run docker.io/library/nginx
- 486 podman run -d docker.io/library/nginx
- 487 podman ps
- 488 cd rhcsa/
- 489 dnf install -y container-tools
- 490 podman info
- 491 podman images
- 492 podman login registry.access.redhat.com
- 493 ls
- 494 vim Containerfile
- 495 podman build -t mymmap .
- 496 podman images
- 497 podman run localhost/mymmap:latest
- 498 podman run alpine
- 499 podman ps
- 500 podman ps -a
- 501 podman inspect 6522
- 502 podman inspect 6522 | less
- 503 podman images
- 504 podman inspect c1aa | less
- 505 podman search ubi
- 506 podman run --name sleepy docker.io/redhat/ubi9 sleep 3600
- 507 podman images
- 508 podman run -d --name sleepy docker.io/redhat/ubi9 sleep 3600
- 509 podman ps
- 510 podman ps -a
- 511 podman rm sleepy
- 512 podman run -d --name sleepy docker.io/redhat/ubi9 sleep 3600
- 513 podman exec -it sleepy sh
- 514 ./countdown 1
- 515 podman run docker.io/library/mariadb
- 516 podman ps
- 517 podman ps -a
- 518 podman logs amazing_bhaskara
- 519 podman run --name mydb -d -e MARIADB_ROOT_PASSWORD=password docker.io/library/mariadb
- 520 podman ps
- 521 ./countdown 12
- 522 exit
- 523 podman ps
- 524 podman stop sleepy
- 525 ps faux | less
- 526 cd rhcsa/
- 527 ls
- 528 less mini-exam-30min.txt
- 529 vim /etc/httpd/conf/httpd.conf
- 530 man semanage-port
- 531 less mini-exam-30min.txt
- 532 useradd --help
- 533 useradd lori -s /sbin/nologin
- 534 grep lori /etc/passwd
- 535 less mini-exam-30min.txt
- 536 mkdir /txt
- 537*
- 538 less mini-exam-30min.txt
- 539 ln -s /etc/hosts /tmp/hosts
- 540 ls -l /tmp/hosts
- 541 less mini-exam-30min.txt
- 542 mkdir -p /data/sales
- 543 groupadd sales
- 544 chgrp sales /data/sales
- 545 chmod 2770 /data/sales
- 546 ls -l /data/sales/
- 547 ls -ld /data/sales/
- 548 cd /data/sales
- 549 touch hello
- 550 ls -l
- 551 less mini-exam-30min.txt
- 552 cd
- 553 cd rhcsa/
- 554 less mini-exam-30min.txt
- 555 vgs
- 556 less mini-exam-30min.txt
- 557 lvcreate -l 50 lvextents
- 558 lvcreate -l 50 -n lvextents vgfiles
- 559 vgs
- 560 vgdisplay vgfiles
- 561 less mini-exam-30min.txt
- 562 systemctl status tuned
- 563 systemctl start tuned
- 564 systemctl status tuned
- 565 tuned-adm --help
- 566 tuned-adm recommend
- 567 tuned-adm profile virtual-guest
- 568 history
- STUDENT COMMANDS 39 podman login registry.access.redhat.com
- 40 podman run -d -p 80:80 registry.access.redhat.com/ubi9/nginx-120
- 41 podman run -d -p 8080:80 registry.access.redhat.com/ubi9/nginx-120
- 42 podman port -a
- 43 podman ps
- 44 podman ps -a
- 45 podman run -d -p 8080:80 docker.io/library/nginx
- 46 podman ps
- 47 sudo firewall-cmd --add-port=8080/tcp --permanent
- 48 sudo firewall-cmd --reload
- 49 podman search mariadb | grep quay
- 50 podman run -d --name mydb -e MARIADB_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
- 51 podman exec mydb grep mysql /etc/passwd
- 52 podman ps
- 53 podman ps -a
- 54 podman logs f37
- 55 podman rm mydb
- 56 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
- 57 podman exec mydb grep mysql /etc/passwd
- 58 podman images
- 59 podman inspect ece | less
- 60 mkdir mydb
- 61 ls -l mydb
- 62 ls -ld mydb
- 63 podman unshare ls -ld mydb
- 64 podman unshare chown 27:27 mydb
- 65 podman unshare ls -ld mydb
- 66 podman unshare cat /proc/self/uid_map
- 67 ls -ld mydb
- 68 ls -Zd mydb/
- 69 podman stop mydb
- 70 podman rm mydb
- 71 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password -v /home/student/mydb:/var/lib/mysql:Z quay.io/centos7/mariadb-103-centos7
- 72 ls -Z mydb
- 73 countdown 1
- 74 history
- 75 ls -Z
- 76 sudo loginctl enable-linger linda
- 77 ssh linda@localhost
- 78 sudo reboot
- 79 sudo -i
- 80 exit
- 81 countdown 25
- 82 exit
- 83 history
- LINDA COMMANDS 1 cat /tmp/hellofile
- 2 exit
- 3 ls
- 4 ls -l
- 5 cat lindafile
- 6 exit
- 7 cat lindafile
- 8 ls -l
- 9 rm -f lindafile
- 10 ls -ld .
- 11 exit
- 12 crontab -e
- 13 journalctl
- 14 exit
- 15 mkdir -p .config/systemd/user
- 16 cd .config/systemd/user/
- 17 podman run -d --name mynginx -p 8081:80 nginx
- 18 podman ps
- 19 man podman-generate
- 20 man podman-generate-systemd
- 21 podman generate systemd --name mynginx --files --new
- 22 cat container-mynginx.service
- 23 systemctl --user daemon-reload
- 24 systemctl --user enable container-mynginx.service
- 25 systemctl --user status container-mynginx.service
- 26 exit
- 27 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement