Thanks for Visiting my channel
331. Which of the following tools are used when creating a new partition for data storage on a Linux system?
A. fdisk
B. format
C. mkfs
D. mount
Answer – – A, C and D
Description – When creating a new partition for use, the fdisk utility is used to create the partition, the mkfs utility is used to format the partition, and the mount utility is used to mount the file system for use.
332. The __________ utility provides a summary of disk space used in the pwd.
Answer – – du
Description – The du utility is used to display directory space usage information.
333. Which command is used to edit user quotas?
A. quota
B. quotaon
C. edquota
D. vi
Answer – – C
Description – The quota command is used to view user quotas. The quotaon command is used to enable quotas. The edquota command is used to edit disk quotas. The vi editor is started by the edquota command when editing quotas.
334. The umask of 002 would produce what default file permissions?
A. -rwxrwxrw-
B. -rw-rw-r–
C. ———x
D. -rwxrwxr-x
Answer – – D
Description – The umask of 002 would be used to filter the write permission for other users.
335. What access rights are required for the /etc/shadow file?
A. -r——–
B. -rw-rw-r–
C. -r–r—–
D. -rwxr–r–
Answer – – A
Description – The /etc/shadow file must be readable by only the root user.
336. Which command will immediately shut down a computer running Linux?
A. shutdown
B. telinit 6
C. shutdown now
D. telinit 0
Answer – – D
Description – The shutdown command, when used alone, will switch to single-user mode. The telinit command can be used to change runlevels, with level 6 used for rebooting and level 0 used to halt or shut down the system.
337. A new user (Debbie) needs access to the companies Linux system, what must be done so that she can access the system with the userid debbie? (Select all that apply.)
A. useradd debbie
B. group debbie
C. shadow debbie
D. passwd debbie
Answer – – A and D
Description – The useradd command is used to create new user accounts while the passwd command is used to set the user’s password.
338. Which command would give the owner and group of myfile the permissions of read and execute while all others have read access?
A. chmod 003 myfile
B. chmod 554 myfile
C. chmod 331 myfile
D. chmod 662 myfile
Answer – – B
Description – The permissions of read and execute have a numeric value of 5 while the read permission has a value of 4.
339. Which command would be used to view a description of the tar utility including the options available for use?
A. more tar
B. grep tar
C. man tar
D. help tar
Answer – – C
Description – The more utility is used to view a file one page at a time. The grep utility is used to search a file. The man utility is used to present manual pages that contain information about commands. The help utility displays information only for built-in commands.
340. _____________ is the location of files that are copied to each user’s home directory.
Answer – – /etc/skel.
Description – Files that are to be copied to each user’s home directory should be placed in the /etc/skel directory.
341. The PS1 environment variable is used to define which of the following?
A. command path
B. home directory
C. shell prompt
D. signature file
Answer – – C
Description – The shell prompt is configured with the PS1 environment variable. The PATH variable is used for the command path while the home directory is contained in the HOME variable.
342. Which of the following would change the user’s pwd to their home directory regardless of their current pwd? (Select all that apply.)
A. cd
B. cd ..
C. cd~
D. cd $HOME
Answer – – A, C and D
Description – The cd command, when used alone, changes the user’s pwd to their home directory. The $HOME variable and the ~ also can be used to represent the user’s home directory. The cd .. command is used to move up one directory in the directory tree.
343. Which of the following directories is used to store system utilities used by the superuser?
A. /etc
B. /root
C. /sbin
D. /usr/local
Answer – – C
Description – The /etc directory contains many of the configuration files for the system. The /root directory is the home directory for the root user. The /sbin directory contains utilities used by the superuser. The /usr/local directory is used to store software that isn’t part of the operating system.
344. Where are the user shells assigned?
A. /etc/skel
B. /etc/passwd
C. /etc/profile
D. LILO
Answer – – B
Description – The /etc/passwd file is used to store shell script assignments along with home directory assignments. The /etc/skel directory contains the files to be copied to each user’s home directory. The /etc/profile file contains global user settings. The LILO boot loader is used to configure booting options.
345. You have recently installed a new disk drive in your Linux system. You wish to store a directory containing many data files used within your company on the new disk drive. Which of the following can be used so the change is invisible to users of the system?
A. cp
B. mv
C. hard links
D. soft links
Answer – – D
Description – The cp and mv commands can be used to relocate the files. Hard links cannot span file systems. Using soft links, you can have the files appear to be stored on one file system while actually existing on another.
346. Which command and options are used to delete a user’s account and home directory?
A. userdel -r
B. usermod -f
C. passwd -e
D. usermod -e
Answer – – A
Description – The userdel -r command is used to remove a user’s home directory as well as their account. The usermod command can be used to disable a user’s account. The passwd utility is used to change a user’s password.
347. The ____________ utility is used to display files in hexadecimal format.
Answer – – od
Description – The od utility allows files to be viewed in octal and hexadecimal formats.
348. What command can be used to locate specific text within a file?
A. grep
B. locate
C. find
D. where
Answer – – A
Description – The grep utility is used to search a file for the specified string. The locate command searches the slocate database for specified files. The find command searches directories for the specified files. The where command is invalid.
349. Which of the following can be used to suspend a process running in the foreground?
A. &
B. fg
C. bg
D. Ctrl+Z
Answer – – D
Description – The & character is used to background a process when it is run. The fg
command is used to bring a process to the foreground. The bg command is used to background a suspended process. The Ctrl+Z sequence can be used to suspend a foreground process.
350. Where might you find instructions on installing and configuring a Winmodem on a Linux system?
A. man pages
B. HOWTOs
C. /usr/doc
D. dmesg
Answer – – B
Description – Man pages can be used to discover more information on commands and utilities. The HOWTOs contain information on configuring specific software and hardware. The /usr/doc directory contains information on installed applications. The dmesg command is used to display system messages.
351. Which of the following would be used to run a script called mozilla_update as a background process?
A. bg mozilla_update
B. mozilla_update&
C. `mozilla_process`
D. mozilla_process -bg
Answer – – B
Description – The & character is used when running a process to specify that it runs in the background.
352. Which environment variable would be used to specify the location of files that you wish to run without specifying an absolute path?
A. HOME
B. PS1
C. PATH
D. TERM
Answer – – C
Description – The HOME variable stores the user’s home directory. The PS1 variable stores the command prompt settings. The PATH variable contains the paths to search when running commands. The TERM variable stores the terminal setting.
353. The _____________ command is used to change ownership of a file.
Answer – – chown
Description – Ownership of files and directories is changed using the chown command.
354. When booting your system you notice that your sound module failed to load; however, the error message scrolled by too quickly. What command can you use to view the errors?
A. dmesg
B. messages
C. errors
D. lilo
Answer – – A
Description – The dmesg command is used to view system messages. Neither messages nor errors is a valid command. The lilo command is used when updating boot loader options using the /etc/lilo.conf file.
355. What command is used to create a new archived file using compression?
A. gzip -t
B. tar -cfz
C. compress -tf
D. bzip2 -tbz
Answer – – B
Description – Only the tar utility is capable of creating an archive while compressing the file. The gzip, compress, and bzip2 utilities are used to compress and uncompress files.
356. Which command is used to view processes running in the background?
A. dmesg
B. ls
C. bg
D. jobs
Answer – – D
Description – The dmesg command is used to view system messages. The ls command is used to view directory contents. The bg command is used to run a process in the background. The jobs command is used to view jobs running in the background.
357. Which utility is used to view the beginning of a file?
A. tac
B. cat
C. head
D. top
Answer – – C
Description – The tac utility displays files in reverse. The cat utility is used to display file contents. The head utility is used to view the beginning of a file. The top utility is used to view real-time information on system processes.
358. Which type of quota limit prevents a user from creating new files?
A. stop limit
B. soft limit
C. hard limit
D. max limit
Answer – – C
Description – Stop limits and max limits are invalid. Soft limits can be exceeded for a period of time, while hard limits prevent a user from creating new files.
359. Which runlevel is used for administrative tasks performed locally, disallowing network connections to the system?
A. 0
B. 1
C. 3
D. 6
Answer – – B
Description – Runlevel 0 is used to halt the system; level 1 is used to enter single-user mode; level 3 can vary according to the distribution; and level 6 is used to reboot the system.
360. User quotas are maintained in which file?
A. /etc/fstab
B. /etc/passwd
C. /quota.user
D. /lilo
Answer – – C
Description – The /etc/fstab file contains file system information. The /etc/passwd file contains information on user accounts. The /quota.user file contains quota information for users. The /lilo file is invalid.
361. You are told by a co-worker that information pertaining to the syslog command can be found in man page 3. How would you view this information?
A. man syslog 3
B. man syslog -3
C. man -3 syslog
D. man 3 syslog
Answer – – D
Description – The man page can be specified using the syntax man NUMBER command. This correct syntax is shown as man 3 syslog.
362. Which command is not used to view the contents of a file?
A. cat
B. more
C. less
D. expand
Answer – – D
Description – The cat, more, and less utilities are all used to view file contents. The expand utility is used to convert tab characters to spaces.
363. The ________ command is used to unmount a file system.
Answer – – umount
Description – File systems are unmounted using the umount command.
364. The ________ command will display previously entered commands.
Answer – – history
Description – The history command allows you to view previously entered commands.
365. What type of information might you find using www.deja.com?
A. man pages
B. Usenet postings
C. software patches
D. kernel updates
Answer – – B
Description – The Web site www.deja.com enables you to search Usenet postings.
366. Which directory utilizes no disk space?
A. /proc
B. /boot
C. /root
D. /local
Answer – – A
Description – The /proc directory is virtual. It is used to store information about system resources and processes.
367. The __________ command is used to perform a consistency check on file systems.
Answer – – fsck
Description – The fsck utility is used to verify and correct problems on file systems.
368. Which command would create a file called mydirlisting that includes a detailed listing of all the files and directories located within your home directory?
A. ls -alR $HOME > mydirlisting
B. ls -d > mydirlisting
C. mydirlisting < ls -al $HOME
D. ls -al | mydirlisting
Answer – – A
Description – The -R option specifies that a recursive directory listing be performed. Data is sent to a file when the > symbol is used for redirection.
369. The ________ command is used to create an ext2 file system.
Answer – – mkfs
Description – The mkfs tool is used to create a file system.
370. You’re repairing the master boot record on a system. You have booted the system via a boot disk and currently have the root volume mounted to /recover. How would you reinstall LILO?
A. lilo -r /recover/boot
B. lilo -f /recover
C. lilo -r /recover
D. lilo -r /recover -b /recover/boot
Answer – – C
Description – The -r parameter on lilo specifies a different root directory. This is used when you are doing recovery and /etc and /boot are actually mounted under a new root.
371. The __________ file needs to be updated when a new library is added.
Answer – – ld.so.conf.
Description – Whenever a new library is added manually, you must edit the ld.so.conf file and run ldconfig.
372. Which command removes a package named editor-2.0.i386.rpm?
A. rpm -i editor-2.0.i386.rpm
B. rpm -e editor-2.0.i386.rpm
C. dpkg -install editor-2.0.i386.rpm
D. apt-get install editor-2.0.i386.rpm
Answer – – B
Description – The -e parameter is used to remove a package with RPM. The other choices install packages.
373. To make a single change to the kernel configuration before compiling, you would edit which file?
A. /usr/src/linux/Makefile
B. /usr/src/linux/.config
C. /usr/src/linux/config
D. /usr/src/linux/configure
Answer – – B
Description – By default, kernel configuration options are stored in the .config file.
374. Which command will tell you which package owns the file /etc/printcap?
A. dpkg -F /etc/printcap
B. rpm -f /etc/printcap
C. who /etc/printcap
D. rpm -qf /etc/printcap
Answer – – D
Description – The -qf parameters tell RPM to query (-q) the database to see who owns a certain file (-f).
375. The __________ file is executed for all nonlogin bash sessions.
Answer – – ~/.bashrc or /etc/bashrc.
Description – The .bashrc script is executed when a bash shell is started, but not when logging in. For example, if you open a new xterm in X11 with bash, this script will run.
376. Which command shows the route between your host and the remote host www.somedomain.org?
A. traceroute -n www.somedomain.org
B. route www.somedomain.org
C. ping -r www.somedomain.org
D. route -n www.somedomain.org
Answer – – A
Description – traceroute is used to show the path a packet takes to a destination. The ping command tells you only if a remote host is up, and the route command is used to modify the local routing table.
377. Which command is the best to use to find a contact name for another domain?
A. nslookup
B. whoinfo
C. whois
D. dig
Answer – – C
Description – The whois command shows contact information relating to a domain. The nslookup and dig tools are used to check DNS information. The whoinfo command is invalid.
378. Which command(s) must be run after the inetd.conf file is updated?
A. /etc/rc.d/init.d/inetd restart
B. kill -1 inetd
C. kill -1 `cat /var/run/inetd.pid`
D. No command needed.
Answer – – A and C
Description – When a change is made to inetd.conf, the daemon must be restarted by either using the script or issuing a HUP.
379. The __________ file can be created to keep nonroot users from logging in to the system.
Answer – – /etc/nologin.
Description – This file causes the system to disallow all nonroot logins.
380. Which command(s) is/are used to enable shadow passwords?
A. shadow
B. pw-conv
C. pwconv
D. grpconv
Answer – – C and D
Description – The pwconv and grpconv tools convert the passwd and group files to use shadow passwords. The other commands are fake.
381. Which command(s) is/are used to decompress the file mydoc.gz?
A. gunzip mydoc.gz
B. tar -zxv mydoc.gz
C. gzip -d mydoc.gz
D. gunzip -d mydoc.gz
Answer – – A, C and D
Description – All three methods can be used to ungzip the file. The tar command does support gzip, but is used only when uncompressing a tar file.
382. To activate all swap partitions on the system you would use the _______ command (with options).
Answer – – swapon -a.
Description – The swapon -a command enables all swap partitions in the /etc/fstab file.
383. Which command displays the output of the utmp file?
A. what
B. who
C. last
D. when
Answer – – C
Description – The last command shows the utmp file by default, and the who command uses the wtmp file. The other two commands are invalid.
384. The _______ tool is used to control the Apache httpd service.
A. apached
B. httpdctl
C. htmgr
D. apachectl
Answer – – D
Description – The Apache package includes the apachectl tool to manage the httpd daemon. The other Answers are invalid.
385. Which command displays queue information for all local printers?
A. lpq -a
B. lpc -a
C. printq
D. lpq -v
Answer – – A
Description – The lpq tool is used to manage and view the print queue, while lpc is used to manage the printing system. The lpq –a command will display information for all local printers. The printq command is invalid.
386. Which disk partitioning tool provides a GUI?
A. fdisk
B. cfdisk
C. Disk Druid
D. gnodisk
Answer – – C
Description – Disk Druid is a GUI tool supplied by Red Hat. Answers A and B provide text interfaces. Answer D is invalid.
387. The ________ command shows all loaded kernel modules.
Answer – – lshmod.
Description – The lsmod command displays all loaded modules.
388. Which command in vi searches for the text Linux?
A. ESC, s, Linux
B. ESC, f, Linux
C. \Linux
D. /Linux
Answer – – D
Description – The forward slash tells vi to search the file for the given expression. The s command is used for substitution, while the f command searches for a single character in the current line. Answer C is invalid.
389. Which command must be run when a new mail alias is added?
A. newalias
B. newaliases
C. genaliases
D. kill -1 `cat /var/run/sendmail.pid`
Answer – – B
Description – Any time an alias is added, the newaliases command needs to be run. Answers A and C are invalid. Restarting the sendmail process will not activate the new aliases.
390. You want to make the directory /share available via NFS. All users on your local network should be allowed to read and write files. Which of the following is correct, assuming that your local network is 192.168.1.0 and your machine is part of the DNS domain mydomain.org?
A. /local 192.168.1.0/255.255.255.0(rw)
B. /local 192.168.1.0/*(rw)
C. /local *.org(rw)
D. /local ALL.mydomain.org(rw)
Answer – – A
Description – Choice B is invalid due to the subnet mask. Choice C allows anyone from a .org domain to have access. The ALL wildcard is invalid as well.
391. Which script is run when X Window starts?
A. .xinit
B. .xrc
C. .startxrc
D. .xinitrc
Answer – – D
Description – The .xinitrc script is run from your home directory when startx is called. The other script names are invalid.
392. Which command adds a new default route to the system?
A. ifconfig add default gw 1.2.3.4
B. route add gw 1.2.3.4
C. route add default gw 1.2.3.4
D. ifconfig add 0.0.0.0 mask 255.255.255.0 gw 1.2.3.4
Answer – – C
Description – The ifconfig command is used to configure an interface, not a route.
393. Dave is going away on vacation for two weeks and wants his mail forwarded to Sue while he is away. Which change should he make?
A. Add “sue” to /etc/aliases.
B. Add “sue” to ~/.forward.
C. Add “sue” to ~/.aliases.
D. Add a rule to pine to forward the mail.
Answer – – B
Description – Only root can change /etc/aliases. Answers C and D are invalid.
394. The Samba daemon responsible for handling name resolution is which of the following?
A. nmbd
B. smbd
C. winsd
D. named
Answer – – A
Description – The smbd daemon handles file and printer sharing. Answer C is invalid. The named daemon is used to provide DNS.
395. The _______ command can be used to change to another user.
Answer – – su
Description – The su, or substitute user, command is used to change to another user while logged in.
396. Which command should be used to allow the host norbert to connect to the local X server?
A. xhost +
B. cat norbert > .rhosts
C. xhost +norbert
D. rhosts +norbert
Answer – – C
Description – Choice A allows anyone to connect, which is a security risk. The X server does not use the rhosts file. Choice D is invalid.
397. You have just configured a new mail server named deathstar. Which entry should you make into DNS to make this the primary mail server?
A. IN MX 20 deathstar
B. IN MX 10 deathstar
C. IN MX 0 deathstar
D. IN MX 100 deathstar
Answer – – C
Description – The lower the number is, the higher the priority of the mail server.
398. Which command would you use to copy the /Documents directory and all subdirectories from the current system to the remote system newman?
A. cp -R /Documents newman:/
B. scp -r /Documents root@newman:/
C. rcp -R /documents newman:/
D. scp -R root@newman:/ /Documents
Answer – – B
Description – The cp tool only works locally. Choice C uses the wrong path name, and choice D has incorrect syntax.
399. Which command would update your Debian system to the latest version of all installed packages?
A. apt-get update ; apt-get upgrade
B. apt-get upgrade ; apt-get update
C. apt-get refresh
D. apt get update ; apt get upgrade
Answer – – A
Description – The update command is first used to update the available package list, and then the upgrade command is used to actually upgrade the packages.
400. You have set up a new mail server behind your firewall. You now need to open up port _____ for access to work.
Answer – – 25
Description – The SMTP protocol uses port 25.
401. The _______ tool outputs a file showing the PnP configuration of the system.
Answer – – pnpdump
Description – This tool is used to scan the system and output any Plug-and-Play information to a text file for configuration.
402. What does the following IP chains block accomplish? (Select all that apply.)
ipchains -F input
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -A output -src 192.168.1.0/24 -dst ! 192.168.1.0/24 -j MASQ
ipchains -A input -dst 192.168.1.12 -j ACCEPT
A. The 192.168.1.0/24 network is being masq’d.
B. IP forwarding is disabled.
C. IP forwarding is enabled.
D. Access to 192.168.1.12 is allowed.
Answer – – C and D
Description – IP Masq is not functioning since the rule must be set in the Forward chain. The second line enables IP forwarding.
403. Which of the following directories should be on their own partition? (Select all that apply.)
A. /usr
B. /boot
C. /home
D. /tmp
Answer – – A, B, C and D
Description – In most cases all of the directory structures should have their own partition for security and fault tolerance.
404. The ________ command provides an easy-to-use interface to Debian package management.
Answer – – dselect
Description – The dselect tool is an easy-to-use front end for dpkg.
405. Which command(s) would be used to display which kernel packages are installed on your system?
A. rpm -ql | grep kernel
B. rpm -qa | grep kernel
C. dpkg -l kernel
D. dpkg -l | grep kernel
Answer – – B and D
Description – Answer – A is invalid, since no query string is present. Answer C will only display a package with the exact name “kernel”.
406. To use the X11 graphical interface to make a kernel configuration, you would use which of the following?
A. make gconfig
B. make xconfig
C. make menuconfig
D. make tclconfig
Answer – – B
Description – Answers A and D are invalid. The make menuconfig command provides a text mode menu.
407. After editing the /etc/lilo.conf file, you must run the _________ command.
Answer – – lilo
Description – You must rerun lilo after editing /etc/lilo.conf so that a new boot record is written with the updated information.
408. If you want to remotely display an X Window application to another system, which option would you use?
A. -display
B. -connect
C. -remote
D. -xhost
Answer – – A
Description – The -display parameter tells the application where to connect to for its output display. The other Answers are invalid.
409. You have a Red Hat system that currently boots in text mode. Which file do you need to modify to have it boot in GUI mode?
A. /etc/runlevel
B. /etc/init.conf
C. /etc/inittab
D. /etc/xdm
Answer – – C
Description – The inittab file tells the system which runlevel to boot to by default. In Red Hat, runlevel 3 is text mode and runlevel 5 is GUI mode. The other Answers are invalid.
410. The ______ file stores the monitor information for X Window v4 (no path).
Answer – – XF86Config-4.
Description – XFree86 v3 uses the XF86Config file.
411. Which X11 application is known to have memory leaks?
A. Netscape
B. Internet Explorer
C. Sawfish
D. WindowMaker
Answer – – A
Description – Netscape is known to have stability problems and memory leaks.
412. The _______ command displays all e-mail messages waiting in the mail queue.
Answer – – mailq.
Description – The mailq command shows all messages in the mail queue, as well as any errors that may keep the messages from being delivered.
413. Given the following files, would the host norbert be allowed to connect to the FTP server?
hosts.deny: in.ftpd : ALL
hosts.allow: in.ftpd : norbert
A. Yes
B. No
Answer – – A
Description – While the hosts.deny rule blocks everyone, the hosts.allow rule overrides it.
414. Which type of modem is usually not compatible with Linux?
A. Internal
B. External
C. Integrated
D. Winmodem
Answer – – D
Description – Winmodems use software to handle most of their functionality, which is not supported in Linux due to lack of information from which to write drivers.
415. You need to access a resource named Documents shared by the NFS server bigserver. Which command would you use?
A. mount -t nfs //bigserver/Documents /mnt/docs
B. mount bigserver:Documents /mnt/docs
C. mount -t nfs bigserver:/Documents /mnt/docs
D. nfsmount bigserver:Documents /mnt/docs
Answer – – B
Description – The mount command uses the syntax server:share mount_point for NFS shares.
416. After updating the /etc/exports file, the _______ command must be run for it to take effect (with option(s)).
Answer – – exportfs -a.
Description – The exportfs command is used to control the directories shared via NFS. The -a option tells exportfs to share or unshare all configured directories.
417. When examining the network logs for the firewall, you notice a lot of connection attempts to port 110. Which service may your remote users be trying to use?
A. IMAP
B. DNS
C. POP3
D. SMTP
Answer – – C
Description – IMAP uses port 143, DNS uses port 53, and SMTP uses port 25.
418. After editing the /etc/modules.conf file you should run the ________ command.
Answer – – depmod.
Description – The depmod command sets up the module dependency links.
419. The first line of a shell script should be which of the following?
A. !#/bin/sh
B. #!bash
C. #!/usr/bin/bash
D. #!/bin/bash
Answer – – D
Description – The other Answers are invalid.
420. User application defaults are stored in which file?
A. Xresources
B. .Xdefaults
C. .xinit
D. .xinitrc
Answer – – B
Description – The Xdefaults file lists the default settings for X applications, as configured by the user. The xinit and xinitrc scripts are used to start X.