Font size
WorksheetsLPIC-1/CompTIA Linux+ 1
Total questions: 35
Worksheet time: 18mins
What shell is the default shell for most Linux distributions
sh
2
3
4
You are working at the bash shell in a CLI-only environment on a Linus system. You have a program currently running when you discover that you need to access to the shell prompt to perform another task. You don't want to halt the first program to do this. What can you do?
You can press CTRl-F2 to open an alternate console screen and access a new shell session
2
3
4
You've copied down an executable file named runupdate.sh from your company's server to the /tmp directory on your Linux system. You change to the /tmp at the shell prompt. When you enter runupdate.sh, the shell indicates that it can't find the file. What can you do?
Add a ./ before the filename when entering it at the prompt
2
3
4
You need to find out what directories in the Linux file system are included in the path. What command can you use? (choose two)
env
echo $PATH
3
4
You've copied an executable file named update1.sh from your company's server to /tmp on your Linux system. You open a shell and change to the /tmp directory. When you ./Update1.sh, the shell indicates that it can't find the file. What can you do?
enter the filename in all lowercase letters
2
3
4
Which Linux utility can be used to display a list of all running processes on your system?
top
2
3
4
Which Linux utility can be used to display your network board configuration?
ifconfig
2
3
4
Which Linux utility can be used to change to a different user account at the shell prompt?
su
2
3
4
Which configuration file is read when a non-login bash shell is run?
.bashrc
2
3
4
Which configuration file is the first file read when a login bas shell is run?
/etc/profile
2
3
4
Which file contains a list of your most recently entered shell commands?
~/.bash_history
2
3
4
Which keystroke is used for the command completion feature of bash?
TAB
2
3
4
Which utility is used to view manual pages?
man
2
3
4
Which environment variable contains the directory where man page files are located?
MANPATH
2
3
4
Which of the following manual sections contains man pages for administrative utilities used by the root user?
8
2
4
6
Which of the following manual sections contains man pages for utilities and commands that can be used by any user?
1
2
3
4
You need to learn about the options available for the mkdir utility. Which command will display its manual page?
man mkdir
2
3
4
You need to learn about the options available for the chmod utility. Which command will display its manual page?
man chmod
2
3
4
Which section in a man page provides a brief review of the syntax used for a particular command or utility?
SYNOPSIS
2
3
4
Which section in a man page provides a list of man pages of other resources related to the particular command utility?
SEE ALSO
2
3
4
You're using man to view the man page for the chown utility. Which keystroke will unload the current man page and exit man?
Q
2
3
4
You're using man to view the man page for the Samba daemon. Which keystrokes can you use to search for the term "password" in the man page?
/password
2
3
4
After searching for a term within a man page, you need to jump to the next instance of the term in the page. Which keystroke will do this?
N
P
M
Z
You need to search for man pages that relate to the Samba daemon. Which command will do this?
man -k samba
man -k daemon
3
4
You need to search for man pages that relate to the PAM service. Which command will do this?
apropos pam
2
3
4
You need to use info to view information about using the smbpassword utility. Which command will do this?
info smbpassword
2
3
4
While viewing an info node, which keystroke can be used to navigate to the next node?
N
M
P
Z
While viewing an info node, which keystroke can be used to navigate to the previous node?
P
N
W
Q
While viewing an info node, which keystroke can be used to navigate to the beginning of the node?
HOME
INSERT
RE PAG
AV PAG
You want to add the ~/temp directory to your system's PATH environment variable. You want to be sure you don't overwrite the existing directories in your path, so you enter PATH=PATH:~/temp at your shell prompt. Did you do this correctly?
No, you must use a $ before the second PATH variable name in the command
2
3
4
Which command can you use to view the values currently assigned to your environment variables?
set o env
2
3
4
You want to view a list of the aliases currently defined on your Linux systems. What command can you issue at the shell prompt to do this?
alias
2
3
4
Which file descriptor refers to the text a command displays on the screen after the command has finished processing?
stdout
stderr
2
2
3
3
4
4
You want to send the standard output and the standard error from the tail /var/log/firewall command to a file named lastevents in the current directory . Which command will do this?
tail /var/log/firewall 1>lastevents 2>&1
2
3
4
You want to send the contents of the logfile.txt file in the current directory to the sort command to sort them alphabetically and display them on the screen. Which command will do this?
sort<./logfile.txt
2
3
4
