Linux Question
Linux Question
Linux Question
Rating
View Answer
You need to see the last fifteen lines of the files dog, cat and
horse. What command should you use?
View Answer
View Answer
View Answer
View Answer
View Answer
View Answer
View Answer
What command you execute to display the last five commands you
have entered? Which partitions might you create on mail server HDDs
other than the root, swap and boot partitions? Which partitioning tool
is available in all distributions? Which two commands can you use to
delete directories? Which file defines all users on your system?
View Answer
View Answer
View Answer
View Answer
View Answer
View Answer
What command would you type to use the cpio to create a backup
called backup.cpio of all the users' home directories? _____________
View Answer
Which daemon controls the network service -> POP3 mail service?
A) inetd B) pop3d C) maild D) nntpd E) pmaild
View Answer
View Answer
View Answer
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.
You have been assigned the task of determining if there are any
user accounts defined on your system that have not been used during
the last three months. Which log file should you examine to determine
this information? Choose one: a. /var/log/wtmp b. /var/log/lastlog
c. /var/log/utmp d. /var/log/messages
View Answer
You need to create a new group called sales with Bob, Mary and
Joe as members. Which of the following would accomplish this? Choose
one: a. Add the following line to the /etc/group file:
sales:44:bob,mary,joe b. Issue the command groupadd sales. c. Issue
the command groupadd -a sales bob,mary,joe d. Add the following line
to the /etc/group file: sales::44:bob,mary,joe
View Answer
View Answer
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.
View Answer
View Answer
View Answer
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
View Answer
View Answer
You want to ensure that your system is not overloaded with users
running multiple scheduled jobs. A policy has been established that
only the system administrators can create any scheduled jobs. It is
your job to implement this policy. How are you going to do this?
Choose one: a. create an empty file called /etc/cron.deny b. create a
file called /etc/cron.allow which contains the names of those allowed to
schedule jobs. c. create a file called /etc/cron.deny containing all
regular usernames. d. create two empty files called /etc/cron.allow
and /etc/cron.deny
View Answer
View Answer
View Answer
View Answer
You wish to print the file vacations with 60 lines to a page. Which
of the following commands will accomplish this? Choose one: a. pr -l60
vacations | lpr b. pr -f vacations | lpr c. pr -m vacations | lpr d. pr -l
vacations | lpr
View Answer
You want to print out a text file called vacations however the lines
are of varying length. What text filter could you use to even out the
length of the lines?
View Answer
View Answer
You have a tab delimited file called phonenos and want to change
each tab to four spaces. What command can you use to accomplish
this? Choose one: a. expand -t4 phonenos b. expand phonenos c.
expand -n4 phonenos d. expand -t phonenos
View Answer
You have a technician who will come in after hours to install new
hardware in your system. You do not want to give him the root
password, but he needs to be able to shutdown the system. How can
you accomplish this? Choose one: a. You cannot do this; only root can
run the shutdown command. b. Add his username to the
/etc/shutdown.conf file. c. Add his username to the
/etc/shutdown.allow file. d. Give him the root password and change it
when you arrive the next morning.
View Answer
You locate a command in the /bin directory but do not know what
it does. What command can you use to determine its purpose.
View Answer
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?
View Answer
View Answer
View Answer
View Answer
Bob Armstrong, who has a username of boba, calls to tell you he
forgot his password. What command should you use to reset his
command?
View Answer
View Answer
You have the /var directory on its own partition. You have run out
of space. What should you do? Choose one: a. Reconfigure your
system to not write to the log files. b. Use fips to enlarge the partition.
c. Delete all the log files. d. Delete the partition and recreate it with a
larger size.
View Answer
View Answer
View Answer
Is Linux Unix?
View Answer
View Answer
You routinely compress old log files. You now need to examine a
log from two months ago. In order to view its contents without first
having to decompress it, use the _________ utility.
View Answer
You are covering for another system administrator and one of the
users asks you to restore a file for him. You locate the correct tarfile
by checking the backup log but do not know how the directory
structure was stored. What command can you use to determine this?
Choose one: a. tar fx tarfile dirname b. tar tvf tarfile filename c. tar ctf
tarfile d. tar tvf tarfile
View Answer
View Answer
View Answer
You suspect that you have two commands with the same name as
the command is not producing the expected results. What command
can you use to determine the location of the command being run?
View Answer
View Answer
View Answer
View Answer
What would you type to send the last 20 lines of a text file to
STDIN? A) end -n 20 filename B) last -n 20 filename C) head -20
filename D) end -20 filename E) tail -20 filename
View Answer
View Answer
In order to prevent a user from logging in, you can add a(n)
________at the beginning of the password field.
View Answer
In order to run fsck on the root partition, the root partition must
be mounted as ___________.
View Answer
View Answer
What type of local file server can you use to provide the
distribution installation materials to the new machine during a network
installation? A) Inetd B) FSSTND C) DNS D) NNTP E) NFS
View Answer
View Answer
You wish to restore the file memo.ben which was backed up in the
tarfile MyBackup.tar. What command should you type?
View Answer
When you issue the command ls -l, the first character of the
resulting display represents the file's ___________.
View Answer
View Answer
View Answer
You have written a script called usrs to parse the passwd file and
create a list of usernames. You want to have this run at 5 am
tomorrow so you can see the results when you get to work. Which of
the following commands will work? Choose one: a. at 5:00 wed usrs b.
at 5:00 wed -b usrs c. at 5:00 wed -l usrs d. at 5:00 wed -d usrs
View Answer
How can you determine who has scheduled at jobs? Choose one:
a. at -l b. at -q c. at -d d. atwho
View Answer
View Answer
View Answer
You are going to reboot your system but want to warn your users
to log off. Which of the following commands will send a message to the
users. Choose one: a. init b. halt c. reboot d. shutdown
View Answer
When looking at the /etc/passwd file, you notice that all the
password fields contain 'x'. What does this mean? Choose one: a. That
the password is encrypted. b. That you are using shadow passwords.
c. That all passwords are blank. d. That all passwords have expired.
View Answer
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.
View Answer
What command should you use to check the number of files and
disk space used and each user's defined quotas?
View Answer
View Answer
View Answer
What key combination can you press to suspend a running job and
place it in the background?
View Answer
If you type the command cat dog &> cat what would you see on
your display? Choose one: a. Any error messages only. b. The
contents of the file dog. c. The contents of the file dog and any error
messages. d. Nothing as all output is saved to the file cat.
View Answer
View Answer
View Answer
View Answer
View Answer
Can Linux Use the Same Hard Drive as MS-DOS? OS/2? 386BSD?
Win95?
View Answer
View Answer
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, command, comment b.
username, UID, GID, comment, home directory, command c. UID,
username, GID, home directory, comment, command d. username,
UID, group name, GID, home directory, comment
View Answer
View Answer
View Answer
View Answer
What file would you edit in your home directory to change which
window manager you want to use? A) Xinit B) .xinitrc C) XF86Setup D)
xstart E) xf86init
View Answer
Where is a good place to store shell scripts that are for use by the
author? A) ~/bin B) /bin C) /usr/bin D) /root
View Answer
View Answer
Which two documents should you consult before making any final
purchasing recommendations? A) The overall Linux hardware
compatibility listing. B) The hardware compatibility listing for the
distribution you have chosen. C) The installation instructions for the
distribution you have chosen. D) System administration
documentation. E) Linux user documentation.
View Answer
View Answer
What command should you type to see all the files with an
extension of 'mem' listed in reverse alphabetical order in the
/home/ben/memos directory.
View Answer
What is the minimum number of partitions you need to install
Linux?
View Answer
View Answer
View Answer
Which two utilities can you use to set up a job to run at a specified
time? Choose one: a. at and crond b. atrun and crontab c. at and
crontab d. atd and crond
View Answer
View Answer
When defining a cronjob, there are five fields used to specify when
the job will run. What are these fields and what is the correct order?
Choose one: a. minute, hour, day of week, day of month, month b.
minute, hour, month, day of month, day of week c. minute, hour, day
of month, month, day of week d. hour, minute, day of month, month,
day of week
View Answer
View Answer
View Answer
You notice that your server load is exceptionally high during the
hours of 10 am to 2 noon. When investigating the cause, you suspect
that it may be a cron job scheduled by one of your users. What
command can you use to determine if your suspicions are correct?
Choose one: a. crontab -u b. crond -u c. crontab -l d. crond -l
View Answer
View Answer
What is the name and path of the default configuration file used by
the syslogd daemon?
View Answer
Question
Rating
View Answer
View Answer
You wish to have all mail messages except those of type info to
the /var/log/mailmessages file. Which of the following lines in your
/etc/syslogd.conf file would accomplish this? Choose one: a.
mail.*;mail!=info /var/log/mailmessages b. mail.*;mail.=info
/var/log/mailmessages c. mail.*;mail.info /var/log/mailmessages d.
mail.*;mail.!=info /var/log/mailmessages
View Answer
View Answer
View Answer
You wish to rotate all your logs weekly except for the
/var/log/wtmp log which you wish to rotate monthly. How could you
accomplish this. Choose one: a. Assign a global option to rotate all
logs weekly and a local option to rotate the /var/log/wtmp log
monthly. b. Assign a local option to rotate all logs weekly and a global
option to rotate the /var/log/wtmp log monthly. c. Move the
/var/log/wtmp log to a different directory. Run logrotate against the
new location. d. Configure logrotate to not rotate the /var/log/wtmp
log. Rotate it manually every month.
View Answer
You have configured logrotate to rotate your logs weekly and keep
them for eight weeks. You are running our of disk space. What should
you do? Choose one: a. Quit using logrotate and manually save old
logs to another location. b. Reconfigure logrotate to only save logs for
four weeks. c. Configure logrotate to save old files to another location.
d. Use the prerotate command to run a script to move the older logs to
another location.
View Answer
View Answer
View Answer
View Answer
You need to copy all the files and directories contained in the home
directory to another location. What utility can you use for this? Choose
one a. cpio b. cp c. mv d. mvdir
View Answer
You are creating new partitions in preparation for installing Linux.
You want to have five different partitions. You have successfully
created four partitions, but are unable to create the fifth one. What is
the problem? Choose one: a. Your hard drive is not large enough for
more than four partitions. b. You need to create the swap partition
last. c. You created four primary partitions. d. Linux cannot be
installed on more than four partitions.
View Answer
View Answer
View Answer
You are partitioning your second SCSI hard drive. What command
should you use? Choose one: a. fdisk sda2 b. fdisk sdb c. fdisk hdb d.
fdisk hda2
View Answer
While using fdisk what command would you use to see the
partition table? Choose one: a. w b. m c. w d. p
View Answer
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.
View Answer
View Answer
When you create a new partition, you need to designate its size by
defining the starting and ending _____________.
View Answer
When formating your partition with the mkfs command, you must
also pass to the command the type of filesystem and the number of
__________?
View Answer
View Answer
You have new documentation that you wish to install so that it will
be available to your users. Which directory would be the most
appropriate to use for these files? Choose one: a. /tmp b. /usr c. /lib
d. /mnt
View Answer
View Answer
View Answer
View Answer
What command should you use to check the number of files and
disk space used and each user's defined quotas?
View Answer
View Answer
View Answer
View Answer
What command should you type to see all the files with an
extension of 'mem' listed in reverse alphabetical order in the
/home/ben/memos directory. op
View Answer
Why should you track the amount of free space on your disks?
Choose one: a. If there is no free space, you will not be able to write
to that filesystem. b. If there is no free space, you will not be able to
install new applications. c. If the amount of free space becomes less
than 50 percent, then your system will slow down. d. If the amount of
free space is too low, your system will not boot.
View Answer
View Answer
View Answer
View Answer
You also need to know the amount of free space on the partition
containing the users' home directories. Which of the following
commands will provide this information? Choose one: a. df /home b. df
-i /home c. df --sync d. df -T
View Answer
What command would you type to use the cpio to create a backup
called backup.cpio of all the users' home directories?
View Answer
You notice that the amount of free space is getting low. When you
check the contents of the /tmp directory you find several hundred files
so you delete them. After deleting these temp files, you check the
amount of free space, however, it has not increased. What should you
do? Choose one: a. Move the /tmp directory to another partition. b.
Delete the partition containing the /tmp directory, recreate it and
restore its contents. c. Delete the /tmp directory and recreate it. d.
Run fsck on the filesystem containing the /tmp directory.
View Answer
View Answer
What type of local file server can you use to provide the
distribution installation materials to the new machine during a network
installation?
Question
Rating
View Answer
View Answer
View Answer
What command can you use to see the boot messages? Choose
one: a. dmesg b. cat kernel.messages c. logview d. man logs
View Answer
View Answer
View Answer
Each entry in the /etc/inittab file contains four fields the third of
which is the Action field. What is the purpose of this field? Choose one:
a. Identifies the entry b. Specifies the command to execute c. Defines
how to handle the entry. d. Defines which runlevels this line applies to.
View Answer
View Answer
View Answer
View Answer
How does single user mode differ from other runlevels? Choose
one: a. init does not read the /etc/inittab file b. Users can only log into
the system across the network. c. Network services are disabled. d. All
processes are stopped and the root filesystem is mounted as read-only
when in single user mode.
View Answer
View Answer
View Answer
View Answer
View Answer
View Answer
Modules are pieces of kernel code that you can load or unload.
What file do you use to pass parameters to a module? Choose one:
a. /etc/conf.mod b. /etc/modules c. /etc/inittab d. /etc/conf.modules
View Answer
View Answer
You have installed a new UPS (Uninterruptable Power Supply) and
the powerd daemon. Which file should you use to define the steps to
be taken in the case of a power failure? Choose one: a. /etc/ups.conf
b. /etc/inittab c. /etc/power.conf d. /etc/conf.ups
View Answer
You have made changes to the /etc/inittab file after installing your
UPS. How do you institute these configuration changes without having
to reboot your computer or have your users log off? Choose one: a.
Issue the command source /etc/inittab. b. Change the runlevel to
single user mode. c. Issue the init q command. d. The init daemon
only reads its configuration file during boot.
View Answer
You have made changes to the LILO configuration file but you are
not sure the changes will work. How can you test the new
configuration without installing it? Choose one: a. LILO -t b. LILO -c
filename c. LILO -s filename d. LILO
View Answer
View Answer
View Answer
When booting your system after installing LILO you see LIL and
then nothing happens. What could be the problem. Choose one: a.
LILO loaded successfully but the kernel is corrupt. b. LILO is not
installed properly. c. LILO could only complete the first stage, usually a
geometry mismatch. d. LILO could not load the map file, usually media
failure.
View Answer
You are going to install a new hard disk in your system. Which of
the following commands will halt your system so you can install the
new hardware? Choose one: a. shutdown -k now b. shutdown -h now
c. shutdown -r now d. shutdown -t now
View Answer
You want to review the man page on the files used to control hosts
access, however, when you enter man hosts_access you get the man
page for the routines used to programaticlly manipulate access. What
is the problem? Choose one: a. The page you are looking for does not
exist on your system. b. The page you are looking for resides in a
directory that is searched later. c. You typed the name of the page
incorrectly. d. The installation of man pages on your system is corrupt.
View Answer
You want to find how to set the manpath variable so you type man
man. What would you type while displaying the page to find the
location where manpath is discussed? Choose one: a. grep manpath b.
find manpath c. /manpath d. locate manpath
View Answer
You wish to find the man page that discusses how to change a
password. You type man password but get the message that no
manual entry for password exists. What command will find the
appropriate page? Choose one: a. man -C password b. man -k
password c. man -c password d. man -q password
View Answer
View Answer
View Answer
View Answer
View Answer
View Answer
You need to update your HOWTOs. Where should you go to acquire
the latest versions? Choose one: a. Linux Mall and order a new CD. b.
Your local Linux Users Group should have a copy. c. The web site for
your distribution. d. Linux Documentation Project
View Answer
View Answer
What command must you run to update the database used by the
whatis command? Choose one: a. makewhatis b. updatedb c. make
whatisdb d. The database is updated automatically.
View Answer
View Answer
View Answer
View Answer
Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Next
ADVERTISEMENT
online marketing
User Options
• Home
• Ask Questions
• About Us
• Feedback
• Contact Us
•
Sponsored Links
Latest 10 Questions
What is a intranet ?
Please describe the main stages of a booting Linux machine (x86) to the login
prompt?
Why the multiple inheritance is not possible in java and if possible HOW??
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 -lc prize kickoff b. grep -cw prize kickoff c.
grep -vi prize kickoff d. grep -iw prize kickoff
View Answer
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.
View Answer
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
View Answer
You have created special configuration files that you want copied
to each user's home directories when creating new user accounts. You
copy the files to /etc/skel. Which of the following commands will make
this happen? Choose one: a. useradd -m username b. useradd -mk
username c. useradd -k username d. useradd -Dk username
View Answer
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 /home/bob/memos d. tar xf memos.tar
/home/bob/memos
View Answer
View Answer
View Answer
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
View Answer
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.
View Answer
All groups are defined in the /etc/group file. Each entry contains
four fields in the following order. Choose one: a. groupname,
password, GID, member list b. GID, groupname, password, member
list c. groupname, GID, password, member list d. GID, member list,
groupname, password
View Answer
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.
View Answer
View Answer
You want to make it possible for your users to mount floppy disks.
What do you need to do? Choose one: a. Tell your users the password
for root as floppies can only be mounted by root. b. Edit the mtab file
and add the user option on the floppy entry. c. Edit the fstab file and
add the ro option on the floppy entry. d. Edit the fstab file and add the
user option on the floppy entry.
View Answer
You changed the GID of the sales group by editing the /etc/group
file. All of the members can change to the group without any problem
except for Joe. He cannot even login to the system. What is the
problem? Choose one: a. Joe forgot the password for the group. b. You
need to add Joe to the group again. c. Joe had the original GID
specified as his default group in the /etc/passwd file. d. You need to
delete Joe's account and recreate it.
View Answer
View Answer
When you look at the /etc/group file you see the group kmem
listed. Since it does not own any files and no one is using it as a
default group, can you delete this group?
View Answer
View Answer
You have set quotas for all your users but half of your users are
using more space than they have been allotted. Which of the following
could be the problem? Choose one: a. You have too many users on
your system. b. Users' home directories are located on two different
partitions. c. Your kernel does not support setting disk quotas. d. You
did not turn quotas on with the quotaon command.
View Answer