1/26
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
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
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
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
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
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
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
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
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.
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.
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
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.
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.
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
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
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
which UID is usually used to represent the first regular user on a linux system?
regular users on a linux system begin at UID 1000 and increment by 1 for each additional user
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.
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.
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.
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.
Man pages have…
Name, Configuration, Return Value, and Errors sections.
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).
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.
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.
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.
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.
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.