Results 1 to 7 of 7

Thread: Test Your General Linux Knowledge

  1. #1
    Senior Member
    Join Date
    Oct 2001
    Posts
    638

    Test Your General Linux Knowledge

    Test your general knowledge of linux. Answers, with full explainations, are at the end. More practice questions can be found here. Enjoy .

    QUESTIONS

    ----------------------------------------------------------------------------
    Question 1

    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

    ----------------------------------------------------------------------------
    Question 2

    Which partitioning tool is available in all distributions?

    A) Disk Druid
    B) fdisk
    C) Partition Magic
    D) FAT32
    E) System Commander

    ----------------------------------------------------------------------------
    Question 3

    Which of the following are X-based system configuration tools available in
    some distributions? [Choose all correct answers]

    A) COAS
    B) KConf
    C) Linuxconf
    D) Yast
    E) GnoConf

    ----------------------------------------------------------------------------
    Question 4

    Which first-level segment of the file system contains a majority of system
    and server configuration files within its subdirectories?

    A) /var
    B) /etc
    C) /bin
    D) /sbin
    E) /lib

    ----------------------------------------------------------------------------
    Question 5

    Which file do you edit to set partitions to mount at boot time?

    A) /etc/fstab
    B) /etc/services
    C) /etc/smb.conf
    D) /etc/fstab.conf
    E) /etc/mount.conf

    ----------------------------------------------------------------------------
    Question 6

    Which file do you edit to set up a printer?

    A) /etc/printtab.conf
    B) /etc/print.conf
    C) /etc/lp.conf
    D) /etc/printtab
    E) /etc/printers

    ----------------------------------------------------------------------------
    Question 7

    Which of the following sequences results in the output of the ls command
    being mailed to the recipient?

    A) ls > mail bob
    B) ls | mail bob
    C) ls < mail bob
    D) ls >> mail box
    E) ls || mail bob

    ----------------------------------------------------------------------------
    Question 8

    What do you type to join the text contents of the files "start" and "end"
    into the file "whole"?

    A) join start end > whole
    B) cat start end > whole
    C) join start end whole
    D) cat start end whole
    E) merge start end whole

    ----------------------------------------------------------------------------
    Question 9

    Which of the following commands can you use to search within the file system
    by file names? [Choose all correct answers]

    A) locate
    B) which
    C) where
    D) look
    E) find

    ----------------------------------------------------------------------------
    Question 10

    Which of the following sequences results in the output of the who command
    being saved to the file whonow?

    A) who | whonow
    B) who < whonow
    C) who > whonow
    D) who -> whonow
    E) who whonow

    ----------------------------------------------------------------------------
    Question 11

    Which command tells you what partitions and devices are mounted onto the
    file system?

    A) mount
    B) fstab
    C) fs
    D) mount -l
    E) df

    ----------------------------------------------------------------------------
    Question 12

    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

    ----------------------------------------------------------------------------
    Question 13

    Which two commands can you use to delete directories?

    A) rm
    B) rm -rf
    C) rmdir
    D) rd
    E) rd -rf

    ----------------------------------------------------------------------------
    Question 14

    Which command do you use to change runlevels?

    A) initlevel
    B) runlevel
    C) level
    D) run
    E) init

    ----------------------------------------------------------------------------
    Question 15

    What do you type to stop a hung process that resists the standard attempts
    to shut it down? [Choose all correct answers]

    A) kill PID
    B) quit
    C) kill -9 PID
    D) exit
    E) Ctrl+C

    ----------------------------------------------------------------------------
    Question 16

    Which of the following commands can you use to cleanly restart a Linux
    machine? [Choose all correct answers]

    A) reboot
    B) init 6
    C) init 0
    D) shutdown -r
    E) shutdown -h

    ----------------------------------------------------------------------------
    Question 17

    What command would you use to create an empty file without opening it to
    edit it?

    A) open
    B) vi
    C) pico
    D) touch
    E) edit

    ----------------------------------------------------------------------------
    Question 18

    Which shell do you assign to a POP3 mail-only account?

    A) /bin/false
    B) /bin/sh
    C) /bin/bash
    D) /bin/pop
    E) /bin/pop3

    ----------------------------------------------------------------------------
    Question 19

    Which of the following contrasts and comparisons about the services in
    questions 28 and 29 are true? [Choose all correct answers]

    A) 28 does file locking, 29 does not.
    B) Both 28 and 29 can be used on a multi-OS LAN to serve files to all
    machines.
    C) 29 does file locking, 28 does not.
    D) Both 28 and 29 have special file system types for mount purposes.
    E) 29 has a special file system type for mounting, but 28 does not.

    ----------------------------------------------------------------------------
    Question 20

    Which mail service controls mail pick-up but is not in itself the server
    that controls dissemination across the network?

    A) sendmail
    B) pop3
    C) inetd
    D) smail
    E) qmail
    ----------------------------------------------------------------------------

    ANSWERS

    ----------------------------------------------------------------------------
    Question 1

    E) NFS

    Explanation:

    Answer e is correct. You can use an NFS server to provide the distribution
    installation materials to the machine on which you are performing the
    installation.

    Answers a, b, c, and d are all valid items but none of them are file
    servers. Inetd is the superdaemon which controls all intermittently used
    network services. The FSSTND is the Linux File System Standard. DNS provides
    domain name resolution, and NNTP is the transfer protocol for usenet news.

    ----------------------------------------------------------------------------
    Question 2

    B) fdisk

    Explanation:

    Answer b is correct. The fdisk partitioning tool is available in all Linux
    distributions.

    Answers a, c, and e all handle partitioning, but do not come with all
    distributions. Disk Druid is made by Red Hat and used in its distribution
    along with some derivatives. Partition Magic and System Commander are tools
    made by third-party companies. Answer d is not a tool, but a file system
    type. Specifically, FAT32 is the file system type used in Windows 98.

    ----------------------------------------------------------------------------
    Question 3

    A) COAS
    C) Linuxconf
    D) Yast

    Explanation:

    Answers a, c, and d are correct. GUI-based configuration tools available in
    some distributions are COAS, Linuxconf, and Yast.

    Answers b and e are not valid tools.

    ----------------------------------------------------------------------------
    Question 4

    B) /etc

    Explanation:

    Answer b is correct. The /etc portion of the file system contains a number
    of system and daemon configuration files.

    Answers a, c, d, and e are valid first-level directories, but are incorrect.
    The /var directory contains items that change on a regular basis, such as
    log files and print and mail spool directories. The /bin directory contains
    system binaries, whereas the /sbin directory contains binaries that run with
    SUID privileges or as a specific user. The /lib directory contains system
    libraries, both shared and non-shared.

    ----------------------------------------------------------------------------
    Question 5

    A) /etc/fstab

    Explanation:

    Answer a is correct. The file /etc/fstab manages which partitions are
    automatically mounted onto the file system.

    Answers b and c refer to valid items, but they are not used to manage the
    file system. The file /etc/services maps networking services to the ports
    they utilize, and /etc/smb.conf is the configuration file for the Samba
    service. Answers d and e point to files that do not exist.

    ----------------------------------------------------------------------------
    Question 6

    D) /etc/printtab

    Explanation:

    Answer d is correct. The file /etc/printab contains printer configuration
    information.

    Answers a, b, c, and e point to files that do not exist.

    ----------------------------------------------------------------------------
    Question 7

    B) ls | mail bob

    Explanation:

    Answer b is correct. The ls command is run, and then the results are piped
    to the mail program, which sends them to bob. Answers a, c, and d generate
    errors. Answer e displays the output of the ls command.

    ----------------------------------------------------------------------------
    Question 8

    B) cat start end > whole

    Explanation:

    Answer b is correct. To join these two files, you would use the command cat
    start end > whole.

    Answers a, c, d, and e all use valid commands, but not necessarily valid
    syntax. Also, the commands do not do what is required by the question. The
    join command exists in the ex editor, and is used to join individual lines
    of text. This command does not use redirection in its syntax, nor does it
    use file names. The cat command, however, requires a redirection unless you
    want the output to go to STDOUT, which is the screen. Finally, the merge
    com-mand is used to combine two files that are slightly different,
    incorporating the sum total of what is there. It does not simply tack the
    files together like the cat command does.

    ----------------------------------------------------------------------------
    Question 9

    A) locate
    B) which
    E) find

    Explanation:

    Answers a, b, and e are correct. The three search tools that look at file
    names are find, locate, and which. Answer c is not a command, except in
    specifically one shell (tcsh). Answer d is a command, but not a file system
    search command. The look command is used to search the contents of text
    files.

    ----------------------------------------------------------------------------
    Question 10

    C) who > whonow

    Explanation:

    Answer c is correct. The who command is run, and the results are saved to
    the file whonow. Answers a and b generate errors. Answers d and e generate
    nothing.

    ----------------------------------------------------------------------------
    Question 11

    E) df

    Explanation:

    Answer e is correct. The df command lists the devices and partitions that
    are mounted onto the file system. Answers a and d refer to a valid command,
    though there is no -l flag for mount. However, the mount command adds
    devices to the file system, it does not give a listing of those devices. The
    answers b and c refer to nonexistent commands.

    ----------------------------------------------------------------------------
    Question 12

    E) tail -20 filename

    Explanation:

    Answer e is correct. Use the command tail -20 filename to see the last 20
    lines of a file. The answers for a and d both point to an invalid command.
    The answer for b points to a valid command. Typing this answer in with a
    valid file name will even give you some output. However, the last command
    tells you who is logged in, it does not actually list the contents of any
    file named in the command. The answer for c, the head command, is used to
    look at the begin-ning of a file, not the end.

    ----------------------------------------------------------------------------
    Question 13

    B) rm -rf
    C) rmdir

    Explanation:

    Answers b and c are correct. You can use rmdir or rm -rf to delete a
    directory. Answer a is incorrect, because the rm command without any
    specific flags will not delete a directory, it will only delete files.
    Answers d and e point to a non-existent command.

    ----------------------------------------------------------------------------
    Question 14

    E) init

    Explanation:

    Answer e is correct. The command used to change runlevels is init. Answers
    a, c, and d point to invalid commands. Answer b is a valid command, but does
    not set the current runlevel. The runlevel command displays the current
    runlevel, and the one that was used directly before entering this one.

    ----------------------------------------------------------------------------
    Question 15

    A) kill PID
    C) kill -9 PID
    E) Ctrl+C

    Explanation:

    Answers a, c, and e are correct. The kill command by itself tries to allow a
    process to exit cleanly. You type kill -9 PID, on the other hand, to
    abruptly stop a process that will not quit by any other means. Also,
    pressing Ctrl+C works for many programs.

    Answers b and d are only valid in some contexts, and even in those contexts
    will not work on a hung process.

    ----------------------------------------------------------------------------
    Question 16

    A) reboot
    B) init 6
    D) shutdown -r

    Explanation:

    Answers a, b, and d are correct. The commands used to restart a Linux box
    are shutdown -r, reboot, and init 6. Answers c and e are incorrect. Both of
    these are used to shut down a Linux box, not restart it.

    ----------------------------------------------------------------------------
    Question 17

    D) touch

    Explanation:

    Answer d is correct. You use the touch command to create an empty file
    without needing to open it. Answers a and e point to invalid commands,
    though either of these might actually be aliased to point to a real command.
    Answers b and c utilize editors, and so do not satisfy the requirements of
    the question.

    ----------------------------------------------------------------------------
    Question 18

    A) /bin/false

    Explanation:

    Answer a is correct. You assign a POP3 only account to the /bin/false shell.
    Answers b and c both point to the same shell, the bash shell. However,
    assigning this shell to a POP3 only user gives him or her login access,
    which is what you are trying to avoid. Answers d and e are both invalid
    options in a standard setup.

    ----------------------------------------------------------------------------
    Question 19

    A) 28 does file locking, 29 does not.
    D) Both 28 and 29 have special file system types for mount purposes.

    Explanation:

    Answers a and d are correct. NFS does not perform file locking but Samba
    does. Both NFS and SMB have their own file system types (nfs and smb) for
    mount or /etc/fstab.

    Answer b is incorrect. NFS only works for other Linux machines. Answer c is
    incorrect. Its statements about the services are reversed. Answer e is
    incorrect. Both NFS and SMB have special file system types for mounting.

    ----------------------------------------------------------------------------
    Question 20

    B) pop3

    Explanation:

    Answer b is correct. The POP3 service functions as a mail pick-up site but
    not a network mail server. Answers a, d, and e are all valid services, and
    even valid mail servers. However, they are SMTP mail servers, not POP
    servers. Answer c is a valid service but not a mail server.

    ----------------------------------------------------------------------------
    OpenBSD - The proactively secure operating system.

  2. #2
    Banned
    Join Date
    Oct 2001
    Posts
    1,459
    Educational But the link doesnt work for me :-/

  3. #3
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    Damn, I got them all wrong. Guess people better not ask me anything about linux.
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  4. #4
    Senior Member
    Join Date
    Oct 2001
    Posts
    638
    Some more Linux general knowledge questions (with answers) to chew on. Enjoy.

    QUESTIONS
    ----------------------------------------------------------------------------
    Q1

    Which command works in almost all distributions to create a boot disk?

    A) mkboot
    B) make bootdsk
    C) make boot
    D) mkbootdsk
    E) mkbootdisk

    ----------------------------------------------------------------------------
    Q2

    Which password package should you install to ensure that the central
    password file couldn't be stolen easily?

    A) PAM
    B) tcp_wrappers
    C) shadow
    D) securepass
    E) ssh
    ----------------------------------------------------------------------------
    Q3

    Which package can you use to regulate which network traffic is allowed to
    enter a specific machine, but not on any other machines?

    A) tcp_wrappers
    B) ipchains
    C) SOCKS 5
    D) TCP/IP
    E) ipfirewall
    ----------------------------------------------------------------------------
    Q4

    Which package provides secure remote login sessions, such as secure telnet
    logins?

    A) securetelnet
    B) ssh
    C) shadow
    D) ipchains
    E) SOCKS 5
    ----------------------------------------------------------------------------
    Q5

    Which tool is commonly used to create an IP filtering firewall in Linux?

    A) ipchains
    B) SOCKS 5
    C) tcp_wrappers
    D) ipblock
    E) IPX
    ----------------------------------------------------------------------------
    Q6

    Which of the following Web sites would you go to in order to keep up with
    the latest Linux security information? [Choose all correct answers]

    A) www.ilda.org
    B) www.cert.org
    C) www.ciac.org
    D) www.sans.org
    E) www.lsfa.org
    ----------------------------------------------------------------------------
    Q7

    Why is it important to keep up on Linux security information?

    A) Keep up with the latest trends.
    B) It is best to always install the latest releases.
    C) Security holes are sometimes discovered and plugs are made available.
    D) The latest software has the least holes.
    E) When you know where the holes are you can create patches yourself.
    ----------------------------------------------------------------------------
    Q8

    What can users realistically do to help maintain system security?

    A) Help to install the latest patches.
    B) Try to break into the system and point out security problems.
    C) Install their own security measures.
    D) Choose secure passwords.
    E) Make sure their passwords revolve around a common theme.
    ----------------------------------------------------------------------------
    Q9

    Which tool can you run to ensure that users are choosing relatively secure
    passwords?

    A) passcheck
    B) crack
    C) chkpass
    D) passtst
    E) passwdtst
    ----------------------------------------------------------------------------
    Q10

    Which tool can you use to make sure that users who do not understand
    permissions are not creating unprotected files by default?

    A) umask
    B) chmod
    C) mask
    D) perms
    E) setmask
    ----------------------------------------------------------------------------
    Q11

    What is a secure philosophy to use when setting up machine or network
    security?

    A) Keep everything out.
    B) Let everything but specific traffic through.
    C) Deny all and only let specific traffic through.
    D) Add blockades as you see a need for them, not before.
    E) Prevent users from ever accessing the outside.
    ----------------------------------------------------------------------------
    Q12

    What happens to your ipchains settings when you reboot a machine?

    A) They are automatically saved.
    B) They are automatically saved if you set them to be.
    C) They cannot be saved.
    D) They cannot be automatically saved unless you do something like make an
    alias for the shutdown routine that ensures this happens.
    E) You have to specifically type out the command to save them each time.
    ----------------------------------------------------------------------------
    Q13

    In what top level directory would you find mail spools, print spools, and
    log files?

    A) /etc
    B) /bin
    C) /usr
    D) /var
    E) /opt
    ----------------------------------------------------------------------------
    Q14

    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
    ----------------------------------------------------------------------------
    Q15

    What would you type to create a file containing all of the items beginning
    with the letter "a" from the /bin directory?

    A) ls /bin/a* > file
    B) ls /bin/a? > file
    C) ls /bin/a? | file
    D) ls /bin/a* | file
    E) ls /bin/a* file
    ----------------------------------------------------------------------------



    ANSWERS
    ----------------------------------------------------------------------------
    Q1

    E) mkbootdisk

    Explanation:

    Answer e is correct. The mkbootdisk command creates a boot disk. Answers b
    and c are incorrect. The make package is used to compile software, not
    create boot disks. Answers a and d point to invalid commands.

    ----------------------------------------------------------------------------
    Q2

    C) shadow

    Explanation:

    Answer c is correct. The shadow password package moves the central password
    file to a more secure location. Answers a, b, and e all point to valid
    packages, but none of these places the password file in a more secure
    location. Answer d points to an invalid package.
    ----------------------------------------------------------------------------
    Q3

    A) tcp_wrappers

    Explanation:

    Answer a is correct. The tcp_wrappers package is used to regulate the TCP/IP
    network traffic coming in and out of a machine.

    Answers b and c both point to valid firewalling packages, but these packages
    are used for an entire LAN, not just one machine. Answer d points to the
    commun-ications protocol used to transmit data over the Internet. Answer e
    points to an invalid package.
    ----------------------------------------------------------------------------
    Q4

    B) ssh

    Explanation:

    Answer b is correct. The ssh package allows you to configure secure telnet
    sessions and other remote logins. Answer a points to an invalid package.
    Answer c points to a valid package, but shadow handles passwords, not data
    encryption. Answers d and e point to firewalling packages, which regulate
    what passes in and out of a LAN, but do not handle data encryption.
    ----------------------------------------------------------------------------
    Q5

    A) ipchains

    Explanation:

    Answer a is correct. The ipchains tool is used to create an IP Filtering
    firewall.

    Answer b refers to a Proxying firewall tool, not IP Filtering. Answer c is
    an IP filtering tool, but not a firewall. Answer d is an invalid tool.
    Answer e is a Novell networking protocol, not a TCP/IP firewalling tool.
    ----------------------------------------------------------------------------
    Q6

    B) www.cert.org
    C) www.ciac.org
    D) www.sans.org

    Explanation:

    Answers b, c, and d are correct. The Web site most commonly watched for
    security updates is www.cert.org. Two others are www.ciac.org and
    www.sans.org.

    Answers d and e do point to real Web sites, but neither of them is Linux
    related, let alone Linux security related.
    ----------------------------------------------------------------------------
    Q7

    C) Security holes are sometimes discovered and plugs are made available.

    Explanation:

    Answer c is correct. New security holes are always being found, and those
    who want to break in keep track of them too. If you don't plug them, someone
    will exploit them.

    Answers a and b are a poor way to approach Linux. Updates come out at a
    rapid pace. Continuously updating a Linux machine can make it unstable.
    Answer d is a dangerous assumption. New software cannot be guaranteed to be
    foolproof until it has withstood the test of time, and rarely is any package
    foolproof. Answer e could be correct, but unless you are a security
    programming expert, is not the best approach, nor is it recommended.
    ----------------------------------------------------------------------------
    Q8

    D) Choose secure passwords.

    Explanation:

    Answer d is correct. They can make sure to use secure passwords.

    Answers a, b, and c are incorrect. Users should not have the necessary
    access to install security patches, and should not be encouraged to break
    into the system unless there is a good reason. Even if they mean well,
    inadvertent prob-lems could be caused if they succeed. As far as users
    installing their own security measures goes, anything useful would have to
    be installed on the entire system, and users should not have that kind of
    access. Answer e is a poor way to choose passwords. Using any form of
    recognizable pattern for a password is dangerous.
    ----------------------------------------------------------------------------
    Q9

    B) crack

    Explanation:

    Answer b is correct. The Crack tool tests how secure user passwords are.
    Answers a, c, d, and e are all invalid commands.
    ----------------------------------------------------------------------------
    Q10

    A) umask

    Explanation:

    Answer a is correct. The umask command is used to change the default file
    creation permissions. Answer b is a valid command, but just changes a
    specific item's permissions. Answers c, d, and e are invalid commands.
    ----------------------------------------------------------------------------
    Q11

    C) Deny all and only let specific traffic through.

    Explanation:

    Answer c is correct. Deny all, then allow specifics to pass through. Answers
    a and e are overly restrictive. Answers b and d are overly permissive.
    ----------------------------------------------------------------------------
    Q12

    D) They cannot be automatically saved unless you do something like make an
    alias for the shutdown routine that ensures this happens.

    Explanation:

    Answer d is correct. Settings for ipchains are lost during a reboot or
    shutdown and there is no "setting" to ensure they are automatically saved.
    Answers a, b, and c are completely incorrect. Answer e is incorrect, but you
    can save them by hand if you choose to.
    ----------------------------------------------------------------------------
    Q13

    D) /var

    Explanation:

    Answer d is correct. The /var top level directory contains files that change
    on a regular basis, such as log and spool files. Answers a, b, c, and e are
    all valid top-level directories. However, their contents do not include the
    files listed in the question.
    ----------------------------------------------------------------------------
    Q14

    B) .xinitrc

    Explanation:

    Answer b is correct. The ~/.xinitrc file allows you to set which window
    man-ager you want to use when logging in to X from that account. Answers a,
    d, and e are all invalid files. Answer c is the main X server configuration
    file.
    ----------------------------------------------------------------------------
    Q15

    A) ls /bin/a* > file

    Explanation:

    Answer a is correct. The ls command lists the contents of directories, and
    the asterisk (*) wildcard allows you to specify all files beginning with a
    in the particular directory. Redirecting the results of the ls command into
    a file completes the requirements for the question. Answer b will only save
    the file names that are two letters, with the first letter a. Answers c and
    d will generate errors, because they will expect file to be a program.
    Answer e will list all files in /bin that start with a to the screen, and
    the file listing if it exists.
    ----------------------------------------------------------------------------
    OpenBSD - The proactively secure operating system.

  5. #5
    Old-Fogey:Addicts founder Terr's Avatar
    Join Date
    Aug 2001
    Location
    Seattle, WA
    Posts
    2,007
    For someone who doesn't even use *nix regulary, I'm guessing I got about 3/4 of those.
    [HvC]Terr: L33T Technical Proficiency

  6. #6
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    geee, I got a bunch more wrong
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  7. #7
    PHP/PostgreSQL guy
    Join Date
    Dec 2001
    Posts
    1,164
    Interesting...got all but one right...then again I'm a unix admin so I would hope I would get them right!
    We the willing, led by the unknowing, have been doing the impossible for the ungrateful. We have done so much with so little for so long that we are now qualified to do just about anything with almost nothing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •