Linux Final

Ace your homework & exams now with Quizwiz!

The name of the root user's home directory is named ___________ by default.

/root

After the following set of commands are issued, how many times will date appear in logfile1? date>logfile1 pwd>>logfile1 date>logfile1 ls>>logfile1 0 1 2 3

1

Mary has rw-rw-rw- to the file resume which resides in the directory jobs. She modifies and prints off a copy and then wants to delete the file resume but cannot. Why can she not delete the file? A. Mary needs execute permission to the file resume. B. Mary needs write and execute permission to the directory jobs. C. Mary must save the modified file before he can delete it. D. Only root users can delete files.

A. Mary needs execute permission to the file resume. HELLO B

The grep expression "t.e" would find which of the following entries. (Choose all that apply. Hint: Look carefully.) A. the B. these C. toe D. tie E. those

A. the C. toe D. tie HELLO the tie

What will be the result of the cp /boot/file1 . command? A. The same as the cp /boot/file1 .. B. Create a copy of the file1 file from /boot and place it in the current directory C. Create a copy of the file1 file from /boot and place it in the parent directory D. None of the above

B. Create a copy of the file1 file from /boot and place it in the current directory

_______________ is person responsibel for originally creating Linux. A. Richard Stallman B. Linus Torvalds C. Ken Thompson D. Dennis Ritchie

B. Linus Torvalds

What is the purpose of the 3rd line in the script below? date echo "Enter your name:" read NAME A. To display the typed name. B. To get input from the keyboard and store it in a variable. C. To get input from the screen and store it in a variable. D. None of the above

B. To get input from the keyboard and store it in a variable.

In the command "ls - l /etc", -l is a(n) A. command B. option C. argument D. prompt

B. option

What command would be used to remove, jobs ,a directory that contains several files and subfolders? A. rm jobs B. rm -r jobs C. It cannot be done. The directory must be empty. You have to delete the contents first. D. None of the above

B. rm -r jobs

The purpose of the ls -a command is ________________. A. to view all files and folders except for hidden system files B. to view all files and folders including hidden files C. to view files only and not folders D. to view folders only and not files

B. to view all files and folders including hidden files

Which command can be used to view running processes and will update constantly? A. ping B. top C. ifconfig D. nice

B. top

What is the Linux command to copy a directory that contains several files? A. cp B. cp -r C. copy D. copy -t

B. cp -r

Use the following output to answer the question below: -rw-r--r-- 2 root acct 282 Apr 29 22:06 file4 sam is a member of the acct group. What permissions does sam have on file4? A. read and write B. read C. sam has no permissions D. None of the above

B. read

In order to view the contents of a directory, a user must have __________. A. read permission B. write permission C. write and execute permission D. read and execute permission

B. write permission

The default shell in Linux is...

BASH

You are logged in as the user student1. The current directory is student1's home directory called student1. Typing cd ../.. will put you in what directory? A. home B. student1 C. / D. None of the above

C. /

Use the following output to answer the question below: -rw-r--rwT 4 root root 282 Apr 29 22:06 file3 The "T" in the file3 permissions indicates that __________________. A. The SUID permission is set correctly. B. The SGID permission is incorrectly set. C. The sticky bit is incorrectly set. D. Nothing. There is no such display.

C. The sticky bit is incorrectly set. HELLO B. read

In the command "ls - l /etc", /etc is a(n) A. command B. option C. argument D. prompt

C. argument

Which of the following commands would display the last ten lines of the abc file? A. cat abc B. dog abc C. tail abc D. head abc

C. tail abc

What is at the top of the tree structure in Linux? A. \ B. C: C. D: D. /

D. /

GNOME would best be described as ___________. A. a Linux kernel B. a server service C. a Linux distribution D. a desktop environment

D. a desktop environment

Linux can best be described as _____________. A. a programming language B. an application C. a web browser D. an operating system

D. an operating system

What is the Linux command to rename a file? A. ls B. rename C. cp D. mv

D. mv

Which command would reset the priority of a process that is already running? A. nice B. set C. reset D. renice

D. renice

Which Linux distribution did we install for this class?

Fedora 32

What is $PATH? A special variable in Linux that stores the path to your current directory. A special variable in Linux that stores the values of the command prompt. It is a special variable in Linux that holds a lists of directories that are searched for executable files. A special variable in Linux that stores the history of recent commands that are typed.

It is a special variable in Linux that holds a lists of directories that are searched for executable files.

Which command would you use to view the variable called PATH? A. echo $Path B. find $Path C. locate $PATH D. None of the above

Not A or C

Which of the following commands would allow a user to view the ls manual pages and would number each line? man ls | cat -n man ls ; cat -n cat -n | man ls none of the above

Not A, B, or C. Maybe D?

Which command would be used to view the path of the current working directory? A. dir B. pwd C. mkdir D. path

Not pwd or path.

(t/f) The command chmod a=rwx dir1 is equivalent to chmod 777 dir1.

True

After typing the ls -l command, you see the following line in the output: -rw-r-xr-- 1 user1 root 0 Apr 29 15:40 file1 What does this mean? a. User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file. b. Members of the root group have read and write, user1 has read and execute, and all others have read permissions to the file. c. Members of the root group have read and write, user1 has read and execute, and all others have read permissions to the file. d. User1 has read and write, all others have read and execute, and members of the root group have read permissions to the file.

a. User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file.

The default permissions given by the system prior to analyzing the umask are ___________for directories, and __________ for files. a. rwxrw-rw- and rwx-rw-rw- b. rwxrwxrwx and rw-rw-rw- c. rw-rw-rw- and r--r--r-- d. rw-rw-rw- and rw-rw-rw- e. rw-rw-rw- and rwxrwxrwx

a. rwxrwxrwx and rw-rw-rw-

What is the purpose of the following command: date>>file3 append the date to file3 redirect the output of the date command to file3 use file3 as input to the date command none of the above

append the date to file3

What is the purpose of the following command: date>file3 a. to append the date to file3 b. to redirect the output of the date command to file3 c. to enter date at the top of file3 d. to enter date at the bottom of the contents of file3

b. to redirect the output of the date command to file3

The command chmod 317 file1 would produce which of the following lines in the ls -l command? a. --w-r--rwx 1 user1 root 0 Apr 29 15:40 file1 b. --wx--xrwx 1 user1 root 0 Apr 29 15:40 file1 c. -rwxrw-r-x 1 user1 root 0 Apr 29 15:40 file1 d. --w-rw-r-e 1 user1 root 0 Apr 29 15:40 file1

b. --wx--xrwx 1 user1 root 0 Apr 29 15:40 file1

What does the mv command do? (Choose all that apply.) a. It makes a volume. b. It makes a directory. c. It moves a directory. d. It moves a file.

c. It moves a directory. d. It moves a file.

A ____________________ is a text file that contains one or more commands. a. kernel b. binary c. script d. none of the above

c. script

8. After typing the command umask 731, the permissions on all subsequently created files and directories will be effected. In this case, what will the permissions on all new files be? a. rw-rw-rw- b. rwxrw-r-- c. ---r--rw- d. ----wx--x

c. ---r--rw-

What was created to define a standard directory structure and common file location for Linux? a. FSH b. X.500 c. FHS d. root directory

c. FHS HELLO FHS

The shortest command you can type to go directly to the current users home directory is _______.

cd

Which command blanks the terminal screen erasing previously displayed output?

clear

A file has the following permissions r----x-w-. The command chmod 644 would have the same effect as the command _________. Choose the best answer. a. chmod u+x-r,g+r-x,o+w file1 b. chmod u=w,g=rw,o=rx file1 c. chmod u-r-w,g+r-w,o+r-x file1 d. chmod u=x,g=r,o=wx file1 e. chmod u+w,g+r-w,o+r-x file1 f. chmod u=rw,g=r,o=r file1

d. chmod u=x,g=r,o=wx file1

You wish to set up a directory where employees can save data but cannot delete the data or their co-workers. The best option to make this happen is to _____________. A. Set the umask variable to 0017. B. Set the umask variable to 7777. C. Set the SUID and SGID permissions on the directory. D. Set the sticky bit permission on the directory.

d. Set the sticky bit permission on the directory.

Which command do you use to set SGID? A. sgid B. chown C. chper D. chmod

d. chmod?

The command _____ is the alias to the command ls -l.

dir HELLo ls

What would Linux name the first NIC assuming it used init?

eth0 ?

(t/f) The rmdir command may be used to delete a directory containing 3 files.

false

(t/f) The umask variable is typically set to zero.

false

(t/f) There is no real difference between the "S" and "s" special permissions when displayed using the ls -l command. One just means it is on a file and the other that it is on a directory.

false

(t/f) When typing an executable file name at the prompt, Linux will first look in the current directory.

false

What is the command to view networking information in Linux? (Hint: Use the one word command.)

ifconfig

_______ is a Linux command that list the contents of a directory. (Type the command only without any arguments or options.)

ls

What is the Linux command to make a directory?

mkdir

What is the user name of the most powerful user on a Linux sytem?

root

(t/f) Grep matches only patterns of text and is not able to discern words or phrases unless they are specified.

true

(t/f) Linux commands, user names, passwords and file names are case sensitive.

true

(t/f) The Linux processes init and systemd have a PID value of one.

true

(t/f) The command below would create three directories called dir1 dir2 and dir3. mkdir dir1 dir2 dir3

true

(t/f) The command chmod 7431 file1 will set the permissions r-S-ws--t on file1.

true

(t/f) The core component of the Linux operating system is called the kernel.

true

(t/f) The grep command requires two arguments at minimum, the first argument specifies which text to search for, and the remaining arguments specify the files to search.

true

(t/f) The rm command is used to delete files.

true

(t/f) The ~ symbol is a metacharacter that represents the user's home directory.

true

(t/f) The command ifup eth0 will bring up the 1st NIC.

true?

What is the command to create a new user?

useradd


Related study sets

Chapter 62: Carin for Clients with traumatic musculoskeletal injuries

View Set

Insurance Handbook Chapter 5- Diagnostic Coding

View Set

Chp 20: Nursing Assessment: Visual and Auditory

View Set

PrepU ch.24 asepsis &infection control

View Set

Knowledge Check: CompTIA A+ Core 2 (220-1102) Post-Assessment Quiz

View Set

Chapter 9 - Entrepreneurs and Business Organizations

View Set

Ch 6 Nursing care of patients with fluid, Electrolytes, and acid-base imbalances quiz questions from FA Davis

View Set