Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 tar czvf /root/archive.tgz /etc
- 2 history
- 3 cat /etc/dnsmasq.conf
- 4 cat /etc/dnsmasq.conf | grep -v '^$'
- 5 cat /etc/dnsmasq.conf | grep -v '^$' | sort
- 6 cat /etc/dnsmasq.conf | grep -v '^$' | sort > /var/tmp/dnslines.txt
- 7 useradd bob
- 8 find / -user bob
- 9 mkdir /root/userfiles ; find / -user bob -exec cp -ra {} /root/userfiles \;
- 10 ls -l /root/userfiles/
- 11 history
- 12 visudo
- 13 /home/student/countdown 12
- 14 tail -1 /etc/passwd
- 15 visudo
- 16 su - bob
- 17 echo password | passwd --stdin bob
- 18 su - bob
- 19 visudo
- 20 su - bob
- 21 vim /etc/login.defs
- 22 cd /etc/skel/
- 23 ls
- 24 ls -a
- 25 touch hello
- 26 less /etc/passwd
- 27 id bob
- 28 groupadd sales
- 29 usermod -aG sales bob
- 30 id bob
- 31 su - bob
- 32 lid wheel
- 33 lid --help
- 34 lid -g wheel
- 35 chage bob
- 36 cd
- 37 ln /home/student/countdown /usr/local/bin/countdown
- 38 ln /home/student/countdown /usr/local/sbin/countdown
- 39 countdown 7
- 40 vim /etc/login.defs
- 41 touch /etc/skel/newfile
- 42 groupadd profs
- 43 groupadd students
- 44 useradd -G profs anna
- 45 useradd -G profs anouk
- 46 useradd -G students linda
- 47 useradd -G students lisa
- 48 for i in anna anouk lisa linda; do echo password | passwd --stdin $i; done
- 49 history
- 50 countdown 12
- 51 cd /etc/ls -l
- 52 cd /etc
- 53 ls -l
- 54 cd
- 55 mkdir -p /data/profs /data/students
- 56 cd /data
- 57 ls -l
- 58 id
- 59 umask
- 60 chown :profs /data/profs
- 61 ls -l
- 62 chgrp students /data/students
- 63 ls -l
- 64 chmod 770 students
- 65 ls -l
- 66 chmod g+w,o-rx /data/profs
- 67 ls -l
- 68 su - anna
- 69 chmod g+s /data/profs
- 70 su - anna
- 71 su - anouk
- 72 chmod +t /data/profs
- 73 su - anouk
- 74 history
- 75 cd
- 76 pwd
- 77 touch removeme
- 78 chattr +i removeme
- 79 rm -f removeme
- 80 lsattr removeme
- 81 chattr -i removeme
- 82 rm -f removeme
- 83 countdown 7
- 84 history
- 85 poweroff
- 86 lsblk
- 87 countdown 12
- 88 vim /etc/profile
- 89 vim /etc/profile.d/
- 90 fdisk /dev/sda
- 91 lsblk
- 92 mkfs.xfs /dev/sda3
- 93 mount /dev/sda3 /mnt
- 94 lsblk
- 95 mount
- 96 mkdir /files
- 97 vim /etc/fstab
- 98 reboot
- 99 lsblk
- 100 fdisk /dev/sda
- 101 mkfs.ext4 /dev/sda6
- 102 mkfs.xfs /dev/sda5
- 103 mkdir /sda5 /sda6
- 104 vim /etc/fstab
- 105 mount -a
- 106 vim /etc/fstab
- 107 fdisk /dev/sda
- 108 reboot
- 109 touch abc
- 110 mount -o remount,rw /
- 111 lsblk
- 112 fdisk -l /dev/sda
- 113 blkid
- 114 cat /etc/fstab
- 115 cat /etc/fstab | grep sda5
- 116 blkid | grep sda5
- 117 blkid | grep sda5 | awk '{ print $2 }'
- 118 blkid | awk '{ print $2 }'
- 119 blkid | grep sda5 | awk '{ print $2 }'
- 120 blkid | grep sda5 | awk '{ print $2 }' >> /etc/fstab
- 121 blkid | awk '/sda5/ { print $2 }'
- 122 vim /etc/fstab
- 123 history
- 124 vim /etc/fstab
- 125 vim /etc/default/grub
- 126 grub2-mkconfig -o /boot/grub2/grub.cfg
- 127 reboot
- 128 vim /etc/fstab
- 129 lsblk
- 130 vim /etc/fstab
- 131 xfs_admin --help
- 132 xfs_admin -L cow /dev/sdb3
- 133 vim /etc/fstab
- 134 reboot
- 135 fdisk -l /dev/sdb
- 136 fdisk -l /dev/sda
- 137 mkfs.ext4 --help
- 138 cd /boot
- 139 umount /boot
- 140 lsof /boot
- 141 kill -9 6571
- 142 mount
- 143 lsblk
- 144 findmnt
- 145 man 5 fstab
- 146 cd
- 147 free -m
- 148 fdisk /dev/sda
- 149 cat /proc/partitions
- 150 lsblk
- 151 mkswap /dev/sda6
- 152 vim /etc/fstab
- 153 free -m
- 154 swapon -a
- 155 free -m
- 156 countdown 15
- 157 lsblk
- 158 mkdir -p /mounts/files
- 159 gdisk /dev/sdb
- 160 fdisk /dev/sdb
- 161 mkfs.ext4 /dev/sdb1
- 162 mkfs.xfs -L myxfs /dev/sdb5
- 163 blkid
- 164 vim /etc/fstab
- 165 mkswap /dev/sdb6
- 166 vim /etc/fstab
- 167 mount 0a
- 168 mount -a
- 169 vim /etc/fstab
- 170 mkdir /mounts/xfs
- 171 mount -a
- 172 swapon -a
- 173 reboot
- 174 df -h
- 175 cd /
- 176 dd if=/dev/sr0 of=/rhel9.iso bs=1M
- 177 mkdir /repo
- 178 cp /etc/fstab /etc/fstab.bak
- 179 echo "/rhel9.iso /repo iso9660 defaults 0 0" >> /etc/fstab
- 180 mount -a
- 181 lsblk
- 182 dd if=/dev/zero of=/dev/sdb bs=1M count=100
- 183 lsblk
- 184 vim /etc/fstab
- 185 dnf repolist
- 186 cd /etc/yum.repos.d/
- 187 ls
- 188 rm -f *
- 189 dnf repolist
- 190 history
- 191 dnf config-manager --add-repo="file:///repo/AppStream"
- 192 cat /etc/yum.repos.d/repo_AppStream.repo
- 193 ls /repo
- 194 dnf config-manager --add-repo="file:///repo/BaseOS"
- 195 dnf repolist
- 196 dnf search nmap
- 197 dnf install nmap
- 198 vim repo_BaseOS.repo
- 199 vim repo_AppStream.repo
- 200 dnf install nmap
- 201 vim repo_AppStream.repo
- 202 cd
- 203 seinfo
- 204 dnf provides */Containerfile
- 205 dnf groups list
- 206 dnf groups install "Virtualization Host"
- 207 dnf groups list
- 208 dnf groups list hidden
- 209 cat /etc/redhat-release
- 210 dnf module list
- 211 countdown 15
- 212 history
- 213 dnf download htpd
- 214 dnf download httpd
- 215 ls
- 216 rpm -qp httpd-2.4.53-7.el9.x86_64.rpm --scripts
- 217 rpm -qf /etc/nsswitch.conf
- 218 rpm -qf /etc/passwd
- 219 rpm -ql setup
- 220 rpm -qd setup
- 221 history
- 222 cat /proc/partitions
- 223 reboot
- 224 cat /proc/partitions
- 225 gdisk /dev/sdb
- 226 pvcreate /dev/sdb1
- 227 xxd /dev/sdb1 | less
- 228 vgcreate vgdata /dev/sdb1
- 229 vgs
- 230 vgdisplay vgdata | less
- 231 echo $(( 255 * 4 ))
- 232 lvcreate -n lvdata -L 1G vgdata
- 233 lvcreate -n lvdata -l 100%FREE vgdata
- 234 mkfs.ext4 /dev/vgdata/lvdata
- 235 vim /etc/fstab
- 236 mkdir /lvdata
- 237 mount -a
- 238 mount
- 239 tail -1 /etc/fstab
- 240 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 241 history
- 242 xxd /dev/sdb1 | less
- 243 vgs
- 244 vgextend vgdata /dev/sdb2
- 245 vgs
- 246 df -h
- 247 lvextend -l +50%FREE /dev/vgdata/lvdata
- 248 lvs
- 249 df -h
- 250 resize2fs /dev/vgdata/lvdata
- 251 df -h
- 252 countdown 15
- 253 ip a
- 254 systemctl status NetworkManager
- 255 nmtui
- 256 ip a
- 257 sysctl -a
- 258 sysctl -a | wc -l
- 259 dnf install -y tuned
- 260 systemctl enable --now tuned
- 261 tuned-adm list
- 262 echo vm.swappiness = 33 > /etc/sysctl.d/swappiness.conf
- 263 systctl -p /etc/sysctl.d/swappiness.conf
- 264 sysctl -p /etc/sysctl.d/swappiness.conf
- 265 sysctl -a | grep swappi
- 266 mkdir /etc/tuned/myprofile
- 267 cat >> /etc/tuned/myprofile/tuned.conf <<EOF
- 268 [sysctl]
- 269 vm.swappiness = 66
- 270 EOF
- 271 tuned-adm list
- 272 tuned-adm profile myprofile
- 273 tuned-adm profile
- 274 sysctl -a | grep swapp
- 275 vim /etc/tuned/tuned-main.conf
- 276 history
- 277 cat /lib/tuned/network-throughput/tuned.conf
- 278 ls /etc/tuned /usr/lib/tuned/
- 279 cd /
- 280 ls -l
- 281 history -w
- 282 cat /proc/partitions
- 283 gdisk /dev/sdb
- 284 pvcreate /dev/sdb1
- 285 xxd /dev/sdb1 | less
- 286 vgcreate vgdata /dev/sdb1
- 287 vgs
- 288 vgdisplay vgdata | less
- 289 echo $(( 255 * 4 ))
- 290 lvcreate -n lvdata -L 1G vgdata
- 291 lvcreate -n lvdata -l 100%FREE vgdata
- 292 mkfs.ext4 /dev/vgdata/lvdata
- 293 vim /etc/fstab
- 294 mkdir /lvdata
- 295 mount -a
- 296 mount
- 297 tail -1 /etc/fstab
- 298 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 299 history
- 300 xxd /dev/sdb1 | less
- 301 vgs
- 302 vgextend vgdata /dev/sdb2
- 303 vgs
- 304 df -h
- 305 lvextend -l +50%FREE /dev/vgdata/lvdata
- 306 lvs
- 307 df -h
- 308 resize2fs /dev/vgdata/lvdata
- 309 df -h
- 310 countdown 15
- 311 ip a
- 312 systemctl status NetworkManager
- 313 nmtui
- 314 ip a
- 315 sysctl -a
- 316 sysctl -a | wc -l
- 317 dnf install -y tuned
- 318 systemctl enable --now tuned
- 319 tuned-adm list
- 320 echo vm.swappiness = 33 > /etc/sysctl.d/swappiness.conf
- 321 systctl -p /etc/sysctl.d/swappiness.conf
- 322 sysctl -p /etc/sysctl.d/swappiness.conf
- 323 sysctl -a | grep swappi
- 324 mkdir /etc/tuned/myprofile
- 325 cat >> /etc/tuned/myprofile/tuned.conf <<EOF
- 326 [sysctl]
- 327 vm.swappiness = 66
- 328 EOF
- 329 tuned-adm list
- 330 tuned-adm profile myprofile
- 331 tuned-adm profile
- 332 sysctl -a | grep swapp
- 333 vim /etc/tuned/tuned-main.conf
- 334 history
- 335 cat /lib/tuned/network-throughput/tuned.conf
- 336 ls /etc/tuned /usr/lib/tuned/
- 337 cd /
- 338 ls -l
- 339 history -w
- 340 reboot
- 341 history
- 342 systemctl -t help
- 343 systemctl list-units -t service
- 344 systemctl cat sshd.service
- 345 systemctl edit sshd.service
- 346 systemctl cat sshd.service
- 347 systemctl status sshd
- 348 systemctl stop sshd
- 349 systemctl status sshd
- 350 systemctl start sshd.service
- 351 systemctl status cups
- 352 dnf install vsftpd
- 353 systemctl status vsftpd
- 354 systemctl enable --now vsftpd
- 355 history
- 356 systemctl list-unit-files
- 357 #subscription-manager register
- 358 #subscription-manager attach
- 359 systemctl show sshd.service
- 360 dnf install httpd
- 361 systemctl list-unit-files | wc -l
- 362 systemctl list-units --all | wc -l
- 363 systemctl list-units --all
- 364 systemctl cat httpd.service
- 365 systemctl show httpd.service
- 366 systemctl edit httpd.service
- 367 systemctl daemon-reload
- 368 systemctl restart httpd
- 369 systemctl status httpd
- 370 kill -9 7369
- 371 systemctl status httpd
- 372 systemctl stop httpd
- 373 systemctl mask httpd
- 374 systemctl start httpd
- 375 systemctl unmask httpd
- 376 journalctl
- 377 journalctl -p err
- 378 journalctl -f
- 379 systemctl status rsyslog
- 380 cd /var/log
- 381 ls -lrt
- 382 vim /etc/rsyslog.conf
- 383 grep 'Storage' /etc/systemd/journald.conf
- 384 pwd
- 385 ls
- 386 mkdir /var/log/journal
- 387 ls /var/log/journal/
- 388 systemctl restart systemd-journal-flush.service
- 389 ls /var/log/journal/
- 390 systemctl cat httpd.service
- 391 man -k systemd
- 392 man -k systemd | wc -l
- 393 man systemd.directives
- 394 man systemd.service
- 395 history
- 396 systemctl stop httpd
- 397 systemctl disable httpd
- 398 systemctl cat httpd
- 399 systemctl status httpd
- 400 systemctl enable --now httpd
- 401 systemctl reboot
- 402 vim /etc/default/grub
- 403 grub2-mkconfig -o /boot/grub2/grub.cfg
- 404 cd /boot
- 405 ls
- 406 cd grub2/
- 407 ls
- 408 cd ..
- 409 find . -name "grub.cfg"
- 410 cd
- 411 systemctl get-default
- 412 systemctl set-default graphical.target
- 413 reboot
- 414 countdown 13
- 415 getenforce
- 416 setenforce permissive
- 417 getenforce
- 418 setenforce
- 419 setenforce enforcing
- 420 ps aux | grep http
- 421 ps Zaux | grep http
- 422 ls -Z /var/www
- 423 mkdir /web
- 424 vim /web/index.html
- 425 vim /etc/httpd/conf/httpd.conf
- 426 systemctl restart httpd
- 427 systemctl status httpd
- 428 curl http://localhost
- 429 getenforce
- 430 setenforce permissive
- 431 curl http://localhost
- 432 vim /etc/httpd/conf/httpd.conf
- 433 systemctl restart httpd
- 434 curl http://localhost
- 435 getenforxce
- 436 getenforce
- 437 setenforce enforcing
- 438 curl http://localhost
- 439 grep AVC /var/log/audit/audit.log
- 440 cd /var/www
- 441 ls -Z
- 442 ls -lZ /web
- 443 man semanage-fcontext
- 444 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 445 ls -Zd /web
- 446 restorecon -Rv /web
- 447 ls -Zd /web
- 448 getenforce
- 449 curl http://localhost
- 450 history
- 451 countdown 12
- 452 cd
- 453 ls -lZ /etc/hosts
- 454 cp /etc/hosts .
- 455 ls -Z hosts
- 456 mv hosts /tmp/hosts
- 457 ls -lZ /tmp/hosts
- 458 mv /tmp/hosts /web
- 459 ls -lZ /web
- 460 curl http://localhost/hosts
- 461 setenforce permissive
- 462 curl http://localhost/hosts
- 463 setenforce enforce
- 464 setenforce enforcing
- 465 grep AVC /var/log/audit/audit.log
- 466 ls -Z /web
- 467 ls -Zl /web
- 468 restorecon -Rv /web
- 469 journactl | grep sealert
- 470 journalctl | grep sealert
- 471 sealert -l 7bf77eae-01f9-466a-8051-1709a7e6f7d7 | less
- 472 journalctl | grep sealert
- 473 sealert -l a7307fae-0db9-4571-9337-63c0f9333d30 | less
- 474 semanage fcontext -l -C
- 475 dnf install -y selinux-policy-doc
- 476 man -k _selinux
- 477 man -k _selinux | wc -l
- 478 man httpd_selinux
- 479 vim /etc/ssh/sshd_config
- 480 systemctl restart sshd
- 481 systemctl status sshd
- 482 journalctl -xeu sshd.service
- 483 setenforce permissive
- 484 systemctl restart sshd
- 485 setenforce enforcing
- 486 journalctl | grep sealert
- 487 sealert -l fe2b0574-4fea-4ccb-aeed-7bd4b3109806 | less
- 488 semanage port -a -t ssh_port_t tpc 2022
- 489 man semanage-port
- 490 semanage port -a -t ssh_port_t -p tcp 2022
- 491 systemctl restart sshd
- 492 getsebool -a
- 493 getsebool -a | grep ftp
- 494 setsebool -P ftpd_anon_write on
- 495 getsebool -a | grep ftp
- 496 countdown 2
- 497 poweroff
- 498 password
- 499 vim /etc/hosts
- 500 ip a
- 501 vim /etc/httpd/conf/httpd.conf
- 502 lsblk
- 503 dnf install stratis-cli stratisd
- 504 systemctl enable --now stratisd
- 505 stratis --help
- 506 stratis pool create mypool /dev/sdc
- 507 stratis pool list
- 508 stratis blockdev list
- 509 stratis fs create mypool myfs
- 510 stratis fs list
- 511 stratis fs create mypool myfs2
- 512 stratis fs list
- 513 mkdir /myfs
- 514 lsblk --output=UUID
- 515 blkid
- 516 stratis fs list
- 517 vim /etc/fstab
- 518 reboot
- 519 mount
- 520 findmnt
- 521 df -h
- 522 stratis fs list
- 523 stratis pool list
- 524 countdown 15
- 525 dnf install nfs-utils
- 526 vim /etc/hosts
- 527 showmount -e nfsserver
- 528 mount nfsserver:/var /mnt
- 529 ls /mnt
- 530 umount /nfs
- 531 umount /mnt
- 532 dnf install autofs
- 533 vim /etc/auto.master
- 534 vim /etc/auto.misc
- 535 showmount -e nfsserver
- 536 vim /etc/auto.master
- 537 ls /
- 538 mount | grep files
- 539 vim /etc/auto.master
- 540 vim /etc/auto.nfsfiles
- 541 ls -l /
- 542 systemctl restart nfsserver
- 543 systemctl restart autofs
- 544 ls -l /
- 545 cd /nfsfiles
- 546 la -a
- 547 ls -a
- 548 cd nfsdata
- 549 mount
- 550 vim /etc/auto.master
- 551 showmount -e nfsserver
- 552 vim /etc/auto.ldap
- 553 systemctl restart autofs
- 554 cd /home
- 555 ls
- 556 cd ldap
- 557 ls -a
- 558 cd ldapuser3
- 559 cat /etc/auto.ldap
- 560 grep ldap /etc/auto.master
- 561 cd
- 562 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement