Linux Flashcards
Question 1 (00SJ.2). Under which directory would you expect to find log files?
C. Explanation: The /var directory is used on Linux to store files that may grow
unexpectedly.
Question 2 (00SJ.2). Under which directory would you expect to find log files?
/usr
D. Explanation: Program files that are not required to boot a system are typically stored in a subdirectory below the /usr directory.
Question 3 (00SJ.2). Create a user account named serena, including a home directory and a description (or comment) that reads Pejman Azadi.
Do all this in one single command.
root@debian7:~# useradd -m -c ‘Pejman Azadi’ Pejman
Question 4 (00SJ.2). Create a file named welcome.txt and make sure every new user will see this file in their home directory.
root@debian7:~# echo Hello > /etc/skel/welcome.txt
Question 8 (00SJ.2)Which of the following directories would typically not be mounted on its own dedicated device?
/etc
A. Explanation: The /etc/directory contains configuration files that are needed while your server boots. Putting /etc on a dedicated device would make your server unbootable.
Question 13 (00SJ.2) Which of the following commands would give the most accurate overview of mounted disk devices (without showing much information about mounted sys-tem devices as well)? And why?
df -T
C. Explanation: The df -h command shows mounted devices
and the amount of disk space currently in use on these
devices. The -T option helps in recognizing real file systems
(as opposed to kernel interfaces) because it shows the file
system type as well.
Question 21 (00SJ.2) Which of the following file systems is used as the default in RHEL7?
B. Explanation: XFS is used as the default file system; partitions can still be formatted with other file systems, like Ext4.
Question 24 (00SM.5) Which command should you use to install an RPM file that has been downloaded to your
computer?
yum install
Question 25 (00SM.5). Which command enables you to find the RPM a specific file belongs to?
C. Explanation: Use the rpm -qf command to find which RPM package a
specific file comes from.
Question 26 (00SM.5). Which command shows the current version of RHEL you
are using?
A. Explanation: The uname -r command shows the current kernel version. The
uname -v command gives information about the hardware in your computer,
and the procinfo command does not exist.
- Which Linux command can be used to determine the available space on local hard-
disk partitions?
df
- Suppose you have created a new application ‘myapp’, and copied it to the directory
‘/usr/local/bin’. You would like all the users of the system to be able to run your
application. Which of the following command lines would allow the appropriate access?
chmod o+x /usr/local/bin/myapp
- According to the Linux filesystem hierarchy standard, which of the following
directories would be an appropriate location for a user to install a shared application
to?
/usr/local/bin
- Which command line can be used to restart a running Linux system
immediately?
shutdown -r now