Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@localhost ~]# history
- 1 cd /etc
- 2 cd -
- 3 tar -czvf /root/archive.tgz /etc/
- 4 tar tvf archive.tgz | less
- 5 tar -czvf /root/archive.tgz -C /etc/ .
- 6 tar tvf archive.tgz | less
- 7 history
- 8 sort /etc/dnsmasq.conf | sed '/^[\s]*$/d'
- 9 cat /etc/dnsmasq.conf | grep -v '^$' | sort
- 10 cat /etc/dnsmasq.conf | grep -v '^$' | sort > /var/tmp/dnslines.txt
- 11 history
- 12 useradd bob
- 13 su - bob
- 14 mkdir /root/userfiles
- 15 find / -type f -user bob
- 16 find / -type f -user bob -exec cp -p {} /root/userfiles/ \;
- 17 ls -al /root/userfiles/
- 18 history
- 19 vim /home/student/countdown
- 20 /home/student/countdown
- 21 find / -type f -user bob
- 22 find / -type f -user bob > /root/newfile
- 23 cat newfile
- 24 cp --help | less
- 25 echo $PATH
- 26 ln /home/student/countdown /usr/bin/countdown
- 27 man -k user
- 28 man man
- 29 man apropos
- 30 man mandb
- 31 mandb
- 32 man man
- 33 man -K SYNOPSIS
- 34 history
- 35 man -K autorelabel
- 36 man -k selinux
- 37 man selinux
- 38 visudo
- 39 useradd linda
- 40 echo password | passwd --stdin linda
- 41 su - linda
- 42 visudo
- 43 su - linda
- 44 history
- 45 which passwd
- 46 find / -name "passwd"
- 47 less /etc/passwd
- 48 vim /etc/login.defs
- 49 cd /etc/skel/
- 50 ls -a
- 51 touch hellofile
- 52 useradd lisa
- 53 useradd bob
- 54 useradd bill
- 55 ls -l /home/bill
- 56 usermod --help | less
- 57 tail -1 /etc/passwd
- 58 tail -1 /etc/group
- 59 cd
- 60 id lisa
- 61 usermod -aG wheel lisa
- 62 vim /etc/group
- 63 id lisa
- 64 usermod -L lisa
- 65 passwd lisa
- 66 usermod -L lisa
- 67 vim /etc/shadow
- 68 history
- 69 vim /etc/login.defs
- 70 touch /etc/skel/newfile
- 71 for i in anna anouk linda lisa; do useradd $i; done
- 72 for i in anna anouk linda lisa; do echo password | passwd --stdin $i; done
- 73 passwd lisa
- 74 groupadd profs
- 75 groupadd students
- 76 usermod -aG profs anna
- 77 usermod -aG profs anouk
- 78 usermod -aG students lisa
- 79 usermod -aG students linda
- 80 exit
- 81 id anna
- 82 exit
- 83 chage --help | less
- 84 chage -l anna
- 85 chage anna
- 86 vim /etc/shadow
- 87 vipw --help
- 88 vipw -s
- 89 ls -l /etc/shadow
- 90 chmod u+rw /etc/shadow
- 91 vipw -s
- 92 ls -ld /home/linda
- 93 ls -l /etc/hosts
- 94 touch /tmp/testfiles
- 95 chown linda:student /tmp/testfile
- 96 chown linda:student /tmp/testfiles
- 97 ls -l /tmp/testfiles
- 98 chmod 060 /tmp/tesfiles
- 99 chmod 060 /tmp/testfiles
- 100 id linda
- 101 ls -l /tmp/testfiles
- 102 chgrp students /tmp/testfiles
- 103 ls -l /tmp/testfiles
- 104 su - linda
- 105 touch /home/linda/rootfile
- 106 su - linda
- 107 mkdir -p /data/students
- 108 touch /data/students/{1..9}.txt
- 109 ls -l /data/students/
- 110 mkdir /data/students/202{0..4}
- 111 ls -l /data/students/
- 112 cd /data/students
- 113 chmod 660 202*
- 114 ls -l
- 115 chmod -R +x .
- 116 ls
- 117 ls -l
- 118 chmod -R -x .
- 119 chmod -R +X .
- 120 ls -l
- 121 pwd
- 122 cd ..
- 123 mkdir profs
- 124 chgrp profs profs
- 125 ls -l
- 126 chmod 770 *
- 127 ls -l
- 128 su - anna
- 129 chmod g+s /data/profs
- 130 ls -ld /data/profs
- 131 su - anna
- 132 su - anouk
- 133 chmod +t /data/profs
- 134 su - anouk
- 135 history
- 136 mkdir -p /data/students /data/profs
- 137 chgrp students /data/students
- 138 chgrp profs /data/profs
- 139 ls -l /data/profs
- 140 ls -l /data/
- 141 chmod 770 *
- 142 ls -l
- 143 lsblk
- 144 poweroff
- 145 lsblk
- 146 touch bb
- 147 cat /etc/fstab
- 148 blkid
- 149 blkid | awk '/n1p5 { print $2 }'
- 150 blkid | awk '/n1p5/ { print $2 }'
- 151 blkid | awk '/n1p5/ { print $2 }' >> /etc/fstab
- 152 vim /etc/fstab
- 153 reboot
- 154 lsblk
- 155 mount
- 156 mkfs.xfs --help
- 157 mkfs.xfs /dev/sdb1 -L mylabel
- 158 xfs_admin --help
- 159 xfs_admin -L myxfs /dev/nvme0n1p5
- 160 umount /dev/nvme0n1p5
- 161 xfs_admin -L myxfs /dev/nvme0n1p5
- 162 tune2fs -L myext4 /dev/nvme0n1p5
- 163 vim /etc/fstab
- 164 blkid
- 165 cd /dev/disk
- 166 ls
- 167 ls -l by-uuid
- 168 pwd
- 169 free -m
- 170 swapon -s
- 171 fdisk /dev/nvme0n1
- 172 lsbk
- 173 lsblk
- 174 mkswap /dev/nvme0n1p6
- 175 vim /etc/fstab
- 176 free -m
- 177 swapon -a
- 178 free -m
- 179 swapon -s
- 180 history
- 181 grep swap /etc/fstab
- 182 cd
- 183 lsblk
- 184 fdisk /dev/nvme0n2
- 185 mkdir -p /mounts/files /mounts/xfs
- 186 mkfs.ext4 /dev/nmve0n2p1
- 187 lsblk
- 188 mkfs.ext4 /dev/nvme0n2p1
- 189 mkfs.xfs /dev/nvme0n2p5 -L myxfs
- 190 mkswap /dev/nvme0n2p6
- 191 blkid
- 192 blkid | tail -3 | awk '{ print $2 }'
- 193 blkid | tail -3 | awk '{ print $2 }' >> /etc/fstab
- 194 vim /etc/fstab
- 195 mount -a
- 196 vim /etc/fstab
- 197 mount -a
- 198 swapon -a
- 199 reboot
- 200 history
- 201 df -h
- 202 lsblk
- 203 dd if=/dev/sr0 of=/rhel9.iso bs=1M
- 204 ls -l /
- 205 mkdir /repo
- 206 vim /etc/fstab
- 207 mount -a
- 208 ls /repo
- 209 history
- 210 ls /repo
- 211 ls
- 212 cd /repo
- 213 ls BaseOS/Packages/
- 214 cd AppStream/Packages/
- 215 ls
- 216 cd /
- 217 dnf config-manager --add-repo="file:///repo/BaseOS"
- 218 dnf config-manager --add-repo="file:///repo/AppStream"
- 219 dnf repolist
- 220 cd /etc/yum.repos.d/
- 221 ls
- 222 cat repo_BaseOS.repo
- 223 dnf install -y nmap
- 224 vim repo_BaseOS.repo
- 225 vim repo_AppStream.repo
- 226 dnf install nmap
- 227 dnf list "selinux*"
- 228 dnf provides */seinfo
- 229 seinfo
- 230 dnf provides */Dockerfile
- 231 history
- 232 dnf groups list
- 233 dnf groups install "Virtualization Host"
- 234 dnf groups list
- 235 history
- 236 cd
- 237 man dnf
- 238 dnf download httpd
- 239 ls
- 240 rpm -qp --scripts httpd-2.4.53-11.el9_2.4.x86_64.rpm
- 241 history
- 242 ip addr show
- 243 ip a
- 244 ifconfig
- 245 man ifconfig
- 246 ip a
- 247 nmtui
- 248 ip a
- 249 systemctl status NetworkManager
- 250 systemctl list-units
- 251 systemctl -t help
- 252 systemctl list-unit-files
- 253 dnf install -y httpd
- 254 systemctl status httpd
- 255 systemctl start httpd
- 256 systemctl status httpd
- 257 systemctl enable httpd
- 258 systemctl cat sshd.service
- 259 systemctl edit sshd.service
- 260 systemctl cat sshd.service
- 261 systemctl status sshd
- 262 kill -9 1108
- 263 systemctl status sshd
- 264 systemctl status httpd
- 265 systemctl disable httpd
- 266 systemctl status httpd
- 267 systemctl stop httpd
- 268 systemctl enable --now httpd
- 269 systemctl cat sshd.service
- 270 dnf install -y nginx
- 271 systemctl status nginx
- 272 systemctl mask nginx
- 273 systemctl start nginx
- 274 cd /var/log
- 275 ls -l
- 276 cd
- 277 journalctl
- 278 grep 'Storage' /etc/systemd/journald.conf
- 279 mkdir /var/log/journal
- 280 ls -l /var/log/journal
- 281 systemctl restart systemd-journal-flush.service
- 282 ls -l /var/log/journal
- 283 history
- 284 systemctl show httpd.service
- 285 man systemd.directives
- 286 man systemd.service
- 287 systemctl edit httpd.service
- 288 ls /etc/systemd/system/httpd.service.d/
- 289 cat /etc/systemd/system/httpd.service.d/override.conf
- 290 systemctl cat httpd
- 291 fdisk /dev/nvme0n2
- 292 pvcreate /dev/nvme0n2p7
- 293 pvcreate /dev/nvme0n2p8
- 294 pvs
- 295 vgcreate --help | less
- 296 vgcreate -s 8M vgdata /dev/nvme0n2p7
- 297 vgs
- 298 vgdisplay vgdata
- 299 echo $(( 255 * 8 ))
- 300 lvcreate -n lvdata -L 2G vgdata
- 301 lvcreate -n lvdata -l 255 vgdata
- 302 lvs
- 303 mkfs.ext4 /dev/vgdata/lvdata
- 304 mkdir /lvdata
- 305 vim /etc/fstab
- 306 mount -a
- 307 mount
- 308 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 309 history
- 310 cat /etc/fstab
- 311 df -h
- 312 dd if=/dev/zero of=/lvdata/bifiles bs=1M
- 313 df -h
- 314 mount | grep lvdata
- 315 vgs
- 316 vgextend --help
- 317 fdisk -l
- 318 pvs
- 319 vgextend vgdata /dev/nvme0n2p8
- 320 vgs
- 321 lvextend --help | less
- 322 lvresize -r -l +50%FREE /dev/vgdata/lvdata
- 323 df -h
- 324 history
- 325 poweroff
- 326 lsblk
- 327 fdisk /dev/nvme0n3
- 328 fdisk /dev/nvme0n1
- 329 dd if=/dev/zero of=/dev/null &
- 330 top
- 331 renice --help
- 332 renice 10 6848
- 333 killall dd
- 334 systemctl status tuned
- 335 tuned-adm --help
- 336 tuned-adm list
- 337 tuned-adm recommend
- 338 tuned-adm profile balanced
- 339 tuned-adm list
- 340 ls /usr/lib/tuned/
- 341 ls /usr/lib/tuned/desktop/
- 342 cat /usr/lib/tuned/desktop/tuned.conf
- 343 ls /etc/tuned/
- 344 mkdir /etc/tuned/sander
- 345 cp /usr/lib/tuned/desktop/tuned.conf /etc/tuned/sander/
- 346 systemctl restart tuned
- 347 tuned-adm profiles
- 348 tuned-adm list
- 349 reboot
- 350 systemctl set-default graphical.target
- 351 systemctl isolate graphical.target
- 352 history
- 353 dnf install -y nfs-utils
- 354 showmount -e 192.168.29.142
- 355 mount 192.168.29.142:/nfsdata /mnt
- 356 mount
- 357 umount /mnt
- 358 vim /etc/hosts
- 359 ping nfsserver
- 360 dnf install -y autofs
- 361 vim /etc/auto.master
- 362 cat /etc/auto.misc
- 363 vim /etc/auto.master
- 364 vim /etc/auto.nfsdata
- 365 systemctl restart autofs
- 366 ls -l /
- 367 mount
- 368 cd /nfsfiles
- 369 ls -a
- 370 cd files
- 371 ls
- 372 mount
- 373 vim /etc/auto.master
- 374 vim /etc/auto.ldap
- 375 systemctl restart autofs
- 376 cd /home/ldap/
- 377 cd ldapuser1
- 378 history
- 379 cat /etc/auto.master
- 380 cd
- 381 ls /home
- 382 userdel bob
- 383 cd /home
- 384 ls -l
- 385 timedatectl show
- 386 timedatectl status
- 387 timedatectl set-time -h
- 388 vim /etc/chrony.conf
- 389 chronyc sources
- 390 date
- 391 at 8 pm
- 392 systemctl list-unit-files | grep fstrim
- 393 systemctl cat fstrim.timer
- 394 systemctl status fstrim.timer
- 395 systemctl enable --now fstrim.timer
- 396 systemctl status fstrim.service
- 397 systemctl list-units -t timer
- 398 systemctl list-unit-files logrotate*
- 399 systemctl status logrotate.service
- 400 systemctl status logrotate.timer
- 401 dnf install -y sysstat
- 402 sar -A
- 403 systemctl list-unit-files sysstat*
- 404 systemctl cat sysstat-collect.timer
- 405 systemctl cat sysstat.service
- 406 systemctl start sysstat.service
- 407 sar -A
- 408 man 7 systemd.path
- 409 man systemd-path
- 410 man systemd.directives
- 411 systemctl daemon-reload
- 412 vim /etc/crontab
- 413 ls /etc/cron*/
- 414 crontab --help
- 415 crontab -e -u linda
- 416 journalctl
- 417 crontab -e -u linda
- 418 history
- 419 exit
- 420 history | grep git
- 421 ls
- 422 exit
- 423 history
- #### student commands[student@localhost rhcsa]$ history
- 1 countdown 12
- 2 countdown 15
- 3 vim countdown
- 4 chmod +x countdown
- 5 ./countdown 14
- 6 ./countdown 14 lab time
- 7 ./countdown 14 "lab time"
- 8 ./countdown 13 "lab time"
- 9 sudo -i
- 10 sudo echo passwd | passwd --stdin lisa
- 11 sudo sh -c "echo passwd | passwd --stdin lisa"
- 12 sudo -i
- 13 su - anna
- 14 sudo -i
- 15 countdown 16
- 16 countdown 13
- 17 sudo -i
- 18 countdown 13
- 19 countdown 12
- 20 countdown 8
- 21 countdown 13
- 22 podman ps
- 23 podman stop sleepy
- 24 podman ps
- 25 podman stop 2ba
- 26 countdown 12
- 27 ssh student@192.168.29.142
- 28 sudo -i
- 29 podman run nginx
- 30 podman run docker.io/library/nginx
- 31 podman run -d docker.io/library/nginx
- 32 podman ps
- 33 history
- 34 cat /etc/containers/registries.conf
- 35 less /etc/containers/registries.conf
- 36 podman login registry.redhat.io
- 37 podman info
- 38 sudo dnf install git -y
- 39 git clone https://github.com/sandervanvugt/rhcsa
- 40 cd rhcsa/
- 41 ls
- 42 cat resources.txt
- 43 podman images
- 44 ls
- 45 cat Containerfile
- 46 podman build -t mymap .
- 47 podman images
- 48 podman run localhost/mymap
- 49 cat Containerfile
- 50 podman ps
- 51 podman stop jovial_haibt
- 52 podman ps
- 53 podman ps -a
- 54 podman start jovial_haibt
- 55 podman ps
- 56 podman rm jovial_haibt
- 57 podman rm --force jovial_haibt
- 58 podman ps -a
- 59 podman images
- 60 podman inspect localhost/mymap | less
- 61 podman ps
- 62 podman ps a-
- 63 podman ps -a
- 64 podman inspect 742 | less
- 65 podman run -it docker.io/library/nginx sh
- 66 podman ps
- 67 podman run -d nginx
- 68 podman exec -it 6f1 sh
- 69 podman ps
- 70 podman run docker.io/library/nginx -it sh
- 71 podman search ubi
- 72 podman run --name sleepy docker.io/redhat/ubi9 sleep 3600
- 73 podman images
- 74 podman run -d --name sleepy docker.io/redhat/ubi9 sleep 3600
- 75 podman rm sleepy
- 76 podman ps -a
- 77 podman run busybox
- 78 podman ps
- 79 podman ps -a
- 80 podman run docker.io/library/mariadb
- 81 podman ps
- 82 podman ps -a
- 83 podman logs vigorous_dijkstra
- 84 podman run docker.io/library/mariadb --env MARIADB_ROOT_PASSWORD=password
- 85 podman run docker.io/library/mariadb -e MARIADB_ROOT_PASSWORD=password
- 86 podman run --env MARIADB_ROOT_PASSWORD=password docker.io/library/mariadb
- 87 podman run -d -p 80:80 docker.io/library/nginx
- 88 podman run -d -p 8080:80 docker.io/library/nginx
- 89 podman port -a
- 90 podman ps
- 91 curl localhost:8080
- 92 sudo firewall-cmd --add-port=8080/tcp --permanent
- 93 sudo firewall-cmd --reload
- 94 firewall-cmd --help
- 95 firewall-cmd --help | grep port
- 96 firewall-ctl --panic-on
- 97 firewallctl --panic-on
- 98 firewall-cmd --panic-on
- 99 firewall-cmd --reload
- 100 history
- 101 sudo firewall-cmd --list-all
- 102 history
- 103 cd
- 104 mkdir data
- 105 podman unshare chown 27:27 data
- 106 ls -l data
- 107 ls -ld data
- 108 podman unshare ls -ld data
- 109 podman images
- 110 podman inspect f35
- 111 podman inspect f35 | less
- 112 podman ps
- 113 podman ps -a
- 114 podman inspect e8f | less
- 115 podman search mariadb | grep quay
- 116 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
- 117 ping quay.io
- 118 sudo nmtui
- 119 sudo reboot
- 120 ping quay.io
- 121 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
- 122 podman ps
- 123 podman inspect mydb
- 124 podman inspect mydb | less
- 125 podman exec mydb grep mysql /etc/passwd
- 126 mkdir mydb
- 127 podman unshare chown 27:27 mydb
- 128 ls -ld mydb/
- 129 podman unshare cat /proc/self/uid_map
- 130 podman unshare ls -ld mydb
- 131 podman stop mydb
- 132 podman rm mydb
- 133 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password -v /home/student/mydb:/var/lib/mysql:Z quay.io/centos7/mariadb-103-centos7
- 134 ls -Z mydb
- 135 grep linda /etc/passwd
- 136 sudo loginctl enable-linger linda
- 137 ssh linda@localhost
- 138 sudo vim /etc/ssh/sshd_config
- 139 sudo systemctl restart sshd
- 140 ssh linda@localhost
- 141 sudo reboot
- 142 ps faux | less
- 143 exit
- 144 sudo -i
- 145 ls
- 146 cd rhcsa/
- 147 ls
- 148 less mini-exam-30min.txt
- 149 history
- 150 cat mini-exam-30min.txt
- 151 git pull
- 152 less resources.txt
- 153 vim resources.txt
- 154 sudo -i
- 155 history
- ##### linda commands 1 useradd lisa
- 2 sudo useradd lisa
- 3 sudo passwd lisa
- 4 sudo userdel lisa
- 5 sudo passwd root
- 6 exit
- 7 sudo passwd root
- 8 sudo passwd lisa
- 9 exit
- 10 cat /tmp/testfiles
- 11 chmod 660 /tmp/testfiles
- 12 cat /tmp/testfiles
- 13 exit
- 14 ls -l
- 15 rm -f rootfile
- 16 ls -ld .
- 17 exit
- 18 mkdir -p .config/systemd/user
- 19 cd .config/systemd/user/
- 20 podman run -d --name mynginx -p 8081:80 nginx
- 21 podman ps
- 22 pwd
- 23 podman generate systemd --name mynginx --files --new
- 24 cat container-mynginx.service
- 25 systemctl --user daemon-reload
- 26 systemctl --user enable container-mynginx.service
- 27 sudo reboot
- 28 exit
- 29 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement