Final Exam Flashcards

(43 cards)

1
Q

A pipe allows you to…

  • …type multiple commands at one prompt.
  • …send the output of a command to a file.
  • …send the same input to multiple commands.
  • …send the output of one command to another.
A

…send the output of one command to another.

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

Channel 2 is:

  • STDOUT
  • STDERR
  • STDIN
  • STDALL
A

STDERR

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

The grep command…

  • …will display the line numbers in a file that contain a specified Regular Expression.
  • …will display all the lines in a file containing the specified Regular Expression.
  • …will display all the lines that begin with the specified Regular Expression.
  • …is not case sensitive.
A

…will display all the lines in a file containing the specified Regular Expression.

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

Which of the following commands can be used to scroll through a text file?(choose two)

  • more
  • cat
  • some
  • less
A
  • more
  • less
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which command can be used to print line numbers?

  • num
  • nl
  • ln
  • sort
A

nl

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

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

  • nano
  • vi
  • LibreOffice Writer
  • Firefox
  • /bin/bash
A
  • nano
  • vi
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following are correct about for and while loops?(choose two)

  • for loops require a variable over which to iterate
  • for loops have a test each cycle to determine if it should run again
  • while loops have a test each cycle to determine if it should run again
  • for loops operate over a fixed list of items
  • while loops operate over a fixed list of items
A
  • while loops have a test each cycle to determine if it should run again
  • for loops operate over a fixed list of items
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the correct way to assign the word “Hello” to a variable?

  • $A=”Hello”
  • echo “Hello” > A
  • A=”Hello”
  • A = “Hello”
  • echo $A “Hello”
A

A=”Hello”

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

What is the correct way to save the current directory to a variable?

  • pwd $A
  • pwd | $A
  • A=`pwd`
  • A=pwd
  • A=cwd
A

A=`pwd`

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

What is the meaning of $(( $i + 1)) ?

  • This runs the command stored in variable i
  • 1 will be added to the i variable
  • If i is 0, the loop will stop
  • This will return the value of the first argument to the script
  • This will return the value of the next argument to the script
A

1 will be added to the i variable

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

Which of the following are valid CPU types for Intel-based platforms?(choose two)

  • 24-bit
  • 32-bit
  • 48-bit
  • 64-bit
A
  • 32-bit
  • 64-bit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Choose all of the following statements that are true in regard to virtual RAM: (choose three)

  • Virtual RAM is stored in the CPU
  • Virtual RAM is also called swap space
  • Virtual RAM is stored on a hard drive
  • Virtual RAM is used when available physical RAM is low.
A
  • Virtual RAM is also called swap space
  • Virtual RAM is stored on a hard drive
  • Virtual RAM is used when available physical RAM is low.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

  • label
  • portion
  • partition
  • block
A
  • partition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

True

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

Which of the following commands will display CPU information?(choose two)

  • arch
  • showcpu
  • lspic
  • cpuinfo
  • lscpu
A
  • arch
  • lscpu
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The Process ID (PID) of the init process is:

  • varies
  • 1
  • 100
  • 0
A

1

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

What directory typically contains log files?

  • /usr/log
  • /proc/loc
  • /var/log
  • /log
A

/var/log

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

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

19
Q

Which of the following commands will allow you to view all processes on the system?(choose two)

  • ps -A
  • ps aux
  • ps -eLf
  • ps
  • ps -ef
20
Q

Which directory is the root of the filesystem?

  • /
  • /root
  • /sys
  • /home
  • /var
21
Q

A service is…

  • …a file that contains configuration information.
  • …a feature provided by one computer to another.
  • …another name for a computer’s hostname.
  • …like an IP address.
A

…a feature provided by one computer to another.

22
Q

Only servers have hostnames. True or False?

23
Q

Which of the following are valid IPv4 addresses?(choose two)

  • 192.301.25.25
  • 192.105.10.10.2
  • 192.105.10.10
  • 10.33.55.77
A
  • 192.105.10.10
  • 10.33.55.77
24
Q

Which of the following commands will allow you to log into a remote machine?

  • netstat
  • dig
  • route
  • ssh
25
Which files contain user account information?(choose two) * /etc/shadow * /etc/passwords * /etc/group * /etc/passwd
* /etc/shadow * /etc/passwd
26
Which command will display the UID, GID and groups your current user belongs to? * id * Who * about * whoami
id
27
Each user belongs to at least one group. True or False?
True
28
Which command will display the users that are currently logged in to the system? * whoami * about * who * id
who
29
Which command will display the groups that the root user belongs to? * groups -a * all -t * all * id root * group -r
id root
30
UIDs 1-499 are usually reserved for what kind of users? * Are not used for user accounts, but for group accounts * System accounts, such as server processes * Log-in (human) users * Remote log-in accounts
System accounts, such as server processes
31
Which of the following options for the useradd command allows root to specify the UID to be associated with the account? * -g * -M * -u * -G
-u
32
Which command can be used to determine a user’s most recent log in? * shell * login * last * history
last
33
Which of the following files contains encrypted user password information? * /etc/passwd * /etc/usr * /etc/group * /etc/shadow
/etc/shadow
34
Which of the following options for the useradd command allows you to use a different primary group then the default? * -G * -g * -u * -U
-g
35
Which of the following commands can be used to modify a user? * useradd * moduser * adduser * usermod
usermod
36
Which of the following are methods for setting permissions using the chmod command?(choose two) * primary * symbolic * letter * octal
* symbolic * octal
37
The chown command can be used to change the owner and group of a file. True or False?
True
38
The chmod command can be used on a file by: * The file owner * A user that belongs to the files current group * The file owner and root * Only root
* The file owner and root
39
The execute permission is never set on files by default. True or False?
True
40
The sticky bit permission… * …changes the group ownership of existing files in a directory. * …prevents others from removing files they don’t own from a common directory. * …prevents others from overwriting files they don’t own in common directories. * …sets the group ownership of any new file created in a directory.
* …prevents others from removing files they don’t own from a common directory.
41
The setuid permission… * …reports the output of a script to the owner. * …allows a command to be run as the file owner. * …prevents the owner of a file from being changed. * …allows files in a directory to be manipulated as by the directory owner.
* …allows a command to be run as the file owner.
42
The setgid permission… (choose two) * …allows a command to be run as the group owner of the file. * …prevents the group owner of a file from being changed. * …allows files created in a directory to be owned by the group that owns the directory. * …can only be set on files.
* …allows a command to be run as the group owner of the file. * …allows files created in a directory to be owned by the group that owns the directory.
43
Which of the following ls commands, when executed, will only show information about the directory itself? (choose two) * ls -h * ls -d * ls -ld * ld -a
* ls -d * ls -ld