Test 3 Flashcards

(130 cards)

1
Q

To prevent a file from being cleared by the BASH shell and append output to the existing output, you can specify three > metacharacters alongside the file descriptor.

1) True
2) False

A

2) False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.

1) True
2) False

A

1) True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You can use the sed command to remove unwanted lines of text.

1) True
2) False

A

1) True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Any command that can be executed on the command line can also be placed inside any environment file.

1) True
2) False

A

1) True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Given the syntax command && command, the command on the left of the && construct is executed only if the command on the right of the && construct completed successfully.

1) True
2) False

A

2) False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The BASH shell assumes stdout in the absence of a numeric file descriptor.

1) True
2) False

A

1) True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Users can create their own custom variables, called shell variables.

1) True
2) False

A

2) False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The ENV environment variable represents the location of the BASH run-time configuration file.

1) True
2) False

A

1) True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Aliases are shortcuts to commands stored in special variables that can be created and viewed using the alias command.

1) True
2) False

A

1) True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In a decision construct, you can have an unlimited number of if then statements.

1) True
2) False

A

2) False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The file descriptor stdin is represented by the number ____.

1) 0
2) 1
3) 2
4) 3

A

1) 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The file descriptor stderr is represented by the number ____.

1) 0
2) 1
3) 2
4) 3

A

3) 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

You can use the BASH shell to redirect standard output and standard error from the terminal screen to a file on the filesystem using the ____ shell metacharacter followed by the absolute or relative pathname of the file.

1) #
2)
4) |

A

3) >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You can redirect a file to the standard input of a command using the ____ metacharacter.

1) >
2) #
3) |
4) <

A

4) <

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The ____ command can be used to replace characters in a file sent via Standard Input.

1) tr
2) rt
3) ts
4) st

A

1) tr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

You can send the standard output of one command to another command as standard input using the ____ shell metacharacter.

1) <
2) |
3) >
4) #

A

2) |

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The ____ command counts the number of lines, words, and characters in a file.

1) pr
2) nl
3) tr
4) wc

A

4) wc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The ____ command can be used to extract, manipulate, and format text using pattern-action statements.

1) sed
2) grep
3) awk
4) nl

A

3) awk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Most configuration files on Linux systems are delimited using ____ characters.

1) tab
2) colon
3) space
4) semicolon

A

2) colon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

To see a list of the environment variables and their current values on a system, you can use the ____ command.

1) env
2) get
3) set
4) setenv

A

3) set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The ____ command could be used to view the contents of the environment variable that represents the BASH shell prompt.

1) ls $PWD
2) echo #PWD
3) echo $PS1
4) ls #PS1

A

3) echo $PS1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

To see a list of all exported environment and user-defined variables in the shell, you can use the ____ command.

1) env
2) set
3) setenv
4) getenv

A

1) env

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

The ____ environment file is always executed immediately after login for all users on the system, and sets most environment variables, such as HOME and PATH.

1) ~/.bash_profile
2) ~/.bash_login
3) /etc/profile
4) ~/.profile

A

3) /etc/profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

If you have ____ permission to a shell script, you can execute the shell script like any other executable program on the system.

1) read
2) write and read
3) execute
4) read and execute

A

4) read and execute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
The ____ escape sequence represents a form feed. 1) \n 2) \f 3) /f 4) /n
2) \f
26
The test statement ____ would be used to determine if A is numerically greater than B. 1) [ A –g B ] 2) [ A –ge B ] 3) [ A –gt B ] 4) [ A +eq B ]
3) [ A –gt B ]
27
Are both standard output and standard error displayed on the terminal screen by default? 1) Yes 2) No
1) Yes
28
When redirecting both standard output and standard error to a file, does using the same filename for both result in a loss of data? 1) Yes 2) No
1) Yes
29
Can the redirection shell metacharacter be used to redirect between a command and another command? 1) Yes 2) No
2) No
30
When performing a pipe, do you need to have spaces around the | metacharacter? 1) Yes 2) No
2) No
31
Can you combine redirection and piping together? 1) Yes 2) No
1) Yes
32
If you are using a Linux boot loader to dual boot another operating system in addition to Linux, it is easiest if Linux is installed after the other operating system has been installed. 1) True 2) False
1) True
33
The /etc/rc.d/rc 5 script only executes files that start with S in the /etc/rc.d/rc5.d/ directory. 1) True 2) False
2) False
34
Most daemon scripts accept the arguments start, stop, and restart. 1) True 2) False
1) True
35
Using one boot loader to boot one of several operating systems is known as multi-booting. 1) True 2) False
2) False
36
LILO is the most common boot loader used on modern Linux systems and the only boot loader supported by Fedora 13. 1) True 2) False
2) False
37
To see the current runlevel of the system and the previous runlevel (if runlevels have been changed since system startup), you can use the runlevel command. 1) True 2) False
1) True
38
Administrators most commonly use a(n) graphical user interface. 1) True 2) False
2) False
39
The core component of a Linux GUI is X Windows. 1) True 2) False
1) True
40
The Linux kernel is stored in the ____ directory. 1) / 2) /boot 3) /root 4) /krnl
2) /boot
41
____ of the GRUB boot loader typically resides on the Master Boot Record. 1) Stage1 2) Stage1.5 3) Stage2 4) Stage2.5
1) Stage1
42
In the /etc/lilo.conf file, the ____ keyword specifies the absolute pathname to the Linux kernel. 1) image= 2) default= 3) install= 4) root=
1) image=
43
In Linux, runlevel ____ is also known as multiuser mode. 1) 1 2) 2 3) 3 4) 4
2) 2
44
A Linux system in runlevel ____ is a system that has no daemons active in memory and is ready to be powered off. 1) 0 2) 1 3) 6 4) 7
1) 0
45
After the entries in /etc/inittab have been executed, the ____ file is executed to perform tasks that must occur after system startup. 1) /etc/rc/rc.local 2) /etc/rc.d/local 3) /etc/rc.d/rc.local 4) /etc/rc/local
3) /etc/rc.d/rc.local
46
You can use the ____ command to start, stop, or restart any daemons listed within the /etc/rc.d/init.d directory. 1) daemon 2) manip-daemon 3) service 4) daemon-service
3) service
47
____ is a freely available version of X Windows used in many Linux distributions. 1) X.org 2) XFree 3) FreeX86 4) XFree86
4) XFree86
48
The two most common desktop environments that are used on Linux are ____ and ____. 1) KDE; kwin 2) KDE; Xfce 3) Xfce; GNOME 4) KDE; GNOME
4) KDE; GNOME
49
The ____ window manager is used for the GNOME desktop in Red Hat Fedora Core 2. 1) kwin 2) twm 3) metacity 4) sawfish
3) metacity
50
If your system uses the X.org implementation of X Windows, the mouse, keyboard, monitor, and video adapter card information is stored in the ____ file in text format. 1) /etc/X11/XF86Config 2) /etc/X11/xorg.conf 3) /etc/X11/xwin.conf 4) /etc/X11/xorg
2) /etc/X11/xorg.conf
51
After configuring X Windows, you can fine-tune the vsync and hsync of the video card using the ____ utility within the desktop environment. 1) xvidtune 2) xvideotune 3) xtune 4) vidtune
1) xvidtune
52
Can there be more than one active partition on a hard disk? 1) Yes 2) No
2) No
53
Can LILO boot a Windows kernel directly? 1) Yes | 2) No
2) No
54
Can you use a Windows boot loader to load the Linux operating system? 1) Yes 2) No
1) Yes
55
Do X clients need to run on the same computer as X Windows? 1) Yes 2) No
2) No
56
If you use runlevel 3, can you start the GNOME Display Manager manually? 1) Yes 2) No
1) Yes
57
Each process can start an unlimited number of other processes. 1) True 2) False
1) True
58
The ps command is the only command that can view process information. 1) True 2) False
2) False
59
The killall command uses the PID to kill a process. 1) True 2) False
2) False
60
After a process has been started, you can change its priority by using the renice command. 1) True 2) False
1) True
61
If the /etc/at.allow and /etc/at.deny files do not exist, only the root user is allowed to schedule tasks using the at daemon. 1) True 2) False
1) True
62
The init daemon has a PID of 0. 1) True 2) False
2) False
63
While a process is waiting for its parent process to release the PID, the process is said to be in a(n) zombie state. 1) True 2) False
1) True
64
A value of 0 for a process priority indicates low priority. 1) True 2) False
2) False
65
The SIGINT kill signal is the default kill signal used by the kill command. 1) True 2) False
2) False
66
Most commands such as ls, find, and grep are binary programs that exist on the filesystem until executed. 1) True 2) False
1) True
67
A system process that is not associated with a terminal is called a(n) ____ process. 1) daemon 2) user 3) parent 4) startup
1) daemon
68
To display an entire list of processes across all terminals and including daemons, you can add the ____ option to any ps command. 1) -f 2) -l 3) -a 4) -e
4) -e
69
In the output of the ps -l command, the ____ column is the most valuable to systems administrators because it indicates what the process is currently doing. 1) process state 2) process flag 3) process priority 4) PID
1) process state
70
The ____ option to the ps command displays all processes that do not run on terminals. 1) -f 2) x 3) a 4) -l
2) x
71
There are ____ different kill signals that the kill command can send to a certain process. 1) 16 2) 32 3) 64 4) 128
3) 64
72
The ____ kill signal stops a process and then restarts it with the same PID. 1) SIGINT 2) SIGQUIT 3) SIGHUP 4) SIGTERM
3) SIGHUP
73
The ____ kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory. 1) SIGINT 2) SIGQUIT 3) SIGKILL 4) SIGTERM
2) SIGQUIT
74
You can execute ____ main types of Linux commands. 1) two 2) three 3) four 4) five
2) three
75
When you append a(n) ____ to a command, the command is run in a background process. 1) & 2) $ 3) # 4) %
1) &
76
When killing a background job with the kill command, you must prefix the background job IDs by a(n) ____. 1) & 2) # 3) $ 4) %
4) %
77
After a background process has been started, it can be moved to the foreground by using the ____ command. 1) b2f 2) fgd 3) fg 4) fgnd
3) fg
78
When there are multiple background processes executing in the shell, the jobs command indicates the most recent one with a(n) ____ symbol. 1) * 2) + 3) - 4) /
2) +
79
Processes are started with a nice value of ____ by default. 1) -20 2) 0 3) 1 4) 19
2) 0
80
To display a list of at Job IDs, you can specify the ____ option to the at command. 1) -l 2) -u 3) -a 4) -d
1) -l
81
The ____ field in a cron table contains the absolute pathname to the command to be executed. 1) first 2) second 3) fifth 4) sixth
4) sixth
82
To create or edit a user cron table, you can use the ____ option to the crontab command. 1) -u 2) -c 3) -f 4) -e
4) -e
83
Can a process have multiple parent processes? 1) Yes 2) No
2) No
84
Does a negative nice value give a process a greater chance of a lower priority? 1) Yes 2) No
2) No
85
Can the top command be used to change the priority of processes? 1) Yes 2) No
1) Yes
86
Can the SIGKILL kill signal be trapped by a process? 1) Yes 2) No
2) No
87
If you send a kill signal to a process that has children, are the child processes terminated? 1) Yes 2) No
1) Yes
88
If you want to enable a printer, you must specify the printer name to the cupsenable command. 1) True 2) False
1) True
89
You can restrict who can print to certain printers by using the ____ command. 1) lpadmin 2) lpa 3) lpr 4) admin
1)lpadmin
90
Log files are typically stored in the ____ directory. 1) /dev/log 2) /var/log 3) /boot/log 4) /log
2) /var/log
91
The ____ log file contains information and error messages regarding network access generated by daemons such as sshd and xinetd. 1) wtmp 2) messages 3) dmesg 4) secure
4) secure
92
To convert a system so that it uses an /etc/shadow file to store the encrypted password after installation, you can run the ____ command. 1) passwdconv 2) pwconv 3) passwd 4) pwdcv
2) pwconv
93
You can create user accounts on the Linux system by using the ____ command. 1) uadd 2) usercreate 3) adduser 4) useradd
4) useradd
94
The skeleton directory on most Linux systems is ____. 1) /etc/skel 2) /var/skel 3) /etc/skeleton 4) /var/skeleton
1) /etc/skel
95
To lock an account, you can use the usermod command with the ____ option. 1) -U 2) -u 3) -l 4) -L
4) -L
96
You can specify the ____ option to the userdel command to remove the home directory for the user and all of its contents. 1) -r 2) -d 3) -R 4) -x
1) -r
97
To change the primary group temporarily to another group that is listed in the output of the groups and id commands, you can use the ____ command. 1) newgroup 2) groupmod 3) newgrp 4) groupadd
3) newgrp
98
Can a user account be used to log in to the system before its password is set? 1) Yes 2) No
2) No
99
Can the usermod command be used to modify the password expiration information stored in /etc/shadow? 1) Yes 2) No
2) No
100
The compress utility preserves the original ownership, modification, and access time for each file that it compresses. 1) True 2) False
1) True
101
When using the gzip utility, the -1 option is also known as best compression and results in a higher compression ratio. 1) True 2) False
2) False
102
When creating a system backup, temporary files in the /tmp and /var/tmp directories should be included. 1) True 2) False
2) False
103
The tar utility cannot back up device files or files with filenames longer than 255 characters. 1) True 2) False
1) True
104
It is good form to read the Makefile after you run the configure script. 1) True 2) False
1) True
105
If a compression utility compresses a file to 52% of its original size, it has a compression ratio of 52%. 1) True 2) False
2) False
106
To decompress files that have been compressed with the compress utility, you can use the decompress command followed by the names of the files to be decompressed. 1) True 2) False
2) False
107
Traditionally, CDs/DVDs were used to back up data. 1) True 2) False
2) False
108
Because its primary use is to back up files in case of system failure, cpio uses absolute pathnames by default when archiving. 1) True 2) False
1) True
109
The dump/restore utility can only work with files on ext2 and ext3 filesystems. 1) True 2) False
1) True
110
The compression algorithm used by the compress utility has an average compression ratio of ____%. 1) 30-40 2) 40–50 3) 50-60 4) 60-70
2) 40–50
111
When using the compress utility, each file is renamed with a(n) ____ filename extension to indicate that it is compressed. 1) .c 2) .cmp 3) .cpz 4) .Z
4) .Z
112
The ____ command can be used to display the contents of a compressed file. 1) acat 2) zcat 3) cat 4) ccat
2) zcat
113
The average compression ratio for gzip is ____%. 1) 40-50 2) 50-60 3) 60–70 4) 70-80
3) 60–70
114
When used with the compress command, the ____ option can be used to compress symbolic links. 1) -f 2) -c 3) -v 4) -r
1) -f
115
When used with the uncompress command, the ____ option displays the contents of the compressed file to Standard Output. 1) -c 2) -v 3) -f 4) -r
1) -c
116
If no level of compression is specified, the gzip command assumes the number ____. 1) 4 2) 5 3) 6 4) 7
3) 6
117
The ____ option, when used with the gzip command, causes the compression ratio for files that have been compressed to be listed. 1) -c 2) -f 3) -r 4) -l
4) -l
118
The filename extension given to files compressed with bzip2 is ____. 1) .bz 2) .bz2 3) .gz 4) .Z
2) .bz2
119
When used with the tar utility, the ____ option causes filenames to be stored in an archive using absolute pathnames. 1) -a 2) -b 3) -p 4) -n
3) -p
120
The ____ option can be used with the tar command to extract a specified archive. 1) -s 2) -e 3) -x 4) -a
3) -x
121
When using the cpio utility, the ____ option causes a new archive to be created. 1) -n 2) -c 3) -o 4) -a
3) -o
122
You can perform up to ____ different incremental backups using the dump/restore utility. 1) seven 2) eight 3) nine 4) ten
3) nine
123
Most Linux distributions today use ____ as their package manager. 1) RPM 2) PRM 3) MPR 4) RMP
1) RPM
124
The ____ command looks for a Makefile and uses the information within to compile the source code into binary programs using the appropriate compiler program for the local hardware architecture. 1) configure 2) install 3) make install 4) make
4) make
125
To remove a package from the system, you can use the ____ option to the rpm command. 1) -d 2) -e 3) -r 4) -x
2) -e
126
Can the contents of a compressed file be viewed page-by-page? 1) Yes 2) No
1) Yes
127
Can symbolic links be compressed by the gzip utility? 1) Yes 2) No
1) Yes
128
Can the bzip2 utility be used to compress a directory full of files? 1) Yes 2) No
2) No
129
Does the tar utility compress files inside an archive? 1) Yes 2) No
2) No
130
Can you write files to CD and DVD media using the tar, cpio, or dump utilities? 1) Yes 2) No
2) No