Test
Midterm
Crea una cuenta gratis para terminar este test
Guarda tu progreso y consulta tu resultado final.
¿Ya tienes cuenta? Inicia sesión
Preguntas del test (40)
1Within a shell script, what symbol pair can be used to obtain all of the parameters passed to the shell script except the first?
- A$0
- B$z
- C$@
- D$&
2When logging on to a system interactively, in what order are the common startup files called?
- A/etc/profile, ~/.bashrc, ~/.bash_profile, /etc/bashrc
- B/etc/profile, ~/.bash_profile, ~/.bashrc, /etc/bashrc
- C~/.bash_profile, ~/.bashrc,/etc/bashrc, /etc/profile
- D/etc/bashrc, /etc/profile, ~/.bashrc, ~/.bash_profile
3Given the command
find /proc/* 2>/dev/null | sed -n -e '/sda1 /p; d;'
Which command's standard error will be redirected?- Afind
- Bproc
- Csed
- Dsda1
4When a command is invoked with the exec building command, where does the invoked command execute?
- AThe invoked command executed in a seperate process
- BThe invoked command replaces the shell in the current process and executes there
- CThe invoked command executes in a new process in the background
- DThe invoked command immediately fails
5When is it necessary to reload a startup file (e.g /etc/profile) for some reason, which of the following commands would be used?
- Asource /etc/profile
- B. /etc/profile
- CBoth source /etc/profile and . /etc/profile will perform the reload
- DNeither source /etc/profile nor . /etc/profile will perform the reload
6What is a shell script?
- AA shell script is a program written in the C programming language
- BA text file containing the source code of a web page
- CA shell script is a program consisting of built-in and external commands, variables, parameters, and comments
- DA shell script is a program consisting of built-in and external commands only; other elements such as variables, parameters, and comments are not allowed
7What is the significance of the following line from a shell script,
#!/bin/bash
when it is the first line of the script?- AIt is just a comment since it begins with the # symbol
- BIt tells the invoking shell to run the script using a new bash shell
- CIt tells the invoking shell to replace itself with a new bash shell to run the script
- DIt tells the invoking shell to run the script using any shell except bash
8What is the purpose of the built-in jobs command?
- ATo display a list of every child process ever launched from the current shell
- BTo list every running process on a system
- CTo list every process for the current user since the system was booted
- DTo display a list of the child process of the current shell that have not completed
9Which shell program is most commonly used on Linux systems
- Ash
- Bksh
- Cbash
- Dtsh
10Given the command
find /proc/* 2>dev/null | grep sda1
What is the special significance of the /dev/null potion of the command?- A/dev/null is the name of the fine to which standard error is redirected and saved
- B/dev/null is a special device file that can be used to discard output. in this case the redirected standard error output
- C/dev/null is a placeholder that must be replaced before the command can be used
- D/dev/null causes the redirect to be ignored, the output is still sent to the screen
11Which of the following methods can be used to change the default behavior of bash, if it can be changed? Select all choices that are true.
- AUsing the shopt built-in command with appropriate options
- BThere is no way to change the behaviour of bash
- CExecuting bash with a command line option e.g. bash --posix
12The directory stack facility is used to assist user's with which of the following?
- ATo keep a history of recently used commands pertaining to directory manipulations
- BTo move about a ILinux file systems without having to repeatedly type long directory names
- CTo delete directories from anywhere on the file system
- DTo create directories in the current working directory
13Where is the command history for each user stored, if that facility is enabled?
- A~/.bash_profile
- B~/history
- C~/.bash_history
- D~/.nash_hist
14Which of the following commands or operations permits the listing of previously used commands but does not allow them to be edited?
- Afc
- Bhistory
- Creadline (up and down arrows)
- D! (exclamation point)
15The Alias built-in command creates a shorthand reference to other commands. A common alias for the root user is:
alias r,'rm -i'
What does this command do?- AWhenever rm is entered as the first two characters on a command line followed by a space, the alias value rm -i will be substituted for it
- BNothing will happen, the command will be executed as entered
16Which of the following commands removes the second entry from a directory stack?
- Apopd +2
- Bpopd +1
- Cpopd 2
- Dpopd +3
17A user has asked the system administrator to assist in the implementation of a complex operation within the bash shell environment. Should the administrator use an alias or a function?
- AAn alias since functions are hard to implement
- BEither one as they have the same functionality
- CA function since aliases are only intended to perform simple text substitution at the beginning of a command
18Most of the users on a system decide they each want a different set of functions to help them with their daily tasks. Where should the system administrator who was assisting the users with the creation of the function store them?
- AAll of the functions should be placed in the /etc/profile file
- BThe functions for each user should be placed in the requesting user's ~/.bash_profile file
19The environment variables listed below are all related to command history. Select all of those that can be customized by the user to suit his or her needs.
- AHISTSIZE
- BHISTFILESIZE
- CHISTFILE
- DHISTCONTROL
20One of the steps in preparing a command line for execution is known as Brace expansion. Applying this expansion to this command:
echo per_{dog,cat}.doc
What would the output of the command be?- Aper_dog cat.doc
- Bper_cat.doc per_dog.doc
- Cper_{dog,cat}.doc
- Dper_dog.doc per_cat.doc
21Which of the following is NOT a method for a system administrator to gain root privileges without interrupting normal system operation?
- AUse su
- BUse sudo
- CLog on as root
- DUse single user mode
22Some distributions of Linux and other similar operating systems lock the root account by default. Why would you want to have the root account unlocked and have a known password on it?
- AThe root account and password are needed to be able to use single-user mode for system maintenance and repair
- BAll system administrators need the root account and password to be able to do their jobs
- CTo make it easier for hackers to get into the system
23What systemd target unit is the SysVinit runlevel 5 approximately equivalent to?
- Agraphical.target
- Breboot.target
- Cmulti-user.target
- Drescue.target
24In the /etc/sudoers file, what does the following mean?
%sysadmin ALL=(ALL)ALL- AThe user sysadmins in not allowed to do anything as the % symbol means 'not allowed'
- BNothing, the line is a comment
- CThe user sysadmins is allowed to perform any command as any user from any computer
- DAll members of the sysadmins group are allowed to perform any command as any user from any computer
25systemd (init) is the first process started after the Linux kernal is loaded. What is its PID?
- A1
- B32767
- C0
- D3
26Which boot loader is currently used by the Fedora/RHEL family of Linux operating systems?
- AGRUB
- BLilo
- Claunchd
- Dupstartd
27The following calls to the sudo command both open shells with root privilege:
sudo -s
sudo -i
Which call(s) cause root's startup files to be loaded?- ABoth calls
- Bsudo -s
- CNeither call
- Dsudo -i
28What does the command:
systemctl isolate multi-user.target
do?- ASwitches the systemd current target to multi-user.target
- BFlags the multi-user.target as unusable
- CMakes multi-user.target the default target
- DErases all of the other systemd targets
29What level of privilege should an administrator use to perform any given task?
- AThe same privileges as the user requesting that the task be performed
- BAlways use sudo to perform every task
- CFull root privileges
- DThe minimum level of privilege necessary to do the task
30Which of the following commands will make the sshd service unit persistent under systemd?
- Asystemctl is-enable sshd.service
- Bsystemctl enable sshd.service
- Csystemctl status sshd.service
- Dsystemctl start sshd.service
31Which of the following commands can be used to terminate a process on a Linux System when the process ID (PID) is known?
- Akill
- Bpkill
- Cps
- Dkillall
32Where will you find PAM configuration information stored on Fedora/RHEL systems
- A/etc/pam.d/*
- B/etc/auth/*
- C/etc/pam.conf
- D/var/pam.d/*
33The X Windows system uses a client/server model that permits it to be used for both local and remote display and input devices. Which of the following correctly identifies the client and server parts of X Windows?
- ABoth the application and the display are servers
- BThe display is the server and the application is the client
- CBoth the application and the display are clients
- DThe application is the server and the display is the client
34What is the effect if issuing the following command:
xmodmap -e 'pointer = 1 2 3'
when the pointer device is a 3 button mouse without a scroll wheel?- AIt sets the physical to logical button mappings to their left-handed settings
- BIt sets the physical to logical button mappings to their right-handed settings
- CIt randomizes the mouse button mappings
35When editing a configuration file, what would you do if a value contains spaces?
- APut each space within double quotes
- BJust type in the value as is, the program can figure it out
- CPlace the entire value within single or double quotes, or use the backslash (\) character before each space
- DPut each space within single quotes
36You are connected to a remote Linux system via SSH using a X Windows tunnel and issue the following command in a shell on the remote system
echo $DISPLAY
Which of the following choices could be expected as a valid result of this command?- ANothing would be output
- Blocalhost:10.0
- C:0.0
- D:0
37When SELinux is in ENFORCING mode, it works in conjunction with traditional security methods. In what order does the system apply these two security approaches?
- ATraditional security then SELinux
- BSELinux the traditional
- CBoth simultaneously
- DIn a random order
38Firewalls, TCPWrappers, and chroot are all methods for securing server daemons from unwanted access. Which of them uses configuration files named /etc/hosts.allow and /etc/hosts.deny?
- ATCPWrappers
- Bchroot
- CFirewalls
39You do not want to use SELinux on a certain system at the present time but will want it in a few months time when the system goes into full production. What mode would you set SELinux in initially?
- AENFORCING
- BDISABLED
- CPERMISSIVE
40What does the dmesg command do?
- AIt deletes all system messages
- BIt saves messages related to the most recent system boot in a file
- CIt displays recent system messages on the screen
- DIt displays messages related to the most recent system boot
Información
- Descripción
- Midterm review
- Autor
- David Jaworski
- Idioma
- English
- Visitas
- 27
- Historial
- Creado el 4 feb 2017 · actualizado el 7 abr 2018
- Etiquetas
- Valoración
- Aún sin valoraciones Valora este test