Linux Testout Pro 5.0.2 Chp: 1-15
Proxy
A computer that provides indirect access to the computers in your network
./ni or /root/ni
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?
SNMP
A protocol used to communicate with and monitor network devices and servers.
SSH
A protocol used to securely log on to remote systems using encryption
yum install httpd
A technician has been given a work order to install the Apache webserver on a system configured with a YUM repository. Which of the following commands will install the webserver?
VPN
A type of network that uses encryption to allow IP traffic to travel securely over the TCP/IP network
ls -l | less
A user attempts to view the contents of a directory, but the output of the ls -l command scrolls beyond the limit of one console window. Which of the following commands would allow the users to see the full listing of the directory?
.profile
A user has requested that each time she presents credentials to log in, a particular entry be written to a log file. This action will only apply to her, and she is using the bash shell. Which of the following configuration files is the best to modify to enable this action?
~/.bash_profile
After a user starts a bash session and the script in /etc/profile is applied, if all of the following files exist, which will be run next?
Database
Alex, a webmaster, is implementing an order processing system on the company's website. Which of the following server roles should Alex implement with the order processing application?
alias logcheck="cd /home/mbrown/logs;ls -al"
Alias to run "cd /home/mbrown/logs" and "ls -al"
/etc/profile
All users at your site are using the BASH shell. You want to set the variable that will apply to every user and always have the same value. Which file would you place this variable in?
ls -s &> ~/Friday
Ann, a linux script developer, is trying to debug a shell script that has the command ls -s in it. She suspects that an error is occurring, and she wants to send the results of the operation and any errors to a file named ~/Friday in order to examine it later. Which of the following commands should she use?
exec ./myapp
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?
Logging
Capturing a timeline of events that have taken place on the computer in the form of a file
ll
Commonly predefined alias configured to run ls -l command
alias sysmesg="tail -f /var/log/messages"
Creates a shortcut that can be used to run "tail -f /var/log/messages" command
alias
Displays a list of the currently defined aliases on the system
printenv
Displays all the environment variables defined in the shell
Home
If you are viewing the contents of a man page, which key can you press to get back to the beginning of the page?
Load balancer
Increases response time to back-end servers by distributing the workload across the available servers
Linux and Cloud Computing
Infrastructure as a Service (IaaS).
Command Mode
Initial vi mode used when vim is started
myscript >> testfile.txt
Joe, a bash script developer, is trying to debug a shell script named myscript. Which of the following commands would record the output of the script in a text file?
Embedded Linux
Manages intelligent devices, such as automation and control equipment.
Name server
Resolves or maps the fully qualified domain names (FQDNs) to IP addresses
Linux Virtualization
Running Linux and Windows on the same physical computer.
rm -r smp
The /home/gshant/smp directory contains several files. The directory and files need to be removed. The current working directory is /home/gshant. What would you enter at the command prompt to remove the smp directory and all the files it contains?
rmdir smp
The /home/gshant/smp directory is empty and need to be removed. The current working directory is /home/gshant. What would you enter at the command prompt to remove the smp directory?
Authentication server
Tim, a system administrator, wants to simplify the provisioning and disabling of user accounts. Which of the following server roles should Tim install and configure?
Linux on mobile devices
Used by Google on many of the physical products it sells.
NTP
Users are complaining that the clocks for their operating systems do not match the current time for the location in which they live. Which of the following server roles is BEST for correcting this issue?
DHCP
Users are complaining that they are unable to connect to any servers or the internet. Based on the symptoms they describe, you suspect that users are not being assigned the correct IP addresses. Which of the following server roles is BEST for correcting this issue?
Type :wq or Press the Esc key
Using the vi editor in Insert Mode, you made a few changes to the /boot/grub/grub.conf file. You now need to switch to command mode, save the changes, and quit. Which of the following keystrokes and commands should you use?
Command Line Mode
Vi mode that works with the files system. Use it to save files after editing them
#82
What command would you enter while in vi Command Mode to go directly to line 82?
yy
What command would you enter while in vi command mode to copy an entire line of text to the general buffer?
/Sam
What command would you enter while in vi command mode to find the term Sam?
:
What key invokes Command Line Mode in vi
pwd
What would you enter at the command prompt on a Linux system to display the present working directory?
file
What would you enter at the command prompt to display a file's type?
bash
What would you enter at the command prompt to start a new Bourne-again shell (bash) session?
|
Which command operator pipes the output of one command as the input of another command?
xargs
Which command overcomes the 128 KB shell command size restriction by breaking up long lists of arguments?
tee
Which command reads from standard input and writes to both standard output and a file?
echo $LANG
Which command shows the value of the LANG environmental variable currently set for language the operating system uses?
HISTSIZE
Which environment variable affects the number of past commands stored in memory in the current shell session?
Add the command defining the alias to the appropriate shell configuration file
Which of the following actions can be used to define a persistent alias?
whatis, apropos, man -k
Which of the following command searches man pages for a specific keyword?
cat
Which of the following commands can be used to combine the content of three files in to a single text stream?
:q!
Which of the following commands can you use to exit vi without saving any changes that were made to the text buffer?
HISTSIZE=300
Which of the following commands configures the shell to retain 300 recently used commands in the ~/.bash_history file for multiple shell sessions?
cp -R /temp /home/gshant cp -r /temp /home/gshant
Which of the following commands copies the entire /temp directory with all of its files, subdirectories and files in the sub-directories to the /home/gshant directory.
env
Which of the following commands displays all of the environment variables?
ls -al /etc
Which of the following commands displays an expanded listing that included the owner and size of all the files in the /etc directory?
cat turbo
Which of the following commands gives the same results as cat < turbo?
echo $HISTSIZE
Which of the following commands is the BEST way to determine the current value of the HISTSIZE variable?
history
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?
cat /usr/wordlist1 /usr/wordlist2 | sort | tee sortedwordlist
Which of the following commands sorts the combined contents of the wordlist1 and wordlist2 files and sends the results to both the screen and a file named sortedwordlist?
cat /usr/wordlist1 /usr/wordlist2 | sort
Which of the following commands sorts the contents of the wordlist1 and wordlist2 files and sends the result to standard output?
allfiles=$(ls -a)
Which of the following commands stores the output of the ls -a command in a shell variable named allfiles?
myvar=`sort -r names.txt` or myvar=$(sort -r names.txt)
Which of the following commands utilize command substitution?
touch /home/gshants/smile
Which of the following commands will change the /home/gshants/smilefile's modification and last accessed times to the current time?
mv /home/pmallory/reports /home/pmallory/reports.bak
Which of the following commands will change the /home/pmallory/reports file name to resports.bak?
cp /var/log/auth.log ~/auth$(date +%A).log
Which of the following commands will copy the authentication log file, /var/log/auth.log, to a new file with a filename that includes the current local weekday name?
cp /media/usb/letter.doc /root
Which of the following commands will copy the file from the USB flash drive to the root user's home directory?
lsattr /boot/grub/grub.conf
Which of the following commands will display the attributes of a /boot/grub/grub.conf file?
mv
Which of the following commands will move a file from one location to another?
export val=5000
Which of the following commands would allow Tim to set a global variable val equal to 500 that would be available to a script?
The contents of the /usr/bin directory are written to a file named /tmp/list.txt. Previous file contents are kept, and the new information is added at the end of the file.
Which of the following describes the effects of the "ls -l /usr/bin >> /tmp/list.txt" command?
/etc/profile, ~./bash_profile
Which of the following files would need to be modified to make a global variable persistent?
~/.profile, ~/.bashrc
Which of the following files would you use to create aliases that are applied when a specific user starts a bash session?
All system information
Which of the following is displayed when the uname -a command is run?
Store messages so they can be downloaded or send email to a destination MTA
Which of the following is the primary role of a mail transfer agent?
DESCRIPTION
Which of the following man page sections shows a list of options available for a Linux command and explains what the options do?
^G (Ctrl+G)
Which of the following nano editor keyboard shortcuts will display help text which includes a lit of all keyboard shortcuts
Keyboard shortcuts are displayed at the bottom of the editor
Which of the following nano text editor features makes it easier for beginners to learn than the vi text editor
Bourne-again shell (bash)
Which of the following options is the standard shell for most Linux computers.
Container
Which of the following server roles would give you the BEST method for testing all team members' code without effecting your part of the project or your operating system and personal files?
Print server
Which of the following server roles would you implement to provide services offered by CUPS and IPP?
It contains the directory prefixes used to search for programs and files
Which of the following statements BEST describes the PATH environment variable?
ESC :wq
Which of the following vi key combinations should you press while in Insert mode to save the file you are working on and quit?
p
While in vi command mode, you copy a whole line of text to the general buffer. You then navigate to a different location in the file. Which of the following commands will paste the copied text?
rm -r backup
Within the /var directory is a subdirectory named backup. You need to delete the directory backup and any files that it contains. You change the directory focus to /var. Which command deletes the directory named backup and any file it contains?
man uname
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?
mkdir -p /var/oracle/database/9i
You need to create a directory /var/oracle/database/9i. Only the directory /var currently exists. From the root of the filesystem, which command will create a directory path?
export COMP=1745
You need to set the COMP variable to the value 1745. Which of the following commands sets the variable so it is inherited by subsequent child shells?
ls -a /home/jerrys
You need to view the contents of the /home/jerrys directory. What would you enter at the command prompt to show all the contents, including hidden files and directories?
export HOST
You recently used the HOST=FS4 command. What command should you use to make the environment variable to apply to all child sessions?
PATH=$PATH:/sbin/special
You want the directory /sbin/special to be included in the PATH environment variable. You also want to keep all the current directory entries currently in the PATH variable. Which of the following commands would you use?
Monitoring
Your company has been expanding the number of servers in the company's data center, and there is an increased need to gather metrics, watch process states, work with logs, watch services states and files system usage. Which of the following server roles should be installed to provide this functionality?
Clustering
Your company is running a critical business application. The executive team wants to ensure the server is available at all times, even in the event of a server failure. Which of the following server roles would be used to provide a failover server in the vent of a system failure?
Certificate Authority
Your company recently setup a VPN and wants to use a digital certificate for authentication instead of a pre-shared key. Which of the following server roles would allow the company to provide this functionality internally instead of using an external provider?
File Servers
Your company uses both Linux desktops and Windows desktops. Which of the following server roles should be used to provide a central location for users of both operating systems to share files?
Symbolic Link
lrwxrwxrwx
Edit mode
vi mode that vim uses to write and edit text in the file
j
vi move the cursor down a line
h
vi move the cursor one space to the left
l
vi move the cursor one space to the right
k
vi move the cursor up a line