Linux Test 3- 7,8,9 Flashcards

(107 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.

A

F

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.

A

F

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.

A

T

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.

A

T

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.

A

F

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

A

T

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

A

F

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.

A

T

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.

A

T

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.

A

F

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 ____.

A

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 ____.

A

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

A

>

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.

A

<

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.

A

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.

A

|

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.

A

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.

A

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.

A

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.

A

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.

A

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.

A

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.

A

/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.

A

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.
\f
26
The test statement ____ would be used to determine if A is numerically greater than B.
[ A -gt B ]
27
Are both standard output and standard error displayed on the terminal screen by default?
Y
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?
Y
29
Can the redirection shell metacharacter be used to redirect between a command and another command?
N
30
When performing a pipe, do you need to have spaces around the | metacharacter?
N
31
Can you combine redirection and piping together?
Y
32
GRUB must be reinstalled after editing its configuration file.
f
33
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.
t
34
The /etc/rc.d/rc 5 script only executes files that start with S in the /etc/rc.d/rc5.d/ directory.
f
35
Most daemon scripts accept the arguments start, stop, and restart.
t
36
You can choose to use a window manager only, and not use a desktop manager.
t
37
Using one boot loader to boot one of several operating systems is known as multi-booting.
f
38
LILO is the most common boot loader used on modern Linux systems and the only boot loader supported by Fedora 13
f
39
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.
t
40
Administrators most commonly use a(n) graphical user interface.
f
41
The core component of a Linux GUI is X Windows.
t
42
The Linux kernel is stored in the ____ directory.
/boot
43
____ of the GRUB boot loader typically resides on the Master Boot Record.
Stage1
44
To create an encrypted password for use in the /boot/grub/grub.conf, you can use the ____ command
grub-md5-crypt
45
In the /etc/lilo.conf file, the ____ keyword specifies the absolute pathname to the Linux kernel.
image=
46
In the /etc/lilo.conf file, the ____ keyword specifies the file that contains the physical layout of the disk drive.
install=
47
In Linux, runlevel ____ is also known as multiuser mode.
2
48
A Linux system in runlevel ____ is a system that has no daemons active in memory and is ready to be powered off
0
49
After the entries in /etc/inittab have been executed, the ____ file is executed to perform tasks that must occur after system startup.
/etc/rc.d/rc.local
50
You can use the ____ command to start, stop, or restart any daemons listed within the /etc/rc.d/init.d directory.
service
51
Which utility can be used to modify runtime configuration files so that they start and stop daemons when entering a particular runlevel?
ntsysv
52
____ is a freely available version of X Windows used in many Linux distributions.
XFree86
53
The two most common desktop environments that are used on Linux are ____ and ____.
KDE, GNOME
54
The ____ window manager is used for the GNOME desktop in Red Hat Fedora Core 2
metacity
55
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.
/etc/X11/xorg.conf
56
To configure your keyboard, you can use the ____ command from either a GUI or terminal environment and restart X Windows.
system-config-keyboard
57
After configuring X Windows, you can fine-tune the vsync and hsync of the video card using the ____ utility within the desktop environment.
xvidtune
58
Can there be more than one active partition on a hard disk?
no
59
Can LILO boot a Windows kernel directly?
no
60
Can you use a Windows boot loader to load the Linux operating system?
yes
61
Do X clients need to run on the same computer as X Windows?
no
62
If you use runlevel 3, can you start the GNOME Display Manager manually?
yes
63
Each process can start an unlimited number of other processes
t
64
The ps command is the only command that can view process information
f
65
The killall command uses the PID to kill a process.
f
66
After a process has been started, you can change its priority by using the renice command
t
67
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.
t
68
The init daemon has a PID of 0
f
69
While a process is waiting for its parent process to release the PID, the process is said to be in a(n) zombie state
t
70
A value of 0 for a process priority indicates low priority
f
71
The SIGINT kill signal is the default kill signal used by the kill command.
f
72
Most commands such as ls, find, and grep are binary programs that exist on the filesystem until executed
t
73
A system process that is not associated with a terminal is called a(n) ____ process.
daemon
74
To display an entire list of processes across all terminals and including daemons, you can add the ____ option to any ps command.
-e
75
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.
process state
76
The ____ option to the ps command displays all processes that do not run on terminals.
x
77
There are ____ different kill signals that the kill command can send to a certain process.
64
78
The ____ kill signal stops a process and then restarts it with the same PID.
SIGHUP
79
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.
SIGQUIT
80
You can execute ____ main types of Linux commands
3
81
When you append a(n) ____ to a command, the command is run in a background process.
&
82
When killing a background job with the kill command, you must prefix the background job IDs by a(n) ____.
%
83
After a background process has been started, it can be moved to the foreground by using the ____ command
fg
84
When there are multiple background processes executing in the shell, the jobs command indicates the most recent one with a(n) ____ symbol.
+
85
Processes are started with a nice value of ____ by default.
0
86
To display a list of at Job IDs, you can specify the ____ option to the at command.
-l
87
The ____ field in a cron table contains the absolute pathname to the command to be executed.
sixth
88
To create or edit a user cron table, you can use the ____ option to the crontab command.
-e
89
Can a process have multiple parent processes?
no
90
Does a negative nice value give a process a greater chance of a lower priority?
no
91
Can the top command be used to change the priority of processes?
yes
92
Can the SIGKILL kill signal be trapped by a process?
no
93
If you send a kill signal to a process that has children, are the child processes terminated?
yes
94
A(n) ____________________ refers to a program that is running in memory and on the CPU.
process
95
The ____________________ can be used to affect the process priority indirectly.
nice value
96
Processes that have encountered an error during execution and continuously uses up system resources are referred to as ____________________ processes
rogue
97
In a process referred to as ____________________, when executing compiled programs or shell scripts, the BASH shell that interprets the command you typed creates a new BASH shell.
forking
98
The amount of time a process has to use the CPU is called a(n) ____________________.
time slice
99
An executable file on the hard disk that can be run when you execute it.
program
100
Daemon used to schedule a command to execute once in the future.
at daemon
101
The location of system cron tables.
/etc/crontab
102
Directory storing the shell environment and scheduled commands.
/var/spool/at
103
The location of user cron tables
/var/spool/cron
104
A process’s identifier that allows the kernel to identify it uniquely
PID
105
Identifies the process that started another process.
PPID
106
Daemon used to schedule a command to execute repeatedly in the future.
cron daemon
107
Ignoring a kill signal
trapping