section 2 practice questions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

According to the command help, which of the following options can be added to the killall command to kill a process group instead of just a process? Type killall -h or killall --help at the prompt to answer this question. -g -q -v -w

-g The -q (quiet) option doesn't print complaints. The -v (verbose) option reports whether the kill signal was successfully sent. The -w (wait) option waits for the process to die.

A Linux user has an executable file named ni that can save a snapshot of network information with the date and time in a log file. The executable ni file is in the /root directory, and /root is the current working directory. Which of the following commands would run the executable file? (Select TWO). source ni exec ni ni /root/ni ./ni

/root/ni ./ni To run an executable, you can either change to the directory where the script is held and type ./ni or type the absolute path /root/ni to run the script from any directory. Typing just the file name, "ni", will not work because the current working directory, /root, is not typically contained in the PATH variable. The "source ni" command is typically used within a shell script to read and execute commands within the ni file. In this case, the ni file would not be found, since the current working directory, /root, is typically not contained in the PATH variable. The "exec ni" command is used to execute a command that completely replaces the current process. In this case, the ni file would not be found since the current working directory, /root, is typically not contained in the PATH variable.

Which of the following is displayed when the uname -a command is run? The current working directory The names of files and directories in the current directory All system information The current username

All system information

Which of the following is the standard shell for MOST Linux computers? tcsh Korn Bourne-again shell (bash) C-shell Bourne shell

Bourne-again shell (bash)

Which of the following man page sections shows a list of options available for a Linux command and explains what the options do? DESCRIPTION NAME TITLE SYNOPSIS

DESCRIPTION

If you are viewing the contents of a man page, which key can you press to get back to the beginning of the page?

Home

What does the -M switch do when used with the useradd command? Type useradd -h or useradd --help at the prompt to answer the question. The home directory is not created, regardless of system settings. The home directory is moved. The home directory is created, regardless of system settings. An alternative skeleton directory is used.

The home directory is not created, regardless of system settings.

According to the command help, which of the following is the result of adding -G to the usermod command as a single option? Type usermod -h or usermod --help at the prompt to answer the question. The user is assigned to a new list of supplementary groups. The user is assigned to a new primary group. A new group is appended to the user's list of supplementary groups. A new home directory is assigned to the user account.

The user is assigned to a new list of supplementary groups.

Which of the following commands searches man pages for a specific keyword? (Select THREE.) apropos whatis export slocate help find man -k

apropos whatis man -k The whatis database must be created prior to using these commands. Use the makewhatis command to build the database.

What would you enter at the command prompt to start a new Bourne-again shell (bash) session?

bash

As a Linux user, you have access to an executable file named myapp. It's found in the current directory, but not in the command path. What would you enter at the command prompt to start the myapp file and replace the shell with myapp process?

exec ./myapp The exec command executes an executable not found in the command path. It also replaces the shell with the new process created by the executable file. ./ indicates that the executable is in the current directory.

Which of the following commands should a Linux user enter to see a list of all the commands the user recently ran at the command prompt? chsh uname history clear

history

You are working on a Linux system and need more information about the uname command. What would you enter at the command prompt to learn about the uname command syntax and options?

man uname - shows the command's syntax, options, and related files and commands. info uname - the primary documentation source. Info pages use hypertext links to navigate the pages. uname --help - displays an abbreviated list that shows of the command syntax and available options with brief descriptions

What would you enter at the command prompt to display the current working directory?

pwd


Kaugnay na mga set ng pag-aaral

Fahmy 3030 ===> 12/2 Russiab English sentences 1

View Set

PF - 1 Review- (Sec. 1 of 1)- (9/9/17)(Sat.)

View Set

Chapter 15: Stockholders' Equity

View Set