Test
Linux Test 1
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 (39)
1Given the command:
find /proc/* 2>/dev/null | grep sda1
What is the special significance of the /dev/null portion 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 placeholder that must be replaced before the command can be used
- D/dev/null causes the redirect to be ignored, the output is stll sent to the screen
2What 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
3What is a shell script?
- AA program consisting of built-in and external command, variables, parameters, and comments
- BA program written in C
- CA txt file containing the source code of a web page
- DProgram consisting of built-in and external command only; other elements such as variables, parameters and comments are not allowed
4When it is necessary to reload a startup file (e.g. /etc/profile) for some reason, which of the following commands would be used?
- Aboth source /etc/profile AND . /etc/profile will perform the reload
- Bneither source /etc/profile AND . /etc/profile will perform the reload
- Csource /etc/profile
- D. /etc/profile
5When a command is invoked with the exec building command, where does the invoked command execute?
- AThe invoked command replaces the shell in the current process and executes there
- BThe invoked command executes in a new process in the background
- CThe invoked command executes in a separate process
- DThe invoked command immediately fails
6When logging on to a system interactively, in what order are the common startup files called?
- A/etc/profile, ~/.bash_profile, ~/.bashrc, /etc/bashrc
- B/etc/profile, ~/.bashrc, ~/.bash_profile, /etc/profile
- C~/.bash_profile,~/.bashrc, /etc/bashrc, /etc/profile
- D~/.bash_profile, /etc/bashrc, /etc/profile, ~/.bashrc,
7Given the command
find /proc/* 2>/dev/null |sed -n -e '/sda1/p: d:'
which commands standard error will be redirected?- Afind
- Bproc
- Csed
- Dsda1
8Within a shell script, what symbol pair can be used to obtain all of the parameters passed to the shell script except the first?
- A$@
- B$0
- C$z
- D$&
9What is the purpose of the build-in jobs command?
- ATo display a list of the child process of the current shell that have not completed
- BTo list every running process on a system
- CTo list every process for the current user
- DTo display a list of every child process ever launched from the current shell
10Which shell program is most commonly used on Linux systems?
- Abash
- Bksh
- Csh
- Dtsh
11Which of the following command will make athe sshd service unit persistent under systemd?
- Asystemctl enable sshd.service
- Bsystemctl status sshd.service
- Csystemctl is-enable sshd.service
- Dsystemctl start sshd.service
12In the /etc/sudoers file, what does the fallowing line mean?
%sysadmins ALL=(ALL) ALL- AAll members of the sysadmins group are allowed to perform any command as any user from any computer
- BThe user sysadmins is not allowed to do anything as the % symbol means 'not allowed'.
- CThe user sysadmins is allowed to perform any command as any user from any computer
- DNothing, the line is a comment
13Which of the following is NOT a method for a system administrator to gain root privileges without interrupting normal system operation?
- 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
14Some 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
15What does the command do?
systemctl isolate multi-user.target- 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
16What level of privilege should and administrator use to perform any given task?
- AThe minimum level of privilege necessary to do the task.
- BAlways use sudo to perorm every task
- CThe same privileges as the user requesting that the task be performed
- DFull root privileges
17Which of the following is NOT a method for a system administrator to gain root privileges without interrupting normal system operation?
- ALog on as root
- BUse single user mode
- CUse su
- DUse sudo
18What systemd target unit is the SysVinit runlevel 5 approximately equivalent to?
- Agraphical.target
- Brescue.target
- Creboot.target
- Dmulti-user.target
19systemd (init) is the first process started after the Linux kernel is loaded, what is its PID?
- A1
- B0
- C32767
- D3
20When 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 then traditional security
- CBoth simultaneously
- DIn a random order
21You 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?
- APERMISSIVE
- BDISABLED
- CENFORCING
22What is the effect of 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 randomizes the mouse button mappings
- CIt sets the physical to logical button mappings to their right-handed settings
23What does the dmesg command do?
- AIt displays recent system messages on the screen
- BIt displays message related to the most recent system boot
- CIt saves messages related to the most recent system boot in a file
- DIt deletes all system messages
24The 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?
- AThe application is the server and the display is the client
- BBoth the application and the display are servers
- CBoth the application and the display are clients
- DThe display is the server and the application is the client
25Where will you find PAM configuration information stored on Fedora/FHEL systems?
- A/etc/pam.d/*
- B/etc/auth/*
- C/etc/pam.conf
- D/var/pam.d/*
26Firewalls, 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
- BFirewalls
- Cchroot
27When editing a configuration file, what would you do if a value contains spaces?
- APlace the entire value within single or double quotes, or use a backslash (\) character before each space
- Bput each space within single quotes
- Cput each space within double quotes
- Djust type in the value as is, the program can figure it out
28Which of the following commands can be used to terminate a process on a Linux System when the process ID (PID) is known?
- Akill
- Bkillall
- Cps
- Dpkill
29You are connected to a remote Linux system via SSH using an 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 valid results of this command?- Alocalhost:10.0
- B:0
- Cnothing would be output
- D:0.0
30Where is the command history for each user stored, if that facility is enabled?
- A~/ .bash_profile
- B~/ .bash_hist
- C~/history
- D~/ bash_history
31One 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.doc per_cat.doc
- Bper_dog cat.doc
- Cper_cat.doc perdog_doc
- Dper_{dog,cat}.doc
32A user has asked the system admin to assist in the implementation of a complex operation within a bash shell environment. Should the administrator use an alias or function?
- AA function since aliases are only intended to perform simple text substitution at the beginning of a command line
- BAn alias since functions are hard to implement
- CEither one as they have the same functionality
33The 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
- CHISTCONTROL
- DHISTFILE
34Most of the users on a system dcide they each want a different set of functions to help them in their daily tasks.
Where should the system administrator who is assisting the users with the creation of the functions store them?- AThe functions for each user should be placed in the requesting user's ~/.bash_profile file
- BAll of the function should be placed in the /etc/profile fine
35The alias built-in command create a shorthand reference to another command. A common alias for the root user is:
alias rm='rm -1'
What does this alias mean?- AWhenever rm is entered as the first two characters on a command line followed by a space, the alias value rm-1 will be substituted for it
- BNothing will happen, the command will be executed as entered
36The directory stack facility is used to assist user's with which of the following
- ATo move about a Linux file system without having to repeatedly type long directory names
- BTo delete directories from anywhere on the file system
- CTo keep a history of recently used commands pertaining to directory manipulations
- DTo create directions in the current working directory
37Which of the following methods can be used to change the default behaviour of bash, if it can be changed? Select all the choices that are true.
- AThere is no way to change the behaviour of bash
- BUsing the shopt built-in command with appropriate options
- CExecuting bash with a command line option eg bash --posix
38Which of the following commands or operations permits the listing of previously used commands but does not allow them to be edited?
- A! (exclamation point)
- Breadline (up and down arrows)
- Chistory
- Dfc
39Which of the following commands removes the second entry from a directory stack?
- Apopd +1
- Bpopd +2
- Cpopd +3
- Dpopd 2
Información
- Descripción
- Intermediate Linux Test 1 Practice Quiz
- Autor
- dbm
- Idioma
- English
- Visitas
- 122
- Etiquetas
- Valoración
- 4,0 de 5 · 1 valoración Valora este test