NDG Linux Essentials

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is the standard option to provide a command line program to view its documentation?

--help

Which option for the useradd command allows root to specify supplementary groups the user will be a member of?

-G

Which option for the useradd command allows root to specify the UID to be associated with the account?

-u

The top level directory on a Linux system is represented as _____.

/

When you execute the dmesg command, the system displays messages that are generated by the kernel. True or False?

True

The command echo "text" >> file.txt will not overwrite file.txt if it already exists. True or False? True False

true

The fdisk command is a tool used for working with the MBR partitioned disks. True or False? True False

true

The main purpose of using glob characters is to be able to provide a command a list of filenames. True or False? True False

true

Which command will display the users that are currently logged in to the system?

who

A command that will continuously update statistics about running processes: top tail bottom head

A

One of the jobs of the kernel is to: Manage the system's resources Turn source code into machine code Load the operating system after the computer is turned on Transfer mail from one machine to another

A

Software is backward compatible if: It still supports old file formats or applications If the next version still works the same way People still use old versions It works across Linux/Mac/Windows It can be upgraded without downtime

A

The "setuid" permission... A. ...allows a command to be run as the file owner. B. ...allows files in a directory to be manipulated as by the directory owner. C. ...prevents the owner of a file from being changed. D. ...reports the output of a script to the owner.

A

The "sticky bit" permission... A. ...prevents others from removing files they don't own from a common directory. B. ...changes the group ownership of existing files in a directory. C. ...prevents others from overwriting files they don't own in common directories. D. ...sets the group ownership of any new file created in a directory.

A

The chmod command can be used on a file by: The file owner and root The file owner A user that belongs to the files current group Only root

A

To get a list of all packages installed on a system using RPM Package Management you can execute: rpm -qa rpm -ql rpm -qf rpm -qi

A

To go to the end of an info page, press: END n N ]

A

To make changes permanent for kernel parameter files found under /proc/sys, the following file can have entries added to it: /etc/sysctl.conf /etc/procctl.conf /etc/procsys.conf /etc/sysinfo.conf

A

To move a page forward one at a time while viewing a man page, press the following: Spacebar m a Enter

A

Which command can be used to view the /etc/passwd file entries? getent uptime getpasswd uppasswd

A

Which of the following commands, run as root, will prevent the user bob from logging in? usermod -L bob usermod -D bob usermod -d bob usermod -l bob

A

Which of the following would be considered a host? A printer attached to the network via an IP address A CDROM The computer's hard drive A network cable

A

What option to the netstat command has information shown as numbers rather than names? -t -n -name -r

B

Which files contain user account information? (choose two) /etc/passwd /etc/shadow /etc/group

A, B

The following are valid Linux option styles: (choose three) Traditional Unix with a single dash (-) BSD Unix without a dash DOS slash (/) GNU long options with two dashes (-)

A, B, D

Which of the following is true about graphical mode? (choose three) A. You have menus and tools to help you find what you are looking for B. You access this mode by logging into a graphical display C. After login, you are provided with a command prompt D. After login, you are provided with a desktop E. You cannot use your mouse

A, B, D

When choosing a distribution of Linux, you should consider: (choose five) Which management tools are provided by the distribution Which distributions are supported by the software you need to run Popularity on social media. The maintenance cycle of the distribution If you need support on the distribution itself Whether or not the distribution is under active development

A, B, D, E, F

A division of a hard drive may be referred to as a _______ . (choose two) partition label slice block

A, C

Unix is: (choose two) An operating system A type of hardware A trademark A distribution of Linux A text editor

A, C

Which of the following are valid partitioning types? (choose two) MBR PC GPT BIOS

A, C

Which of the following are package management commands for distributions with software distributed in files ending in .rpm? (choose three) yum apt-get rpm yumex

A, C, D

Which of the following pieces of software deal with file sharing? (choose three) NFS X-Windows Netatalk Samba PostgreSQL

A, C, D

Permissive free software licenses: (choose three) Can allow software to be used inside closed source software Are not approved by the OSI Are not approved by the FSF Include the GPLv2 and BSD Don't have a copyleft provision

A, C, E

A network packet contains ... (choose two) ...the IP address of the destination machine. ...a hard drive partition. ...the name of the router. ...the IP address of the source machine.

A, D

Select all the applications that provide access to the Command Line Interface (CLI)? (choose two) Virtual Terminal firefox opera Terminal window

A, D

Which are appropriate editors for writing shell scripts? (choose two) nano LibreOffice Writer /bin/bash vi Firefox

A, D

The three main modes of tar are: (choose three) Extract Copy Compress List Create

A, D, E

You type gzip myfile.tar. What happens? (choose two) myfile.tar.gz holds a compressed version of myfile.tar An error; you forgot to pass the name of the output file An error; you forgot to specify the file with -f myfile.tar is unarchived into the current directory myfile.tar is removed

A, E

Is the following path absolute or relative? : /etc/ppp

Absolute

A file begins with #!/bin/csh. This means: C Shell compatibility mode is enabled Running the script will invoke /bin/csh to interpret the rest of the file The operator should not be using /bin/csh This is a Perl script Nothing, this is a comment

B

A pipe allows you to... ...send the same input to multiple commands. ...send the output of one command to another. ...send the output of a command to a file. ...type multiple commands at one prompt.

B

After performing a search, you can use the ____ key to return to a previously found match: n N D U

B

To go to the next match of a search on a man page, press: ] n N }

B

UIDs 1-500 are usually reserved for what kind of users? Are not used for user accounts, but for group accounts System accounts, such as server processes Remote log-in accounts Log-in (human) users

B

When interpreting the SYNOPSIS of a command found on a man page, the "|" means: The items it separates can be used together The items it separates cannot be used together

B

Which of the following commands would create a symbolic link, link to file? ln link file ln -s file link ln file link ln -s link file

B

Which option can be used with the rm command to prompt before deleting? I -i -P A

B

Which option for the chown command can be used to change the owner of a directory and all the files and directories below it? -f -R -a -r

B

Which of the following are methods for setting permissions using the chmod command? (choose two) letter octal symbolic binary

B, C

Which of the following are package management commands for distributions with software distributed in files ending in .deb? (choose three) rpm apt-get dpkg aptitude

B, C, D

Which of the following are traits of a multiuser operating system? (choose three) A. An administrative user gets a dedicated CPU B. Users can protect their information from other users C. Resources are shared between users D. Many users can log in simultaneously with a unique account E. Each user can only log in once per day

B, C, D

Which of the following commands can be used to compress a file? (choose three) bunzip2 zip bzip2 cat gzip

B, C, E

Microsoft Windows: (choose three) Has a short maintenance cycle Comes in desktop and server variants Has built in virtualization Has a new desktop version every year. Has a Linux compatibility mode Has powerful scripting capabilities

B, C, F

Other commercial Unixes: (choose two) Are almost obsolete Are tied to their vendor's hardware Use completely different commands than Linux Are UNIX certified Do not run the GNU tools

B, D

Which of the following commands will display how long the system has been running since the last boot? (choose two) who w id uptime

B, D

Apple's OS X is: (choose three) Derived from Linux Only compatible with Apple hardware Able to natively run Windows binaries Derived from FreeBSD Certified as UNIX compatible Primarily used to manage network services

B, D, E

Which of the following are examples of desktop software? (choose two) Web server Web browser File share Compiler Music player

B, E

A service is... ...a file that contains configuration information. ...another name for a computer's hostname. ...a feature provided by one computer to another. ...like an IP address.

C

Compression on a file works by: Removing the high order bit from each byte Consolidating multiple files into one Removing redundant information Storing most of the data on removable media and just leaving a pointer Eliminating gaps within the file

C

If a user is deleted, the files and directories that the user owned... ...are deleted as well. ...will have no UID owner. ...will show a UID as the owner, but not user name. ...will have no user owner.

C

Linux is written in _______.

C

Select the command that can report the location of a command: where what which

C

The difference between the GPL and LGPL licenses are: LGPL allows you to distribute the software in binary-only form LGPL is shorter than GPL LGPL allows linking to non GPLed software LGPL applies to web services LGPL was made by the OSI while GPL was made by the FSF

C

The directory where additional documentation for software packages most likely can be found is: /var/lib/doc /usr/software/doc /usr/share/doc /var/share/doc

C

Traditional UNIX command options used a single dash, like -a; _______ command options use two dashes like -all. LINUX Kernel GNU shell

C

What does this shell script do? FOO=/tmp/foo if [ ! -d $FOO ]; then mkdir $FOO fi Nothing, since there is a problem with the conditions in the if statement Makes the /tmp/foo directory if a file by that name exists Creates /tmp/foo if it does not exist Creates /tmp/foo and raises an error if there is a problem Outputs a message to the screen

C

What is the meaning of $(( $i + 1)) ? If i is 0, the loop will stop This will return the value of the first argument to the script 1 will be added to the i variable This runs the command stored in variable i This will return the value of the next argument to the script

C

Which command can be used to print line numbers? num ln nl sort

C

Which of the following commands can be used to rename a file? name rn mv cp

C

Which of the following commands sets "other" permissions on file to r-x? chmod 774 file chmod 776 file chmod 775 file chmod 777 file

C

Which of the following commands will direct error messages to the file, error.log? ls /root > error.log ls /root >> error.log ls /root 2> error.log ls /root $> error.log

C

Which of the following commands would create a hard link, link to file? ln link file ln -s link file ln file link ln -s file link

C

Which of the following is the valid device file name for the first IDE hard drive on the system? /dev/sda /dev/hd1 /dev/hda /dev/ide

C

Which option for the wc command will print the total number of words in a file? -l -L -w -C

C

f you wanted to set up a blog, which software would be most helpful? MySQL Postfix WordPress Dovecot Samba

C

Which of the following are valid CPU types for Intel-based platforms? (choose two) 48 bit 24 bit 64 bit 32 bit

C, D

Lossy compression: (choose three) Is often used with documents Decompresses to an identical version as the original Sacrifices some quality Usually results better compression than lossless Is often used with images

C, D, E

In graphical mode, you can get to a shell by running which applications? (choose two) guiterm gbash terminal xconsole xterm

C, E

Which two commands do the same thing? (choose two) tar -xzf foo.tar.gz tar -x foo | gzip tar -c foo | gzip > foo.tar.gz tar -tzf foo.tar.gz tar -czf foo.tar.gz foo

C, E

A conditional that lets you make multiple comparisons with a pattern is called: fanout if branch case test

D

How would you write a test that says "if /tmp/foo is a directory or USERS is greater than 5"? test -d /tmp/foo | $USERS > 5 test /tmp/foo -d -o $USERS -gt 5 test /tmp/foo || $USERS > 5 test -d /tmp/foo -o $USERS -gt 5 test -f /tmp/foo -o $USERS -ge 5

D

The Creative Commons version of Public Domain licensing is: Attribution-NonCommercial-ShareAlike Attribution-NonCommercial NoAttribution-ShareAlike No Rights Reserved Attribution

D

The echo command: Tests a variable for duplication Duplicates the input stream to the output stream Is used for variable assignment Is used to output text to the console Copies variables from one to another

D

Which file contains the information passed to the kernel at boot time? /proc/kargs /proc/kernel /proc/kopts /proc/cmdline

D

Which of the following commands set "other" permissions on file to r-x? chmod o+rx file chmod o-r-w file chmod o=r+x file chmod o=rx file

D

Which of the following commands will set the "sticky bit" on /shared ? chmod 4777 /shared chmod 2777 /shared chmod 7777 /shared chmod 1777 /shared

D

Your company makes a hardware firewall that runs a custom Linux kernel. What are your obligations under GPLv2? There are no requirements You must make the source to your custom web interface available You must make your hardware designs available You must make the source to your kernel available You must ensure your custom kernel runs on a regular Intel machine

D

Given the following script: while [ ! -f /tmp/foo ]; do echo -n "." process_data > /tmp/foo done Which of the following are true? (choose two) The screen will fill with dots. /tmp/foo will be removed if it exists process_data will never be run If a file called /tmp/foo exists, process_data won't be run process_data will be called at most once

D, E

In the command tar -czf foo.tar.gz bar, what is the purpose of the f flag? Tells tar to copy only files, and not directories Tells tar to read from the file that follows the flag Tells tar to print the name of each file as it is processed Specifies extra compression is to be used Tells tar to write to the file that follows the flag

E

Most of nano's commands take the form of: Escape followed by another character Mouse clicks The F1 through F12 function keys Alt and another character Control and another character

E

The number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in? test $USERS = 5 test $USERS -a 5 test $USERS,5 test -f USERS=5 test $USERS -eq 5

E

On a system that does not use UPG, the useradd command will also create a user group. For example, user bob, group bob. True or False?

False

Only one set (user, group, other) of permission can be changed at once using the symbolic method. True or False?

False

Only servers have hostnames. True or False?

False

The /tmp directory is a temporary directory and will not exist on a system at all times. True or False?

False

The whatis command is the same as man -w (true or false).

False

What does the acronym RPM mean?

RPM Package Management

Is the following path absolute or relative?: sysadmin/Documents

Relative

Channel 2 is _______.

STDERR

Error messages generated by commands are sent where by default?

STDERR

64 bit platforms can access more memory than 32 bit platforms. True or False? True False

True

A pair of single quotes ( ' ) will prevent the shell from interpreting any metacharacter. True or False?

True

A successful command will print output to STDOUT. (true or false)

True

Each user belongs to at least one group. True or False?

True

One way to install new software on a Linux system is to use a package management system. (true or false)

True

The /var directory has files that change over time. True or False?

True

The chown command can be used to change the owner and group of a file. True or False?

True

The command man -k is the same as the command apropos (true or false).

True

In general, for which type of file would you want to use lossless compression?: ________

a log file

A source file and a symbolic link must be part of the same file system. True or False?

false

The RSA key fingerprint allows the dig command to connect to remote systems. True or False? True False

false

The chown command will only accept one file at a time as an argument. True or False?

false

The command echo "text" > file.txt will not overwrite file.txt if it already exists. True or False? True False

false

The user owner of a file will always have the same or higher permissions as "other". True or False?

false

The Samba application is a __________.

file server

Which command will display the UID, GID and groups your current user belongs to?

id

Which user can view the /etc/shadow file?

the root user

A source and a hard link must be part of the same filesystem. True or False?

true

Deleting a source file will break an associated symbolic link. True or False?

true

Sudo privileges can be used to specify which user can use the sudo command to execute commands as other users. True or False? True False

true

The "execute" permission is never set on files by default. True or False?

true

The command echo "text" > file.txt will create file.txt if it does not already exist. True or False? True False

true


Kaugnay na mga set ng pag-aaral

TBL: Heart failure in infants and children

View Set

EMT Chapter 20:Immunologic Emergencies

View Set

CNA Chapter 8: Nutrition and Hydration

View Set

AAFCS 200 COMPOSITE TEXES, TExES AAFCS Composite Exam (200) Review, AAFCS 200 composite exam

View Set

Chapter 3 Review (for Exam 2): Organic Compounds - Alkanes and Their Stereochemistry

View Set

Environmental Science Chapter 13 Atmosphere and Climate Change

View Set

2B unit 2-2 Itinerary details: Vocabulary (2)

View Set

Ch. 8 - Agency Contracts (Sales) and Related Practices - Part 2

View Set