









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
RHCSA, EX200, RED HAT CERTIFIED SYSTEMS ADMIN
Typology: Exams
1 / 15
This page cannot be seen from the preview
Don't miss anything!










how to redirect errors to a file? - CORRECT ANSWER >>> command 2> <$filename> 2> will over write the file and 2>> will append how to redirect both standard error and output to a file and have no outputs show on screen? - CORRECT ANSWER >>> &> how to redirect standard error into standard output? - CORRECT ANSWER >>> 2 > & how to grep opposites? - CORRECT ANSWER >>> grep - v select all that do not start with l,i,n,u,x - CORRECT ANSWER >>> grep - v '[^linux]' returns everything not beginning with the letters: l, i, n, u, x what does? mean in regex - CORRECT ANSWER >>> character before is optional what does + mean in regex - CORRECT ANSWER >>> preceding item is matched 1 or more times what is scp? - CORRECT ANSWER >>> secure copy protocol. do it over ssh. encrypted. old way to transfer. can send commands to the other server.
what is sftp? - CORRECT ANSWER >>> secure file transfer protocol. or ssh file transfer protocol. can connect and live inside the other server. can type get <$filename> to get copy the files back what is tar - cvf - CORRECT ANSWER >>> create, verbose, use this archive name. how to see files in archive - CORRECT ANSWER >>> tar - tf what does tar - xzvf do - CORRECT ANSWER >>> eXtract gZip Verbosely Filename star command. archive utility. not default. need to yum install. - CORRECT ANSWER >>> big data sets and files. what is apropos and mandb - CORRECT ANSWER >>> apropos searches the titles of man pages for this key. man page is not indexed and cached so we need to run mandb and it'll be recorded. how to see all the commands if stuck - CORRECT ANSWER >>> info coreutils how to yum install the locate command? - CORRECT ANSWER >>> yum install mlocate make sure to updatedb how to find stuff - CORRECT ANSWER >>> rpm - qd <$packageName> whereis which man
mount - oremount,rw /sysroot chroot /sysroot passwd make new passwd. touch /.autorelabel exit exit system will reboot. we go into root now. how to view oldest to newest processes of a user as root? - CORRECT ANSWER >>> pgrep - u <$username> - l show all processes not owned by user is which pgrep flag? - CORRECT ANSWER >>> - v what are the flags and differences in pkill SIGKILL and pkill SIGTERM? - CORRECT ANSWER >>> - 9 or - SIGKILL and it murders it asap
good way to have infinity loop in background - CORRECT ANSWER >>> (while true; do echo - n "Infinite Loop" >> ~/output.file; sleep 1; done) & how to pause and continue processes like an infinite loop? - CORRECT ANSWER >>> kill SIGSTOP % kill - SIGCONT % how to change niceness level? - CORRECT ANSWER >>> renice or stop + nice - n but that stops the service. users can only increase niceness. sudo people can make it more important. what does w do - CORRECT ANSWER >>> show users online and load averages how to find info on hardware - CORRECT ANSWER >>> cat /proc/cpuinfo see the time and details of bootup. command is? - CORRECT ANSWER >>> systemd-analyze blame how to make sure httpd is booted when system starts? - CORRECT ANSWER >>> systemctl enable httpd systemctl is-enabled httpd to check what is scp and sftp - CORRECT ANSWER >>> secure copy and secure file transfer protocol list only the active state of all loaded service unit configuration files - CORRECT ANSWER >>> systemctl list-units --type=service
command to set default target for system at boot - CORRECT ANSWER >>> systemctl setdefault As the root user, grep for all processes that are running as the root user and display the process names. - CORRECT ANSWER >>> pgrep - u root - l As the root user, kill all of the "user" user's processes and boot that user from the system - CORRECT ANSWER >>> pkill - t pts/ creating a file called testfile. It will contain a count of 20 data blocks with each block being 1024 kilobytes. - CORRECT ANSWER >>> dd if=/dev/urandom of=testfile count=20 bs=1024k What command is used to inform the OS of partition table changes - CORRECT ANSWER >>> partprobe For an MBR partition, what is the max disk size a partition can be - CORRECT ANSWER >>> 2TiB Which file on the operating system contains information about which partitions the OS is reading - CORRECT ANSWER >>> /proc/partitions Which file system is best used with LVM volumes - CORRECT ANSWER >>> xfs Given the volume group "battlestar" and a physical volume in the volume group /dev/xvdf1, which command would accurately create a 19 G logical volume out of /dev/xvdf1 with a volume name of "galactica" - CORRECT ANSWER >>> lvcreate - n galactica - L 19G battlestar You've just increased the size of the /dev/battlestar/galactica LVM volume. This volume is mounted in /mnt/mydir; which command would you issue for the operating system and file
system to recognize the increase in size on the device - CORRECT ANSWER >>> xfs_growfs /mnt/mydir Select the correct order of tasks for creating an LVM for the first time. - CORRECT ANSWER >>> Create the physical volume (pvcreate), create the volume group (vgcreate), create the logical volume (lvcreate) What is the maximum disk size for a GPT-based partition - CORRECT ANSWER >>> 8ZiB Which command displays information about a swap device - CORRECT ANSWER >>> swapon s You are extending a logical volume. To do this, you have to add the /dev/xvdj device to the volume group "battlestar". Which command would you issue to accomplish this task? - CORRECT ANSWER >>> vgextend battlestar /dev/xvdj Which tool(s) would you use to manage GPT-based partitions - CORRECT ANSWER >>> gdisk, parted Which command is used to assign a swap signature to a device - CORRECT ANSWER >>> mkswap How many primary partitions can a GPT partition table have? What about MBR? - CORRECT ANSWER >>> 128 4 What are two ways to find information about swap devices enabled on the system - CORRECT ANSWER >>> swapon - s, cat /proc/swaps
now we need to mount the logical group and make a file system mkfs - t xfs /dev/battlestar/galactica mkdir /mnt/mydir mount /dev/battlestar/galactica /mnt/mydir df - h to check if mounted works if we have a new disk we want to add, we need to gdisk it and partition it. we create a physical volume with pvcreate and /dev/xvdj we add this new physical volume to the volume group vgextend battlestar /dev/xvdj now we connected the new disk to the volume group, we can extend and increase the logical volume size lvextend - L 59G /dev/battlestar/galactica if we run df - h the OS hasnt recognized the changes so we need to use XFS to extend the file system xfs_growfs /mnt/mydir order in removing a logical volume and physical volumes - CORRECT ANSWER >>> umount the file system with umount /mnt/log_files/ remove logical volumes so lvremove /dev/log_vg/log_lv remove the volume groups so vgremove log_vg remove the physical volumes so pvremove /dev/xvdf1 /dev/xvdj types of file systems - CORRECT ANSWER >>> disk or local file system network or client server file systems shared storage or shared disk file systems local file systems overview - CORRECT ANSWER >>> redhat uses Ext. most recent is ext4. XFS is best though. very good and scales well, high performance, great parallel I/O, but bad for single threads. ext4 is default
why cant a user write or get into a file? - CORRECT ANSWER >>> see access control lists, acl, or is it because of mask? setfacl and getfacl setfacl - m u:starbuck:rw file if we cant delete a file - CORRECT ANSWER >>> check permissions, users, if it is STICKY updating the ACL also changes the MASK - CORRECT ANSWER >>> double check shit change the mask also to desired state recursively give dir execute permissions and not files - CORRECT ANSWER >>> execute - X chmod
symbols as they relate to packages and groups - CORRECT ANSWER >>> - means the package is not and will not be installed = means the package is installed and was installed as part of the group how to display the kernel version? - CORRECT ANSWER >>> uname - r how to list all avail time zones? - CORRECT ANSWER >>> timedatectl list-timezones how to determine if httpd package is installed on a system? - CORRECT ANSWER >>> yum list installed httpd yum list installed | grep httpd Which yum command, when provided the proper argument, displays all packages on the system installed by yum? - CORRECT ANSWER >>> yum list HOW TO MEMORIZE WHAT SHIT TO DOWNLOAD - CORRECT ANSWER >>> yum grouplist hidden yum groupinstall "Virtualization Client" "Virtualization Tools" "Virtualization Platform" using yum to download a rpm and use rpm commands and flag - CORRECT ANSWER >>> [root@localhost ~]# yumdownloader nano [root@localhost ~]# mv nano-2.3.xxxxx.rpm nano.rpm