¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@
¼Ò ÀÀ ´ú Åç ¤@
1. Which of the following interprets your actions when typing at the command
line for the operating system?
Choose One
a. Utility
b. Application
c. Shell
d. Command
2.What can you type at a command line to determine which shell you are using?
3.You want to enter a series of commands from the command-line. What would
be the quickest way to do this?
Choose One
a. Press enter after entering each command and its arguments
b. Put them in a script and execute the script
c. Separate each command with a semi-colon ";" and press enter after
the last command
d. Separate each command with a / and press enter after the last command
4.You are entering a long, complex command line and you reach the right side
of your screen before you have finished typing. You want to finish typing the
necessary commands but have the display wrap around to the left. Which of the
following key combinations would achieve this?
Choose One
a. Esc, /, Enter
b. \ , Enter
c. /, enter
d. esc, \, ctrl-d
5.In your present working directory, you have the files maryletter memo1 MyTelephoneandAddressBook
What is the fewest number of keys you can type to open the file MyTelephoneandAddressBook
with vi?
Choose one
a. 6
b. 28
c. 25
d. 4
6.You have installed a new application but when you type in the command to
start it you get the error message
Command not found
What do you need to do to fix this problem?
Choose one
a. Add the directory containing the application to your path
b. Specify the directory's name whenever you run the application
c. Verify that the execute permission has been applied to the command.
d. Give everyone read, write and execute permission to the application's directory.
7.Which of the following environment variables determines your working directory
at the completion of a successful login?
Choose one
a. HOME
b. BASH_ENV
c. PWD
d. BLENDERDIR
8.Every time you attempt to delete a file using the rm utility, the operating
system prompts you for confirmation. You know that this is not the customary
behavior for the rm command. What is wrong?
Choose one
a. rm has been aliased as rm -i
b. The version of rm installed on your system is incorrect.
c. This is the normal behavior of the newest version of rm.
d. There is an incorrect link on your system.
9.Using command substitution, how would you display the value of the present
working directory?
Choose one
a. echo $(pwd)
b. echo pwd
c. $pwd
d. pwd | echo
10.You need to search the entire directory structure to locate a specific file.
How could you do this and still be able to run other commands while the find
command is still searching for your file?
Choose one
a. find / -name filename &
b. find / -name filename
c. bg find / -name filename
d. &find / -name filename &
11. In order to create a file called DirContents containing the contents of the /etc directory you would type ____________.
12. What utility can you use to show a dynamic listing of running
processes? __________
13. Which command can be used to change the priority of a running process?
-------------
14. What key combination can you press to suspend a running job and place it in the background? ------------------
15. You issue the command jobs and receive the following output:
[1]- Stopped (tty output) top
[2]+ Stopped (tty output) MyScript
How would you bring the MyScript process to the foreground?
Choose one:
a. fg %2
b. ctrl-c
c. fg MyScript
d. ctrl-z
16. While logged on as a regular user, your boss calls up and wants you to
create a new user account immediately. How can you do this without first having
to close your work, log off and logon as root?
Choose one:
a. Issue the command rootlog.
b. Issue the command su and type exit when finished.
c. Issue the command su and type logoff when finished.
d. Issue the command logon root and type exit when finished.
17. Which file defines all users on your system?
Choose one:
a. /etc/passwd
b. /etc/users
c. /etc/password
d. /etc/user.conf
18. There are seven fields in the /etc/passwd file. Which of the following
lists all the fields in the correct order?
Choose one:
a. username, UID, GID, home directory, shell, comment
b. username, UID, GID, comment, home directory, shell
c. UID, username, GID, home directory, comment, shell
d. username, UID, group name, GID, home directory, comment
19. In order to prevent a user from logging in, you can add a(n) _____________
at the beginning of the password field in /etc/passwd.
20. Bob Armstrong, who has a username of boba, calls to tell you he forgot
his password. What command should you use to reset his password?
--------------------------
21.Your company has implemented a policy that users' passwords must be reset
every ninety days. Since you have over 100 users you created a file with each
username and the new password. How are you going to change the old passwords
to the new ones?
Choose one:
a. Use the chpasswd command along with the name of the file containing the new
passwords.
b. Use the passwd command with the -f option and the name of the file containing
the new passwords.
c. Open the /etc/passwd file in a text editor and manually change each password.
d. Use the passwd command with the -u option.
22. You issue the following command
useradd -m bobm
But the user cannot logon. What is the problem?
Choose one:
a. You need to assign a password to bobm's account using the passwd command.
b. You need to create bobm's home directory and set the appropriate permissions.
c. You need to edit the /etc/passwd file and assign a shell for bobm's account.
d. The username must be at least five characters long.
23. Mary has recently gotten married and wants to change her username from
mstone to mknight. Which of the following commands should you run to accomplish
this?
Choose one:
a. usermod -l mknight mstone
b. usermod -l mstone mknight
c. usermod -u mknight mstone
d. usermod -u mstone mknight
24. After bob leaves the company you issue the command userdel bob. Although
his entry in the /etc/passwd file has been deleted, his home directory is still
there. What command could you have used to make sure that his home directory
was also deleted?
Choose one:
a. userdel -m bob
b. userdel -u bob
c. userdel -l bob
d. userdel -r bob
25. When looking at the /etc/passwd file, you notice that all the password
fields contain 'x'. What does this mean?
Choose one:
a. That you are using shadow passwords.
b. That all passwords are blank.
c. That all passwords have expired.
26. In order to improve your system's security you decide to implement shadow passwords. What command should you use?--------------------------
27. What file contains the default environment variables when using the bash
shell?
Choose one:
a. ~/.profile
b. /bash
c. /etc/profile
d. ~/bash
28. You have created a subdirectory of your home directory containing your
scripts. Since you use the bash shell, what file would you edit to put this
directory on your path?
Choose one:
a. ~/.profile
b. /etc/profile
c. /etc/bash
d. ~/.bash_logout
29. You are installing Linux into a computer with two IDE hard drives. You
plan on dividing each hard drive into two partitions. What are the names of
the partitions?
Choose one:
a. hda1, hda2, hda3, hda4
b. hda1, hda2, hdb1, hdb2
c. sda1, sda2, sdb1, sdb2
d. sda1, sda2, sda3, sda4
30. You are partitioning your second SCSI hard drive. What command should you
use?
Choose one:
a. fdisk /dev/sda2
b. fdisk /dev/sdb
c. fdisk /dev/hdb
d. fdisk /dev/hda2
31. What type would you set on a partition to make it a swap partition?
Choose one:
a. 82
b. 83
c. s
d. swap
32. What command should you use to check the integrity of the filesystem on your disk.? --------------------
33. You have a new, empty hard drive that you will use for Linux. What is the
first step you use.
Choose one:
a. Create an extended partition to be used for data.
b. Format the hard drive to use the ext2 filesystem.
c. Create a swap partition of type 82.
d. Create a primary partition using fdisk.
34. Which of the following commands will show a list of the files in your home
directory including hidden files and the contents of all subdirectories?
Choose one:
a. ls -c home
b. ls -aR /home/username
c. ls -aF /home/username
d. ls -l /home/username
35. Which of the following commands will combine the contents of the files
tom and betty into a new file called friends?
Choose one:
a. ls tom betty > friends
b. cat tom betty > friends
c. more tom betty >> friends
d. cat tom; cat betty > friends
36. You attempt to delete a file called sales.mem using the rm command but
the command fails. What could be the problem?
Choose one:
a. You do not have delete rights to the file called sales.mem.
b. You need to use the -i option with rm to delete a file.
c. You do not have write rights to the directory containing the sales.mem file.
d. You are not the owner of the file sales.mem.
37. You need to create two new directories in your home directory. The first
one is called /home/bob/letters and the second one is /home/bob/letters/sales.
Which of the following command lines should you use?
Choose one:
a. mkdir ¡Vp /home/bob/letters/sales
b. mkdir letters; mkdir sales
c. mkdir letters/sales
38. You have a file named 'kickoff' and would like to find every line beginning
with a number. Which of the following commands will accomplish this?
Choose one:
a. grep [0-9] kickoff
b. grep ^[0-9] kickoff
c. grep [0-9]$ kickoff
d. grep $[0-9] kickoff
39. You search for the word prize in the file kickoff by typing grep prize
kickoff. However you also find lines containing prize as part of a word such
as prizes but do not find Prize. How should you change the command to find all
occurrences of prize as a word and not part of a word?
Choose one:
a. grep -c prize kickoff
b. grep -cw prize kickoff
c. grep -vi prize kickoff
d. grep -iw prize kickoff
40. You want to verify which lines in the file kickoff contain 'Bob'. Which
of the following commands will accomplish this?
Choose one:
a. sed -n /Bob/p kickoff
b. sed /Bob/p kickoff
c. sed -n 'Bob p' kickoff
d. sed /Bob/ kickoff
41 You have a new application on a CD-ROM that you wish to install. What should
your first step be?
Choose one:
a. Read the installation instructions on the CD-ROM.
b. Use the mount command to mount your CD-ROM as read-write.
c. Use the umount command to access your CD-ROM.
d. Use the mount command to mount your CD-ROM as read-only.
42.One of your users calls to tell you that he cannot save a new file he has
created in his home directory. You check his disk quota and find that he is
using less than 50 percent of the space he is allotted. What could be the problem?
Choose one:
a. He is presently a member of a group that has exceeded its disk space quota.
b. He has not named the file correctly.
c. The system is corrupt.
d. He needs to specify the absolute path when naming the file.
43. How does the locate and find commands differ in their method of searching?
Choose one:
a. locate uses the locatedb database and find searches the directory tree.
b. find uses the finddb database and locate searches the directory tree.
c. find searches the directory tree and the locate command only searches known
directories.
d. Both locate and find searches the directory tree.
44. You issue the command ls -l memos and get the following output
-rw-rw-r-- 1 bob group01 17249 Sep 7 10:08 accounting
-rw-rw-r-- 1 bob group01 7202 Sep 17 9:10 administration
-rw-rw-r-- 1 root group01 13367 Sep 1 12:58 humres
-rw-rw-r-- 1 bob group01 9449 Sep 22 7:34 sales
Bob opens the humres file and makes changes, however, he is unable to save the
file after making changes. What is the problem?Choose one:
a. Bob is not a member of the group01 group and only has read access.
b. Bob's quota has been exceeded.
c. Only the owner of a file can make changes to it.
d. The file humres is corrupted and he needs to save his changes to another
file.
45. You have a file called administration with the following attributes
-rw-rw-r-- 1 root admin 7202 Sep 17 9:10 administration
George is a member of the admin group and Bob is a member of the sales group.
Both George and Bob need to make changes to this file. What permissions do George
and Bob have to the file?
Choose one:
a. George has read and write permissions and Bob has read permission.
b. Bob has read and write permissions and George has read permission.
c. Both George and Bob have read and write permissions.
d. Both George and Bob have read permission only.
46. You have a directory with the following permissions
drwxrw--w- 1 root admin 7202 Sep 17 9:10 administration
and need to give everyone except root read only access to it. Which of the following
commands will accomplish this?
Choose one:
a. chmod uo=r administration
b. chmod ug+r administration
c. chmod uo+r administration
d. chmod og=r administration
47. Your default umask is 002. What does this mean?
Choose one:
a. Any file you create will have the permissions set as owner and group having
read and write permissions; others as read only.
b. Any file you create will have the permissions set as owner and group having
read, write and execute permissions; others as read and execute.
c. Any directoy you create will have the permissions set as owner and group
having read, write and execute permissions; others as read and write permissions.
d. Any directory you create will have the permissions set as owner and group
having read and write permissions; others as read only.
48. Which of the following commands will replace all occurrences of the word
rate with the word speed in the file racing?
Choose one:
a. sed s/rate/speed/g racing
b. sed -n s/rate/speed/ racing
c. sed s/rate/speed/ racing
d. sed s2/rate/speed/ racing
49. You have a file called phonenos that consists of two fields per line, telephone
number and name, with the fields being separated by a comma (,). You want to
have a list of the names only. Which command will accomplish this?Choose one:
a. cut ¡Vd, -f2 phonenos
b. cut -d, -f1 phonenos
c. cut -d -f2 phonenos
d. cut -f2 phonenos
50. What text filter can you use to display a multi-page file and place numbers at the beginning of each line.---------------------
51. What text filter can you use to display a binary file in octal numbers?
-------------------
52. You have a file called phonenos that is almost 4,000 lines long. What text
filter can you use to split it into four pieces each 1,000 lines long?
-----------------------
53. If you type the command cat file1 &>file2 ,what would you see on
your display?
Choose one:
a. Any error messages only.
b. The contents of the file file1.
c. The contents of the file file1 and any error messages.
d. Nothing as all output is saved to the file file2.
54. If you type the command cat dog 1>cat1 2> horse where would the output
be sent?
Choose one:
a. Any error messages would be saved to the file horse and the standard output
would be saved to the file cat1.
b. Any error messages would be saved to the file cat1 and the standard output
would be saved to the file horse.
c. The contents of the file dog and any error messages would be saved to the
file horse.
d. The contents of the files dog and cat1 would be saved to the file horse.
55 What is the results of the command cat horse | tee dog?
Choose one:
a. The contents of the file horse would be displayed on the screen and saved
in a new file called dog.
b. The contents of the file horse would be displayed on the screen.
c. The contents of the file horse would saved in a new file called dog.
d. The contents of the files horse and dog would be displayed on the screen.
56. Each inode contains extensive information on a file. Which of the following
is not contained in the inode.
Choose one:
a. file size
b. filename
c. file's owner
d. number of links to the file
57. In order to run fsck on the root partition, the root partition must be mounted as ______________.
58. You are using tar to create a tarfile of the files contained in the /home/bob/memos
directory. After making the /home/bob/memos directory your working directory,
which of the following commands will create the file?
Choose one:
a. tar cf memos.tar .
b. tar xf memos.tar .
c. tar cf memos.tar
d. tar xf memos.tar /home/bob/memos
59. You have a file called docs.Z but do not know what it is. What is the easiest
way to look at the contents of the file?
Choose one:
a. Use zcat to display its contents.
b. Use uncompress to expand the file and then use emacs to display the files
contents.
c. Copy the file to a floppy disk and uncompress it under Windows.
d. Use tar -xt to display the file's contents.
60. You issue the command mount without any options and the following output
is displayed
/dev/hda1 on / type ext2 (rw)
none on /proc type proc (rw)
/dev/hda9 on /home type ext2 (rw)
/dev/hda7 on /tmp type ext2 (rw)
/dev/hda5 on /usr type ext2 (rw)
/dev/hda6 on /var type ext2 (rw)
What does this output mean?
Choose one:
a. This is a listing of all the available filesystems that may be mounted on
your system and is taken from the /etc/fstab file.
b. This is a listing of all the mounted filesystems on your system and is taken
from the /etc/mtab file.
c. This is a listing of all the available filesystems that may be mounted on
your system and is taken from the /etc/mtab file.
d. This is a listing of all the mounted filesystems on your system and is taken
from the /etc/fstab file.