Free RHCSA Linux System Administration Questions and Answers — Questions and Answers
Question 1: For TestGeeks Inc., you are a network administrator. The business's network is built on Linux. An individual complains that his Linux PC reboots sometimes.
- /var/log/messages (Correct answer)
- /var/log/wtmp
- /var/log/dmesg
- /var/log/bootmsg
Correct answer: /var/log/messages
To troubleshoot the issue of a Linux computer rebooting occasionally, the file that would provide the required information is "/var/log/messages." <br> <br> The "/var/log/messages" file is a system log file that records various system messages, including information about system events, errors, and warnings. It contains a wide range of information related to system activities, network events, hardware issues, and software errors.
Question 2: You are employed at Net World Inc. as a network administrator. The business's network is built on Linux. You wish to use a Linux workstation to mount an SMBFS share. Which command from the list below can you use to complete the task? <br> Each correct answer represents a complete solution. Choose two.
- mount -t smbfs (Correct answer)
- smbmount (Correct answer)
- smbfsmount
- mount smb
Correct answer: mount -t smbfs
The command 'mount -t smbfs' works because the -t flag specifies the filesystem type, and 'smbfs' is the identifier for an SMB/Samba share. 'smbfsmount' and 'mount smb' are not valid commands or filesystem-type specifications recognized by the mount utility.
Question 3: You are TestGeeks Inc.'s network administrator. The business's network is built on Linux. You're interested in discovering who owns the /etc/inittab file. Which command from the list below will you use to complete the task?
- rpm -i /etc/inittab
- pm -e /etc/inittab
- rpm -qf /etc/inittab (Correct answer)
- rpm -qa /etc/inittab
Correct answer: rpm -qf /etc/inittab
rpm -qf /etc/inittab is correct because the -qf (query file) option tells RPM to report which installed package owns a given file. The -i flag installs a package, -e erases one, and -qa lists all packages rather than performing a file-to-package ownership lookup.
Question 4: On a Linux computer, which of the following files is used to initialize a system-wide environment?
- /etc/startup
- tc/group
- /etc/profile (Correct answer)
- /etc/syslog.conf
Correct answer: /etc/profile
The file used to initialize a computer-wide environment on a Linux computer is /etc/profile. <br> <br> The /etc/profile file is a system-wide initialization script that is executed during the login process for all users on the system. It sets up the environment variables and executes commands that need to be run for every user's shell session.
Question 5: Which of the following commands enables a Linux server administrator to switch between run levels without having to restart the server?
- init (Correct answer)
- su
- cngrl
- mount
Correct answer: init
The init command helps an administrator to switch a Linux server to different run levels without rebooting the server. <br> <br> The init command is responsible for managing the system's run levels, which determine the state and functionality of the system. By specifying a run level as an argument to the init command, you can switch the system to that particular run level without requiring a reboot.
Question 6: For TestGeeks Inc., you are a network administrator. Linux powers the organization's network. On the network, you have set up a Linux Web server. When a user submits a request, the Web server does not respond. The HTTPD process appears in several instances in the server's process list. You must terminate the Web service. Which command from the list below will you use to fix the problem?
- killall httpd (Correct answer)
- stop httpd
- stopall httpd
- kill httpd
Correct answer: killall httpd
To resolve the issue of multiple instances of the HTTPD (Apache) process and stop the web service on a Linux server, you can use the killall command followed by the name of the process you wish to terminate.
Question 7: Which of the aforementioned commands or options may be used to list the installed services and the runlevels that go with them?
- chkconfig (Correct answer)
- config
- xconfig
- menuconfig
Correct answer: chkconfig
The chkconfig command in Linux can be used to list the installed services and their associated runlevels.
For TestGeeks Inc., you are a network administrator.
The business's network is built on Linux.
An individual complains that his Linux PC reboots sometimes.