Linux Flashcards

1
Q

Question 1 (00SJ.2). Under which directory would you expect to find log files?

A

C. Explanation: The /var directory is used on Linux to store files that may grow
unexpectedly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Question 2 (00SJ.2). Under which directory would you expect to find log files?

A

/usr

D. Explanation: Program files that are not required to boot a system are typically stored in a subdirectory below the /usr directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Question 3 (00SJ.2). Create a user account named serena, including a home directory and a description (or comment) that reads Pejman Azadi.

A

Do all this in one single command.

root@debian7:~# useradd -m -c ‘Pejman Azadi’ Pejman

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Question 4 (00SJ.2). Create a file named welcome.txt and make sure every new user will see this file in their home directory.

A

root@debian7:~# echo Hello > /etc/skel/welcome.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Question 8 (00SJ.2)Which of the following directories would typically not be mounted on its own dedicated device?

A

/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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Question 21 (00SJ.2) Which of the following file systems is used as the default in RHEL7?

A

B. Explanation: XFS is used as the default file system; partitions can still be formatted with other file systems, like Ext4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Question 24 (00SM.5) Which command should you use to install an RPM file that has been downloaded to your
computer?

A

yum install

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Question 25 (00SM.5). Which command enables you to find the RPM a specific file belongs to?

A

C. Explanation: Use the rpm -qf command to find which RPM package a
specific file comes from.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Question 26 (00SM.5). Which command shows the current version of RHEL you
are using?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. Which Linux command can be used to determine the available space on local hard-
    disk partitions?
A

df

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. 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?
A

chmod o+x /usr/local/bin/myapp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. 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?
A

/usr/local/bin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Which command line can be used to restart a running Linux system
    immediately?
A

shutdown -r now

How well did you know this?
1
Not at all
2
3
4
5
Perfectly