Вы находитесь на странице: 1из 6

Assignment-4

Review Questions
1. What command can you use to list the package in the RPM database
that the /etc/hosts file belongs to?
Ans: rpm -qf/etc/hosts
2. Which of the following can be used to automatically obtain software
packages from internet software repositories?
a) yum
c) apt-get
d) yast i
3. What command can you use to rebuild the RPM database?
Ans: rpm --rebuilddb
4. You have downloaded the source code for a program that you wish to
compile. Which command must you first run in the source code
directory?
a) ./configure
5. Which of the following commands can be used to list the shared
libraries used by the Bash shell (/bin/bash)?
b) ldd v /bin/bash
6. Which of the following are always stored in the /etc/passwd file?
b) User home directory locations
c) the default shell that each user uses
d) primary groups for each user
7. When you check the /etc/shadow file on your system, you notice that
the date of the last password change is 12904. What does this number
represent?
c) The number of days since January 1st 1970.

8. Which of the following file are used to obtain default user account
settings when you create a user with the useradd command? (choose
all that apply)
a) /etc/login.defs
c) /etc/default/useradd
9. You have a file created Policies&Procedures.txt that you wish to place
in the home directories of all newly created users. What directory
should you place this file in?
Ans: /etc/skel/
10.
After creating a new user account, what must you do to allow the
user to log in to the system?
Ans: Create password
11.
What two commands below can be used to create the group
acctg and add the user bob to it?
b) groupadd acctg
c) groupmod A bob acctg
12.
What command can be used to list the users who have logged
into the system recently but who are not currently logged in?
Ans: last
13.
Which of the following file permissions gives the group owner the
ability to edit the file contents?
a) rw-rw-r-x
d) r--rw-r-x
14.
What single command could you use to change the owner to bob
and the group owner to acctg for the file /etc/yearend?
Ans: chown bob.acctg /etc/yearend
2

15.
What command could you use change the permissions on the file
/etc/yearend to rw-rw-rusing octal notation?
Ans: chmod 664 /etc/yearend
16.
What permissions does the system give to new files and
directories by default prior to applying the umask?
b) Files receive 666 and directories receive 777
17.
What will the permission be on a new directory if the umask is
set to 027 ?
Ans:.

{default permission

rwx rwx rwx


7

umask

--- -w0

7
rwx
2

..............

Illastration.

result

rwx r-x
7

--5

18.
Which of the following commands will set the Sticky bit special
per mission on the directory /public ?
a) chmod 1777 /public
d) chmod 7777 /public
19.
Which of the following commands can be used to set the
immutable attribute on a file called file1 ?
d) chattr +i file1
20.

What key within fdisk can be used to change the partition type?

Ans: t

21.
Which of the following commands can be used to create an ext2
file system?
a) mkfs
b) mke2fs
c) mkfs.ext2
22.
You have just created a swap partition (/dev/sda3) using fdisk.
What commands must you now run to ensure that the swap partition is
usuable by system?
b) mkswap /dev/sda5
c) swapon/dev/sda5
23.
What file must you edit to ensure that your new swap partition in
question 22 is available by the system after each boot?
Ans: Fstab
24.

What command can be used to show disk usage by file system?

b) df
25.
You have enabled user and group quotas on the file system that
is mounted to the /var directory. Which files contain the quota limits?
a) /var/aquota.group
b) /var/aquota.user
26.
What command can you use to modify the grace period for quota
soft limits?
Ans: edquota -t
27.
What command would you use to check a ReiserFS file system
for errors?
b) reiserfsck

28.
You cannot unmount a file system that you had previously
mounted to the /mnt directory. What command can show you which
users are still using the /mnt directory?
Ans: Mount
29.
You need to add another shared directory on your NFS server
for /data. What steps must you perform?
a) Add the /data directory to the /etc/exports file
b) run the exportfs -a command
30.

Which of the following utilities can be used to monitor NFS?

c) showmount
d) rpcinfo
31.
Which backup type only includes files that were modified since
the last full backup?
c) differential
32.
Which of the following archive utilities must be given a list of files
to archive via stdin?
a) cpio
33.
What tar command would you use to create a gzip-compressed
archive file called /root/myfile.tar.gz that contains the entire contents
of the /opt directory/
Ans: tar -zcvf /root/myfile.tar.gz /opt
34.
What command can be used to obtain a hardware report for your
system?
Ans: hwinfo
35.
What file in the /proc directory can be used to list the features
supported by your systems CPU?
5

Ans: /proc/cpuinfo
36.
Which of the following commands can be used to insert a kernel
module into the Linux kernel?
a) insmod
b) modprobe

Вам также может понравиться