practice test 1

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/26

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

27 Terms

1
New cards

what can be used with tail or head to specify the number of lines to display to the screen?

-n. the -n option is used to specify the number of lines to display to the screen with tail and head. by default, these commands display only 10 lines to the screen

2
New cards

grep command

command line utility for searching plain text data sets for lines that match a regular expression. grep does a global search with the regular expression and prints all matching lines within any files that contain those search strings

3
New cards

what is used to redirect the standard output of a command to a file?

1>. to redirect the standard output, 1> is used with a command

4
New cards

what statement is used to get input from the terminal when a shell script is being run?

read. the read command is used to get input from the terminal when using a shell script

5
New cards

Which version of Linux should be installed on a system with a 32-bit processor?

x86. a 32 bit operating system cannot support a 64 bit operating system. therefore, you have to install a version of linux compiled for x86 (32 bit) processors

6
New cards

where is the BIOS located?

motherboard. the BIOS firmware comes pre installed on a personal computer’s motherboard as a chip, and it is the first software to run when powered on

7
New cards

what is used as a virtual or pseudo filesystem used to interface with the kernel and process?

/proc. the /proc tree virtual filesystem provides an interface into the kernel and its processes

8
New cards

what would properly identify the device associated with the second partition on the first ahrd disk on the first IDE controller of a system

/dev/hda2.Partitions on these disks can range from 1 (for the first partition) to 16 (for the sixteenth partition). If you have a few ide/pata devices installed in a system, they will be hda (the first device), hdb (the second device), hdc (the third device), and so on. Each partition on that device will append a number to it, so the second partition on the first device would be /dev/hda2.

9
New cards

what command would be used to display the value of the HOME variable to the terminal’s display?

echo $HOME. To display the contents of a variable to the terminal's display, the command syntax is echo $VARIABLE, where VARIABLE is the variable's name.

10
New cards

what command will show system boot time messages?

dmesg, short for display message or driver message, is a command that prints the message buffer of the kernel. this command’s output typically contains the messages produced by the device drivers that occur during the system startup and boot

11
New cards

Which of the following is NOT contained in the /etc/passwd file?

User Identification Number (UID)

Home directory for the userrrect answer

The password of the user's account

Default login shell

the password of the user’s account. The password field is the second field in the /etc/passwd file. Due to the /etc/passwd file's low security, the password is now stored in the /etc/shadow file instead, which can only be accessed by the root user. The /etc/passwd file now contains a single * in the password field to represent to the system that the real password is stored in /etc/shadow instead.

12
New cards

octal notation

In Linux, you can convert letter permissions to octal by giving 4 for each R, 2 for each W, and 1 for each X. So, RWX is 7, R-X is 5, and R-- is 4.

13
New cards

Which file contains a list of the user's secondary groups?

/etc/group. this file contains a list of every user on the system and their secondary groups

14
New cards

Which command will display a list of all files in the current directory, including those that may be hidden?

ls -a. the ls command stands for list. the -a option lists all the files in the current directory,including those that may be hidden

15
New cards

which type of link contains the data in the target file?

hard link. a hard link, unlike a symbolic link, contains the data in the target file

16
New cards

which UID is usually used to represent the first regular user on a linux system?

  1. regular users on a linux system begin at UID 1000 and increment by 1 for each additional user

17
New cards

Which of the following is true about a recursive directory listing?

It includes the permissions of the directory listedorrect answer

It includes the content of sub-directories

It includes details of file system internals such as inodes

It includes details of the users and groups of the directory

it includes the content of sub directories. A recursive directory listing includes the content of sub-directories. Some of the other options provided may be true if you include the right switches and additional ls command options. By default, though, just using ls -r, you will get a list of the files within the current directory and any files within subdirectories.

18
New cards

Which keyboard shortcut allows copying highlighted text while working in the command line terminal?

CTRL + SHIFT + C

Holding down the CTRL and SHIFT keys and pressing C allows any highlighted text in the terminal to be copied. Pressing CTRL + C within the terminal is recognized as a command interrupt.

19
New cards

Your current present working directory is /home/jason/documents/. You just entered cd .. into the command line and then enter pwd. What output do you receive?

/home/jason The .. is a special directory reference to the parent of the current present working directory. Using cd .. essentially moves the pwd up a single level to /home/jason.

20
New cards

Typing $ followed by pressing which key twice, in quick succession, will list all of the variables?

TAB. Typing $ followed by TAB TAB in quick succession will list all variables.

21
New cards

Man pages have…

Name, Configuration, Return Value, and Errors sections.

22
New cards

Which of the following commands will create a single directory named dir1 dir2?

mkdir “dir1 dir2” A space in the directory name can be used by enclosing the directory name within quotes (mkdir “dir1 dir2”). The above command will create a single directory named dir1 dir2 (with a space between dir1 and dir2).

23
New cards

In order to rename the directory ~/documents/letters to ~/documents/archive, which of the following commands should be used?

mv ~/documents/letters ~/documents/archive.To rename a file in Linux, you utilize the move (mv) command. The command should use the syntax of mv <original_filename> <new_filename). Rename and copy are not valid Linux commands but instead are used in Windows. The cp (copy) command will make a new file with the name “archive”; therefore, it is not the correct answer.

24
New cards

Which command is used to print one page of text to the screen at a time?

less. On Linux systems, less is a command that displays file contents or commands output one page at a time in your terminal. Less is most useful for viewing the content of large files or the results of commands that produce many lines of output. The content displayed by less can be navigated by entering keyboard shortcuts.

25
New cards

Which redirection operator accepts text on the following lines as standard input?

The << redirection operator is used to accept text on the following lines as standard input.

26
New cards

What option can be used with cat to display line numbers with the text of a file to the screen?

-n. The -n option will show the line numbers next to a file's contents when displayed to the screen. For example, "cat -n song.txt" will display the contents of the song.txt file with line numbers down the left column of the display.

27
New cards

Which command-line tool will create a filename that ends in .gz?

gzip. Gzip is a file compression tool that will create a file ending in the .gz extension to identify it as a compressed gzip archive.