Linux LPI 117-101 # 6 Of 9

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Tobyyy
T
Tobyyy
Community Contributor
Quizzes Created: 10 | Total Attempts: 1,461
| Attempts: 131 | Questions: 57
Please wait...
Question 1 / 57
0 %
0/100
Score 0/100
1. You wish to send the output of a command to standard output (stdout) and save it to
a file. The command to use is ______________. (Do not specify arguments)

Explanation

I want to show you one example, set | tee set.out | less. Here set
command generates the output and gives as an input to tee command. tee command
saves the output of set into set.out as well piping the output to less.

Submit
Please wait...
About This Quiz
Linux LPI 117-101 # 6 Of 9 - Quiz

This quiz, titled 'Linux LPI 117-101 # 6 of 9', assesses knowledge on Linux command line operations. It covers commands for input\/output redirection, process control, and system information... see moreretrieval. Essential for learners aiming to master Linux administration and scripting skills. see less

2. The process big Certkiller is out of control, and efforts to cleanly stop it fail.
You have executed a ps command and it displays the following info
            PID TTY TIME CMD
            3541 pts/0 10:10:10 big Certkiller
            3558 pts/0 00:00:00 ps
            What command should you type to absolutely stop the runaway process?

Explanation

While killing the process using -9 signal it unable to clean up before exiting. When you
use the -9 signal, it sends the sigkill signal. Other Avaialble signals are:
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL
5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE
9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2
13) SIGPIPE 14) SIGALRM 15) SIGTERM 17) SIGCHLD
18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN
22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO
30) SIGPWR 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1
36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 39) SIGRTMIN+5
40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 43) SIGRTMIN+9
44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13
52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9
56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 59) SIGRTMAX-5
60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 63) SIGRTMAX-1
64) SIGRTMAX

Submit
3. What command or option will allow a program to continue operations after the
invoking user has logged out of the system? Type just the answer.

Explanation

nohup : run a command immune to hang-ups, with output to a
non-tty, to keep the process running after you logged out.

Submit
4. What option can be used with the shutdown command to reboot the system?

Explanation

shutdown brings the system down in a secure way. All logged-in uers
are notified that the system is going to down, and login blocked.
shutdown -k message : Which sends the warning messages to all logged-in users.
shutdown -r time : Which reboots the system
shutdown -t time -h: Which halt the system after shutting down.

Submit
5. You are writing a script to automate some tasks. You would like to be able to have a
log of everything that you see printed to your console, yet you want to be able to see
the output on the console as well.
What textutils command would typically be used to accomplish this?

Explanation

tee command redirect output to a file while still piping it to another
program.
Example: set | tee set.out | less : In example, output from set is written to file set.out
while also being piped to less.

Submit
6. Which of the following syslog.conf entries would cause mail error messages to be      
sent to the system console?

Explanation

Syntax of /etc/syslog.conf is :
facility.priority : Where facility represents facility of service and priority represents the
level of logs to store eg, info, err, emerg etc.

Submit
7. What will the command "kill -HUP 1354" do?

Explanation

kill command is used to terminate the processes by default it sends the
TERM signal. When you send the -HUP signal, it will restart the process by reading
the original configuration file.

Submit
8. What is the disadvantage of using the command kill -9 ?

Explanation

While killing the process, we can send the signal. By default kill
command sends the TERM signal, to send -9 signal
#kill -9 PID
While killing the process using -9 signal it unable to clean up before exiting.

Submit
9. You wish to start a process and run it in the background. The binary executable is
mybinary, and it's in your path. Type in the command in its simplest form to do
this.

Explanation

Process can start either in foreground or in background. By default
commands executes on foreground. Running the process in foreground allows only
one command can enter at a time because we will get the shell to type another
command until fininshing the current command. But background process allows to
run the more than one command at a time.
To run the process in background just append the & at the end of the command.
Example:
# find / -name passwd >result &

Submit
10. You wish to know what the previous runlevel the system was in. Type in the
command to show this.

Explanation

runlevel command displays the current and previous runlevel.
Example:
[root@server1 ~]# runlevel
N 3
[root@server1 ~]#
Which means Currenct runlevel is 3 is runlevel is not changed.
Standard Runlevel
0 - halt (Do NOT set initdefault to this)
1 - Single user mode
2 - Multiuser, without NFS (The same as 3, if you do not have networking)
3 - Full multiuser mode
4 - unused
5 - X11
6 - reboot (Do NOT set initdefault to this)

Submit
11. What daemon controls the syslog?

Explanation

Syslogd provides two system utilities which provide support for system
logging and kernel message trapping. Support of both internet and unix domain
sockets enables this utility packages to support both local and remote logging.

Submit
12. What command can be used to print out system boot messages?

Explanation

dmesg command prints the boot messages, you can check which
devices are detected by your kernel or not from the boot log messages.

Submit
13. Which of the following syslog.conf entries would cause kernel warning messages to
be sent to the system console?

Explanation

/etc/syslog.conf is the syslog configuration file, where we specified the
facility and priority to send the facility related log messages to specified file.
kernel.warning /dev/console : this line sends the warning related to kernel into
/dev/console.

Submit
14. What syslog.conf facility represents the line printer?

Explanation

Facility in /etc/syslog.conf can be auth, authpriv, cron, daemon, kern,
lpr, mail, mark, news, security, syslog, user, uucp and local0. Where lpr is the
facility for line printer.

Submit
15. You wish to see the processes that are taking up CPU resources and their PID
numbers. Type in the command that would do this including the options/arguments
to cause a refresh every second.

Explanation

Explanation:
The top programs provides a dynamic real-time view of a running system. It can
display system summary information as well as a list of tasks currently being
mananged by the linux kernel.
-d interval : Delay Time : Specifies the delay between screen updates and overrides the
corresponding value in one personal configuration file or th startup default.

Submit
16. What option can be used with the shutdown command to cancel a pending
shutdown?

Explanation

shutdown brings the system down in a secure way. All logged-in uers
are notified that the system is going to down, and login blocked.

Syntax: shutdown [time]
#shutdown -c : Which cancel the shutdown process.

Submit
17. Which of the following syslog.conf entries would cause kernel error messages to be
sent to the system console?

Explanation

/etc/syslog.conf is the syslog configuration file, where we specified the
facility and priority to send the facility related log messages to specified file.
kernel.warning /dev/console : this line sends the warning related to kernel into
/dev/console.

Submit
18. You want to do a system shutdown, but you don t want the shutdown to occur
immediately. You want the system to wait 60 seconds before doing the shutdown.
What option can be used with the shutdown command to wait 60 seconds before
starting theshutdown?

Explanation

shutdown brings the system down in a secure way. All logged-in uers
are notified that the system is going to down, and login blocked.
Syntax: shutdown [time]
#shutdown -c : Which cancel the shutdown process.

Submit
19. Which of the following GNU commands would be the most likely command you'd
use to find the system load average?

Explanation

The top program provides a dynamic real-time view of a running
system. It can display system summary information as well as a list of tasks
currently being managed by the Linux kernel. The types of system summary
information shown and the types, order and size of information displayed for tasks
are all user configurable and that configuration can be made persistent across
restarts.

Submit
20. What command changes the priority of the process running with process id of 12345
to the highest priority?

Explanation

To change the priority of running process we use the renice command.
Default priority is 0, highest priority is -20 and lowest priority is 19. The path of
renice command is /usr/bin/renice.

Submit
21. To keep a process running after you logged out, you start it with the command:

Explanation

nohup : run a command immune to hang-ups, with output to a
non-tty, to keep the process running after you logged out.

Submit
22. You have backgrounded a job called big Certkiller . When you type jobs and the
            command line it comes back with the following info.
            jobs
            [1] Running job1
            [2] - Running big Certkiller
            [3]+ Stopped job5
            Type the command any switch(es) that would bring big Certkiller to the foreground.

Explanation

when you enter the command it runs on foreground, which means you
can type the commands after completing only, this is called foregroup but when you
run the command in background, it allows to run multiple commands on same shell.
bg jobid: which runs the jobs in background
fg jobid: Which runs the jobs in foreground.

Submit
23. You have just added the following line to your syslog.conf file:
            lpr.info /dev/console. But, line printer messages are not being sent to the console.
            What is most likely the problem?

Explanation

syslog is the daemon, which reads /etc/syslog.conf configuration file.
After changing the configuration of syslog.conf you should restart the syslog service.
# service syslog restart

Submit
24. In the command 'test < bill | Certkiller '.

Explanation

Common Redirection Operators
Command >file : Redirects standard output of command into the file
Command>>file : Append the standard output of command into the file
Command Command 2>file : Redirects the standard Error into the file
And Pipe (|) is used to combine the command, in piping outout of first command goes as
input to the second command.
Answer D is correct because test command takes input from the Bill file and sends the
standard output to Certkiller command.

Submit
25. What syslog.conf facility represents user processes?

Explanation

user facility represents the user processes Example:
User.* /var/log/userlogs : It sends all user processes logs into /var/log/userlogs file

Submit
26. In order to append the output of ls to a file called result, which of the following command
lines would you use?

Explanation

> will save the output to result
>> will append the output to result
>& will copy the output to result

Submit
27. What syslog.conf facility represents Unix to Unix copy?

Explanation

Facility in /etc/syslog.conf can be auth, authpriv, cron, daemon, kern,
lpr, mail, mark, news, security, syslog, user, uucp and local0. Where uucp facility
represents Unix to Unix copy.

Submit
28. What does the command "foo < bar | foobar" do?

Explanation

Common Redirection Operators
Command >file : Redirects standard output of command into the file
Command>>file : Append the standard output of command into the file
Command Command 2>file : Redirects the standard Error into the file
And Pipe (|) is used to combine the command, in piping outout of first command goes as
input to the second command.
Answer A is correct because foo command takes input from the bar file and sends the
standard output to foobar command.

Submit
29. What is the name of the configuration file used by the syslog daemon?

Explanation

/etc/syslog.conf is the main log configuration file reads by syslogd
service. Which logs system messages on unix system.

Submit
30. What syslog.conf facility represents mail processes?

Explanation

Facility in /etc/syslog.conf can be auth, authpriv, cron, daemon, kern,
lpr, mail, mark, news, security, syslog, user, uucp and local0. Where mail facility
represents the mail processes . By default mail logs are send to /var/log/maillog file.

Submit
31. When executing a command that produces output to the screen, you get an exit code
of 0.
Choose the best description of what has happened

Explanation

when you executes the program, it returns the exit code either 0 or
1-255. If returns the exit code 0 it means program executed successfully it it returns
non-zero values it means error occurred during executing the program.

Submit
32. Which of the following commands sends an unclean and immediate kill signal to process
ID (PID) 1555?

Explanation

-9 is the powerfull signal, which sends an unclean and immediate kill
signal to process ID.

Submit
33. What syslog.conf facility represents user processes?

Explanation

user facility represents the user processes Example:
User.* /var/log/userlogs : It sends all user processes logs into /var/log/userlogs file

Submit
34. Regardless of the version of Linux, which of the following help start and stop
services on demand? Select two.

Explanation

xinetd performs the same function as inetd: it starts programs that
provide Internet services. Instead of having such servers started at system
initialization time, and be format until a connection request arrives, xinetd is the
only daemon process started and it listens on all service ports ofr the services listed
in it's configuration file.

Submit
35. What syslog.conf facility represents user authentication processes?

Explanation

auth facility represents the user authentication processes, and
authentication related logs will send to /var/log/secure.

Submit
36. Given the following output:
         
prompt> myapp
[1]+ Stopped myapp
prompt>

Which of the following commands resume executing the stopped process while allowing the user to continue to type commands at thecommand line.

Explanation

Jobs running on foregroud can suspend by pressing ctrl+z. Then
suspended job can be run either in foreground or in background. To run in
foregroud, fg command and to run in background bg command.
Or
bg job id
fg job id

Submit
37. What syslog.conf facility represents kernel processes?

Explanation

kern facility represents the kernel processes, in first line of

/etc/syslog.conf file, you can see kern.* /dev/console, this means all kernel related log
messages will send to /dev/console.

Submit
38. What is the result of the following command?
command > file1.out 2>&1

Explanation

Common Redirection Operators
Command >file : Redirects standard output of command into the file
Command>>file : Append the standard output of command into the file
Command Command 2>file : Redirects the standard Error into the file
And Pipe (|) is used to combine the command, in piping outout of first command goes as
input to the second command.
When we executes the command it generates the standard output as well as standard error
and displays in standard output (Terminal Window) is default. When we redirect the
standard error as well as standard output into the file, it will not send any output into the
terminal window.

Submit
39. You set a variable's value with the command "export TEST=snuffy" and then after
           executing the following script file, you type the command "echo $TEST".
           scriptfile1
           #!/bin/bash
           USER=certkiller
           TEST=$USER
           What is the variable's value that is returned?

Explanation

Export sets the shell variable named TEST to snuffy.

Submit
40. What syslog.conf facility represents Usenet news?

Explanation

news represents Usenet news example:
Uucp,news.crit /var/log/spooler This line represents the logs of news to redirect into the
/var/log/spooler log files.

Submit
41. When the kill command is given with only the PID number of the process to kill (as
in 'kill 1234'), this corresponds to which type of kill signal?

Explanation

When you send the kill command it by default sends the TERM signal.

Submit
42. Which of the following commands is equivalent to kill 1234?

Explanation

The command kill sends the specified signal to the specified process or
process group. If no signal is specified, the TERM signal is sent.

Submit
43. You need to have all the output from the executable myprog written to a text log
named file1.out. This program must not send any output to the console. Which of
the commands listed will accomplish this?

Explanation

Common Redirection Operators
Command >file : Redirects standard output of command into the file
Command>>file : Append the standard output of command into the file
Command Command 2>file : Redirects the standard Error into the file
And Pipe (|) is used to combine the command, in piping outout of first command goes as
input to the second command.
When we executes the command it generates the standard output as well as standard error
and displays in standard output (Terminal Window) is default. When we redirect the
standard error as well as standard output into the file, it will not send any output into the
terminal window.
myprog >file1.out 2>&1 : Where & works as a Logical AND Operator.

Submit
44. What key sequence will suspend the current process and return you to a shell prompt?

Explanation

A is correct because to suspend the foreground job we use ctrl+z
keystroke. And it converts the foreground jobs in background in stopped status.
To display background job use: jobs command

Submit
45. What will the command "kill -HUP 1354" do?

Explanation

kill command is used to terminate the processes by default it sends the
TERM signal. When you send the -HUP signal, it will restart the process by reading
the original configuration file.

Submit
46. What syslog.conf facility represents the cron daemon?

Explanation

You can see in /etc/syslog :
Cron.* /var/log/cron
This line represents that cron related all log messages will write into /var/log/cron file.

Submit
47. What syslog.conf facility represents login processes?

Explanation

auth is the facility which represents the login processes. Either local
login or remote login, auth facilitiy traps the logs and writes into /var/log/secure file.

Submit
48. Exhibit, output:
            prompt> Certkiller app
            [1]+ Stopped Certkiller app
            prompt>
            Which of the following commands will resume executing the stopped process while
            allowing the user to continue to type commands at the command prompt?

Explanation

Process can start either in foreground or in background. By default
commands executes on foreground. Running the process in foreground allows only
one command can enter at a time because we will get the shell to type another
command until fininshing the current command. But background process allows to
run the more than one command at a time.
To run the process in background just append the & at the end of the command.
Example:
# find / -name passwd >result &
We can suspend the jobs running in foreground by pressing ctrl+z shortcut. As well as
can resume the suspended jobs either in background or foreground.
#fg %jobid : Runs the job in foreground
#bg %jobid : Runs the job in background
or
#fg command
#bg command

Submit
49. What syslog.conf facility represents miscellaneous daemons?

Explanation

daemon facility represents the miscellaneous daemons like httpd,
vsftpd etc

Submit
50. What syslog.conf facility is used to create timestamps in log files?

Explanation

You can see the timestamps on every log files this timestamps is
genereated by mark facility.

Submit
51. What option can be used with the shutdown command to send a warning message
alerting users that the system will be shut down?

Explanation

shutdown brings the system down in a secure way. All logged-in uers
are notified that the system is going to down, and login blocked.
Syntax: shutdown -k message : Which sends the warning messages to all logged-in users.

Submit
52. What is the default process priority when a process is started using the nice command?

Explanation

Default Priority for nice command is 0, highest is -20 and lowest is 19.

Submit
53. What syslog.conf facility represents httpd processes?

Explanation

daemon facility represent the httpd processes.

Submit
54. What is the result of the command:
# kill 9 13459

Explanation

Kill usage is:
kill [ -s signal | -p ] [ -a ] [ -- ] pid ...

Submit
55. What will the command "kill -HUP 1354" do? Select all the apply

Explanation

kill command is used to terminate the processes by default it sends the
TERM signal. When you send the -HUP signal, it will restart the process by reading
the original configuration file. It is same to -SIGHUP and -1 signal. If you want to
display all the signal avaialbles just use the kill -l command.

Submit
56. A user complains that she cannot run her script at a process priority higher than 0.
Select the probable cause:

Explanation

Default Priority is 0 and root only can set priority from -20 (Highest)
to 19 (lowest) priority. Whatever process user runs, process starts on default
priority value 0.
If you are root and want to set priority use: nice -n priority_value command.
Example: nice -n -20 find /etc -name passwd. But users can't set the priority to process. If
you tried from no-root user you will get message: nice: cannot set priority: Premission
Denied.

Submit
57. You wish to kill a process with a PID of 123. Select the command, which will allow
the process to "clean up" before exiting.

Explanation

To terminate the process we use kill command. But we should know
the process ID. In #######*******QUESTIONs PID is specified to 123.
Syntax of kill command is: kill signal PID
Where -9 is the powerful signal then other signal which kill the process.

Submit
View My Results

Quiz Review Timeline (Updated): Apr 17, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Apr 17, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 07, 2009
    Quiz Created by
    Tobyyy
Cancel
  • All
    All (57)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
You wish to send the output of a command to standard output (stdout)...
The process big Certkiller is out of control, and efforts to cleanly...
What command or option will allow a program to continue operations...
What option can be used with the shutdown command to reboot the...
You are writing a script to automate some tasks. You would like to be...
Which of the following syslog.conf entries would cause mail error...
What will the command "kill -HUP 1354" do?
What is the disadvantage of using the command kill -9 ?
You wish to start a process and run it in the background. The binary...
You wish to know what the previous runlevel the system was in. Type in...
What daemon controls the syslog?
What command can be used to print out system boot messages?
Which of the following syslog.conf entries would cause kernel warning...
What syslog.conf facility represents the line printer?
You wish to see the processes that are taking up CPU resources and...
What option can be used with the shutdown command to cancel a...
Which of the following syslog.conf entries would cause kernel error...
You want to do a system shutdown, but you don t want the shutdown to...
Which of the following GNU commands would be the most likely command...
What command changes the priority of the process running with process...
To keep a process running after you logged out, you start it with the...
You have backgrounded a job called big Certkiller . When you type jobs...
You have just added the following line to your syslog.conf...
In the command 'test < bill | Certkiller '.
What syslog.conf facility represents user processes?
In order to append the output of ls to a file called result, which of...
What syslog.conf facility represents Unix to Unix copy?
What does the command "foo < bar | foobar" do?
What is the name of the configuration file used by the syslog daemon?
What syslog.conf facility represents mail processes?
When executing a command that produces output to the screen, you get...
Which of the following commands sends an unclean and immediate kill...
What syslog.conf facility represents user processes?
Regardless of the version of Linux, which of the following help start...
What syslog.conf facility represents user authentication processes?
Given the following...
What syslog.conf facility represents kernel processes?
What is the result of the following command?command > file1.out...
You set a variable's value with the command "export TEST=snuffy" and...
What syslog.conf facility represents Usenet news?
When the kill command is given with only the PID number of the process...
Which of the following commands is equivalent to kill 1234?
You need to have all the output from the executable myprog written to...
What key sequence will suspend the current process and return you to a...
What will the command "kill -HUP 1354" do?
What syslog.conf facility represents the cron daemon?
What syslog.conf facility represents login processes?
Exhibit,...
What syslog.conf facility represents miscellaneous daemons?
What syslog.conf facility is used to create timestamps in log files?
What option can be used with the shutdown command to send a warning...
What is the default process priority when a process is started using...
What syslog.conf facility represents httpd processes?
What is the result of the command:# kill 9 13459
What will the command "kill -HUP 1354" do? Select all the apply
A user complains that she cannot run her script at a process priority...
You wish to kill a process with a PID of 123. Select the command,...
Alert!

Advertisement