NDG Linux Essentials

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/121

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:46 AM on 9/2/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

122 Terms

1
New cards

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

2
New cards

Unix is:

(choose two)

An operating system

A type of hardware

A trademark

A distribution of Linux

A text editor

A, C

3
New cards

Linux is written in _______.

C

4
New cards

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

--help

5
New cards

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

True

6
New cards

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

False

7
New cards

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

8
New cards

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

/

9
New cards

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

Absolute

10
New cards

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

Relative

11
New cards

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

12
New cards

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

a log file

13
New cards

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

14
New cards

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

15
New cards

Error messages generated by commands are sent where by default?

STDERR

16
New cards

A successful command will print output to STDOUT.

(true or false)

True

17
New cards

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

18
New cards

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

19
New cards

Channel 2 is _______.

STDERR

20
New cards

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

21
New cards

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

22
New cards

Which are appropriate editors for writing shell scripts? (choose two)

nano

LibreOffice Writer

/bin/bash

vi

Firefox

A, D

23
New cards

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

24
New cards

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

25
New cards

Which of the following are valid CPU types for Intel-based platforms?

(choose two)

48 bit

24 bit

64 bit

32 bit

C, D

26
New cards

64 bit platforms can access more memory than 32 bit platforms.

True or False?

True

False

True

27
New cards

What does the acronym RPM mean?

RPM Package Management

28
New cards

One way to install new software on a Linux system is to use a package management system.

(true or false)

True

29
New cards

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

True or False?

True

30
New cards

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

31
New cards

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

32
New cards

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

33
New cards

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

34
New cards

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

35
New cards

Only servers have hostnames.

True or False?

False

36
New cards

Which files contain user account information?

(choose two)

/etc/passwd

/etc/shadow

/etc/group

A, B

37
New cards

Which user can view the /etc/shadow file?

the root user

38
New cards

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

id

39
New cards

Each user belongs to at least one group.

True or False?

True

40
New cards

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

who

41
New cards

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

42
New cards

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

43
New cards

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

-u

44
New cards

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

-G

45
New cards

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

46
New cards

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

47
New cards

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

48
New cards

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

True or False?

False

49
New cards

Which of the following are methods for setting permissions using the chmod command?

(choose two)

letter

octal

symbolic

binary

B, C

50
New cards

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

True or False?

True

51
New cards

The Samba application is a __________.

file server

52
New cards

Which of the following are examples of desktop software?

(choose two)

Web server

Web browser

File share

Compiler

Music player

B, E

53
New cards

f you wanted to set up a blog, which software would be most helpful?

MySQL

Postfix

WordPress

Dovecot

Samba

C

54
New cards

Which of the following pieces of software deal with file sharing?

(choose three)

NFS

X-Windows

Netatalk

Samba

PostgreSQL

A, C, D

55
New cards

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

56
New cards

In graphical mode, you can get to a shell by running which applications?

(choose two)

guiterm

gbash

terminal

xconsole

xterm

C, E

57
New cards

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

58
New cards

Select all the applications that provide access to the Command Line Interface (CLI)?

(choose two)

Virtual Terminal

firefox

opera

Terminal window

A, D

59
New cards

Select the command that can report the location of a command:

where

what

which

C

60
New cards

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

True or False?

True

61
New cards

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

True or False?

False

62
New cards

The /var directory has files that change over time.

True or False?

True

63
New cards

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

64
New cards

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

65
New cards

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

66
New cards

To go to the end of an info page, press:

END

n

N

]

A

67
New cards

To go to the next match of a search on a man page, press:

]

n

N

}

B

68
New cards

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

69
New cards

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

n

N

D

U

B

70
New cards

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

Spacebar

m

a

Enter

A

71
New cards

Which option can be used with the rm command to prompt before deleting?

I

-i

-P

A

B

72
New cards

Which of the following commands can be used to rename a file?

name

rn

mv

cp

C

73
New cards

Which of the following commands can be used to compress a file?

(choose three)

bunzip2

zip

bzip2

cat

gzip

B, C, E

74
New cards

The three main modes of tar are:

(choose three)

Extract

Copy

Compress

List

Create

A, D, E

75
New cards

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

76
New cards

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

77
New cards

Which option for the wc command will print the total number of words in a file?

-l

-L

-w

-C

C

78
New cards

Which command can be used to print line numbers?

num

ln

nl

sort

C

79
New cards

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

True or False?

True

False

true

80
New cards

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

True or False?

True

False

false

81
New cards

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

True or False?

True

False

true

82
New cards

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

83
New cards

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

84
New cards

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

85
New cards

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

86
New cards

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

87
New cards

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

88
New cards

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

89
New cards

The Creative Commons version of Public Domain licensing is:

Attribution-NonCommercial-ShareAlike

Attribution-NonCommercial

NoAttribution-ShareAlike

No Rights Reserved

Attribution

D

90
New cards

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

91
New cards

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

LINUX

Kernel

GNU

shell

C

92
New cards

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

93
New cards

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

94
New cards

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

95
New cards

A conditional that lets you make multiple comparisons with a pattern is called:

fanout

if

branch

case

test

D

96
New cards

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

97
New cards

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

98
New cards

A division of a hard drive may be referred to as a _______ .

(choose two)

partition

label

slice

block

A, C

99
New cards

Which of the following are valid partitioning types?

(choose two)

MBR

PC

GPT

BIOS

A, C

100
New cards

The fdisk command is a tool used for working with the MBR partitioned disks.

True or False?

True

False

true