RHEL7 RHCSA Sample exam 1

Share this link

RHCSA7 1

This is a sample RHCSA exam for RHEL7. You’ve got 2 hours and half.

Prerequisites:

– a file system of 1GB for /home,
– 1GB of non-allocated space.

One precision: nobody checks your answers but solutions are provided.

1 Star2 Stars3 Stars4 Stars5 Stars (416 votes, average: 3.12 out of 5)
Loading...
147 comments on “RHEL7 RHCSA Sample exam 1
  1. algorisms says:

    For question 8, couldn’t you use:

    # chcon -R –reference=/home /xfs

    • CertDepot says:

      No, you couldn’t use the chcon command because, when rebooting, an autorelabel might happen, removing the specified context.
      The semanage command is the only solution. You will never need to use the chcon command in a RHCSA or RHCE exam, you can forget this command.

      • algorisms says:

        Ah ok – I wonder why Jang’s books go over it so much – I just spent a good amount of time running through semanage so I see why the answer is what it is. Thanks!

  2. DKatcars says:

    This is in regards to question#6.
    Is Bash scripting really a prerequisite AND testable on RHCSA?

    • CertDepot says:

      Although there is no objective associated with Bash scripting, it is known from previous experience that this skill is supposed to be mastered by a RHCSA candidate.

    • algorisms says:

      It is testable – At least with LFCS, when I took the exam they had us write a bash script with certain requisites. You don’t get your results right away because they hand-grade parts of the exam.

      Either way, you really should know Bash if you want to be effective at SysAdmin with Linux. It saves time and lives. Also, RegEx – Knowing how to use RegEx will save you a TON of time…

      Though you can probably get by without both, employers will look for these skills and they are relatively easy to test in technical interviews as well so it really behooves you to know it…

  3. DKatcars says:

    For question#9, which RHCSA objective covers learning configuring a virtual console?

  4. DKatcars says:

    Are resolving issues such as “ls: Login failed: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()” be beyond the scope of the RHCSA exam?

    I would anticipate possibly having to enable chroot_list_enable=YES and adding a user(s) to a chroot_list at most. Seems there may be lots more to allowing users various permissions once they ftp into their home directory though. Please provide any thoughts you have that may help me understand how far to investigate.

    Thanks in advance!

  5. afro says:

    How to start this Sample Quiz ?
    Any help ?

  6. afro says:

    Thx, now everything is working fine.

  7. rodolfocasas says:

    In Question 6 I think it may be faster to do this

    lvextend -r -L 200M /dev/vg/lv_xfs

    The -r option automatically grows the file system.

    Thank you for your really nice and useful site.

    R

  8. hunter86_bg says:

    why not “setsebool -P httpd_use_nfs on” on task 11 ?

  9. pharlan says:

    Considering Q9: On my CentOS 7 machine context of /home directories is user_home_dir_t not user_home_t

  10. gremlin961 says:

    For question 3, could you also use ‘semanage fcontext -a -e /home /xfs’ to do the same thing? That would set /xfs to home_root_t and any sub directories to user_home_dir_t, just like /home.

    • CertDepot says:

      I didn’t know the semanage fcontext -e option. Thanks for that.
      However, this option doesn’t exactly give the same result as the semanage fcontext -t option: it uses the /etc/selinux/targeted/context/files/file_contexts.subs file instead of the /etc/selinux/targeted/context/files/file_contexts.local file.
      Because of this and because it’s not the same mechanism involved, I wouldn’t propose your solution.
      But there are perhaps some situations that I don’t foresee for the moment, where your solution could be useful.

  11. mak777 says:

    ahhhh .. i failed my rhcsa exam today . 🙁

  12. timlee says:

    [root@rhel7-testServer ~]# ./prog.sh
    ./prog.sh: line 5: [40: command not found

    And here are contents:
    #!/bin/bash

    cd /xfs
    N=40
    while [“$N” -gt 0 ]
    do
    fallocate -l 2M .file_$N
    N=’expr $N – 1′
    done

  13. timlee says:

    For question 12, there is no file /usr/bin/sar

  14. asifshabir says:

    for question 8.
    You have asked to write a bash script. Which I guess is no longer a part of RHCSA ?

    Please correct me if I am wrong.
    I am preparing for RHCSA, and you prompt response will help me 🙂

    • CertDepot says:

      Here nothing is really clear.
      However, I personally think writing shell scripts is a basic skill for a system administrator.
      As such, for the RHCSA or the RHCE exams, you are supposed to do it without any problem.
      It doesn’t really need to be written in the curriculum.

  15. romio says:

    Passed my RED HAT exam yesterday. Thank you, cert depot for updating LDAP post for me. I would have failed the exam without LDAP part. Initially, I was thinking to skip LDAP questions as I felt prepared for the rest of the exam but when you updated that portion, I thought to give it a try and it started working fine for me. Now when I went to exam, surprisingly I couldn’t do any logical volume questions which I thought I was the easiest part of the exam, reason being vgs, lvs, lvdisplay or any logical volume related commands were not working and whenever I tried any of these commands, it gave me an error saying “volume group “name” is not unlocked” do you know anything about this error? I am thinking that partitions were corrupt or volume group was corrupt. Anyways, to make long story short, because of LDAP questions I passed the exam. I can’t give the questions here as its not allowed, but people do prepare for LDAP as you never know if you will be able to do easy part of the exam.
    Mainly I prepared for exam from asghar ghori’s book, learned network part from network video of Ralph “tip of the week”, selinux section from Sander’s youtube video and LDAP from Cert depot. Thanks everyone and Cheers!

  16. mamytov1288@gmail.com says:

    If the lvs pvs vgs commands are not working then you should install lvm2 package:
    # yum install lvm2

  17. mbarnes says:

    You could simplify the bash script in question 8 a little.

    #!/bin/bash

    for N in `seq 40`
    do
    fallocate -l 2M /xfs/.file_$N
    done

  18. redhat0329 says:

    Hi CertDepot,

    Are the RHEL7 RHCSA Sample exam 1 updated as of this writing and can be on the exam questions? Thanks

    • CertDepot says:

      This sample exam is only there to give you an idea of the exam format and the kind of questions you could be asked. However, this sample exam is not the real exam and you shouldn’t believe that, because you were able to complete it, you will pass the real RHCSA exam. It’s only a step in the right direction.

      • redhat0329 says:

        Hi CertDepot,

        Thank you for the response. Is it okay if you can give any idea how many questions are there on the exam?

        Is GUI installation advisable or not?

        Regards

        • redhat0329 says:

          Hi CertDepot,

          Sorry if I have too much questions.

          Is installing rhel 7 using kickstart really part of the exam?

          • CertDepot says:

            Kickstart installation is normally part of the RHCSA exam. But, due to time constraints, it takes a lot of time to install a VM this way, you shouldn’t care too much about this. Just know the basics.

        • CertDepot says:

          The RHCSA exam should rely on 15 to 20 questions.
          Graphical GUI installation is perhaps possible but you shouldn’t rely on because it takes time and could depend on the exam environment (kiosk, classroom, etc) that you are using.

  19. val says:

    Question 8 isn’t that complicated as it seems here. Actually it could be done in one line: for i in {1..40}; do fallocate -l 2M .file_{$i}; done. Much shorter and cleaner

  20. redhat0329 says:

    Hi CertDepot,

    Need your help please.. 🙂

    Where can I get the semanage fcontext value user_home_dir_t? Thanks! 🙂

    Question number 3.
    # yum install -y setroubleshoot-server
    # semanage fcontext -a -t user_home_dir_t “/xfs(/.*)?”
    # restorecon -R /xfs

  21. lixinchina1 says:

    Am I giving root login access during the exam or I have to login as normal user and “sudo” every command?

    • CertDepot says:

      The first thing asked at the exam is to change the root password at boot time. After you decide how you want to work: you are supposed to know all the options (with/without sudo, etc)!

  22. lixinchina1 says:

    Also in order for a regular user to run sudo command, I know there’re many methods to grant the permission but one of the method I found is to edit /etc/sudoers and add a line:

    username ALL=(ALL) ALL

    Is that a acceptable way? thx!

  23. haisan says:

    I have to say, for encouraging the attenders, that the exam is much easier than this simulation. 🙂

    I got 283, finished in 2h10min and having enough time for tests. No idea where I did the mistake.

  24. azmedhs says:

    My 6 RHCSA expired I took rhce but I had 209 !! then I must go back RHCSA on version 7. Can you show me the difference between v6 and v7 EX200? Thank you

  25. miguel says:

    Hello Certdepot

    For one of the questions in “task of the day” is to increase an existing standard partition running on “xfs” filesystem. I tried to use parted but seems there is no “resize” command anymore. The only advise i’m getting from the internet is to delete the existing partition and increase using fdisk. but if I do that, my files will be deleted.

  26. laring says:

    looking for sample exam (rhcsa7), I’m scheduled for an rhcsa7 next friday. so I’m working hard, but i need more labs.

  27. andreap91 says:

    Hi Certdepot,
    thank you for this guide. Tomorrow I will have my RHCSA exam and I have one question: in the exam I will work on vm like virtualbox or kvm or I have a vm with limited actions(for example only to start/stop/reset the vm and nothing else)?

    thanks in advance

    • CertDepot says:

      Yes, you are right. You will connect to a VM in a KVM-based host with some limited actions on the VM itself (start/stop).

      • andreap91 says:

        Ok thanks. Then I will have a vm with already installed redhat,right? And will I have access to redhat repositories to install packages?

        • CertDepot says:

          Yes, you normally do but you are supposed to know how to install the distribution and set up access to remote repositories.

          • andreap91 says:

            Hi Certdepot
            thanks again for your guide, I passed my exam with score 300/300

          • CertDepot says:

            Not only you passed the exam but you passed it with flying colors! Congratulations! 😉

          • wiggler says:

            Hi CertDepot, I know all the answers in the sample-exam-1 items, what is the percentage that I will pass the exam? thanks. i am taking the exam next month.

          • CertDepot says:

            As said before, practice the LDAP part, the password reinitialization at boot time (critical) and you should be fine.

          • wiggler says:

            Hi CertDepot, thank you for the guidance. I can easily deal with the password change so I should focus on the LDAP part now.

  28. scruff says:

    Hi, Can’t find LDAP topic. Could you point it to me please?

  29. maced says:

    Hi everyone. I am new here guys and also to RHEL, however I was wondering, for the ex200 exam
    if you are tested on how to troubleshoot boot loader
    errors when booting from an ISO image, mounting the image,
    creating partition and partition type, installing/copying device
    drivers, editing GRUB and RunLevels before even starting the 1st question…
    Reason I ask is I got the shock of my life just last week on my Job interview
    I had a technical test to complete that was designed in that way and I failed it
    horribley…I am about to write the Ex200 exam next month and I so don’t want
    to overlook that part…I would hate to repeat sitting for 2.5 hours troubleshooting God knows what and not even get to question 1 of the exam :(…additionally
    is there a walk-through tutorial on this?

  30. scruff says:

    Hi gentlemen. It it allowed to reboot virtual lab pc (with “reboot” command) during exam?

  31. scruff says:

    Hi, regarding to Question 7 of sample exam – could you explain why we use “defaults 1 2” in fstab configuration file. I think “defaults 0 0” is enough, as first “0” point to “dump” utility usage, and “1” in your case is enabling backup of the volume with dump utility. The second “0” points to “fsck” utility for volume integrity check, and “2” in your case enables fsck check at stratup. Hope for your answer. Thx…

  32. jrios9 says:

    Hello! where could I find the answers for these RHEL7 RHCSA Sample exam 1 questions?

  33. daxster says:

    Question, Is there any difference in size between MB and M? in some of the practice exam objectives you ask to create a lv with the size of 200MB but then in the hint you show creating it using lvcreate -n lv_swap -L 200M. Would RedHat dock you on points for not having it the right size?

  34. jrios9 says:

    Hello!

    I have a big doubt! I have 3 types (options) about mounting a filesystem volume. Please could you tell us what is the best and the right way of mounting a volume? What is the difference between them? Could you explain it us please?

    Have in mind that the volume in these three options are the same.

    Option 01
    /dev/mapper/debianvg-vol01_data /Data xfs defaults 0 0

    Option 02
    UUID=ea0c3175-95c7-4355-bcb4-223a739eecea /Data xfs defaults 0 0

    Option 03
    /dev/debianvg/vol01_data /Data xfs defaults 0 0

    • CertDepot says:

      Options 02 and 03 work definitively but I suppose option 3 works too.
      In term of best way to mount a volume, I would say: option 02 (the best way because the most precise with the use of the UUID), option 03 (perfectly correct but slightly less precise) and option 01.

      • jrios9 says:

        I have to say thank you so much @CertDepot and @Lisenet,

        Thank you so much for your explanation and your time you gave it to answer my question. Now it’s totally clear!

        Regards!!!

    • Lisenet says:

      As you may be aware, LVM uses a device mapper. Both options 01 and 03 are symlinks to some block device (these can be found under /sys/block/). It shouldn’t really matter what symlink you use in the fstab up until it’s not broken.

      Option 02 uses a UUID. UUIDs are created when a partition gets formatted and are designed in a way so that collisions are unlikely. For the block device itself, the UUID is stored in the superblock. UUID is unique and stays that way even if the device is plugged into some other system.

      All three ways of mounting the volume are OK (by “OK” I mean they “work”). Use device mapper names if you don’t plan to rename volume groups/logical volumes, or stick with UUID otherwise.

  35. wiggler says:

    regarding item 14. does it need to be the same script on the solution or could be different as long as the output is the same?

    I have my script just like this:

    #!/bin/bash
    for N in seq 1 40; do fallocate -l2M /xfs/.file_$N; done

  36. scruff says:

    Hello guys! Regarding the 6-th question. What is the point of “2” in command “chmod 2770 /common”. It is a SGID, which relates only to executable files. There is no mentioning about executable date in the topic. So I suppose that “chmod 770 /common” will be enough. Let me know if I’m wrong.

    • CertDepot says:

      No, the SGID bit doesn’t only relate to executable files.

      SGID (Set Group ID up on execution) is a special type of file permissions given to a file/folder. Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user. SGID is defined as giving temporary permissions to a user to run a program/file with the permissions of the file group permissions to become member of that group to execute the file. In simple words users will get file Group’s permissions when executing a Folder/file/program/command.

      SGID is similar to SUID. The difference between both is that SUID assumes owner of the file permissions and SGID assumes group’s permissions when executing a file instead of logged in user inherit permissions.

      Source: http://www.linuxnix.com/sgid-set-sgid-linuxunix/

      • scruff says:

        Totally agree with you, Certdepot. But you also talked about only executable files in your comment. And in topic we are not mentioning executables. May be setting SUID/SGID is just best practices?

  37. jrios9 says:

    I passed the RHCSA exam, thank you so much #Certdepot.

    My next challenge is going to be the RHCE exam.

  38. knight says:

    How to answer the question? the answerbox just 1 line?
    please give 1 sample question and answer.

    Thank you

  39. knight says:

    Dear admin,

    How to answer the question in one line?
    Please give me sample way to answer sample example above.

  40. nomi says:

    Why can’t I see the score of my exam?

  41. onlytito1028 says:

    Will knowing how to do all these tasks put me at an advantage for the exam? I’ve answered all with man and –help as reference. I’m a bit nervous and this is my first certification exam. I’m taking it next month.

  42. satish says:

    What are some best books for RHCSA?

  43. TocXanh says:

    Hi everyone,

    I am new to this forum, hoping to practice all the questions on the site to prepare for the rhcsa exam. I am using centos 7, the first question is to install apache, I thought the centos 7 iso I downloaded and installed had everything I needed, apparently not, so I guess I have to register it to something, but probably not RH Satellite server, any help will greatly appreciated.

    tried yum install apache but it is not available.

    Thanks

    TocXanh

    • CertDepot says:

      Except if you installed a minimal iso image of CentOS 7 (in this case, you will need Internet access to get some additional packages from the CentOS repositories), you don’t need to register to anything. All the main packages are already inside the iso image. You will only have to set up a local repository.

    • Lisenet says:

      You need the following one:

      # yum install httpd

      Or you can go for a group install:

      # yum groupinstall -y web-server

  44. awkWard says:

    Ok, I am confused about the test… It does not allow me to input multiple commands… I tried to paste the hints, but that did not work either, can someone please help me get past this basic problem?

    • CertDepot says:

      Can you explain your problem?

    • mastyleki says:

      I did it in the next way:
      yum -y install httpd;firewall-cmd enable httpd; …
      This way you can enter all the commands in an appropriate way.
      The test says at the beginning that it is not going to correct anything but show it answers and comparing with yours, I understood that.

  45. mastyleki says:

    What a pity! I wrote all the exam but finally the answers do not appear comparing mines…
    Anyway I did practice

  46. diva says:

    How do I see answers?

  47. Ph.Bryab says:

    Hi Bryan here, from Ph. I’d like to know if the rhcsa 7 exam will configure the following services: Httpd, Dns, Dhcpd.
    Thanks in advance!

  48. Zorbeg says:

    Why do we need setroubleshoot-server for question 3?

    • CertDepot says:

      In fact, you’ve got at least two options: install either the setroubleshoot-server or the policycoreutils-python packages. As the policycoreutils-python package is a dependency of the setroubleshoot-server package, when you specify the setroubleshoot-server package, you install the policycoreutils-python package too.
      Several years ago, I decided it was easier to remember the setroubleshoot-server package name: it’s all!

  49. SpencerArnold888 says:

    Interesting test exam. Some of the questions (2 and 13) require existing configs to be in place. Shouldn’t the intro spell out more detailed pre-requisites for the exam system (1GB home filesystem formatted as “xfs” and the server in “multi-user” boot target)?

    There is no unlocking of the root user via a console in this exam, considering that not being able to do this prevents any further work on the exam, shouldn’t it be included by default?

    Could you spell out how to mark each question as complete, which seems to be putting text in the field below the question?

  50. mourad80 says:

    Hi
    Is user quota a prerequisite ans testable on RHCSA 7?

Leave a Reply

Upcoming Events (Local Time)

There are no events.

RHCSA7: Task of the day

Allowed time: 10 minutes.
Create two new user accounts "steve" and "oliver".
Create a group "team". Create a directory "shared".
All files put into the "shared" directory by "steve" or "oliver" should belong to the "team" group and be only visible by them.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a default secure MariaDB database called maria and back up the database with mysqldump.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...