Linux Pro Chapter 1-2
A friend sent you a shell script file that is 117 lines long. He says that he wants to examine code on lines 82 and 87. What command would enter while vi Command Mode to go directly to line 82?
#82
After opening a file in vi, you want to switch from Command Mode to Command Line Mode. What key invokes Command Line Mode?
:
Which of the following to define a persistent alias?
Add the command defining the alias to the appropriate shell configuration file
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?
Authentication Server
which of the following man page sections shows a list of options available for a linux command and explains what the options do?
DESCRIPTION
If you are viewing the contents of a man page, which key can you press top get back to the beginning of the page?
Home
Which command will display a list of the currently defined aliases on the system?
alias
The user mbrown has a directory named logs in her home directory that is regularly updated with new log files when certain system events occur. She runs the following commands several times a week to check this directory :cd /home/mbrown/logs ls -al She wants a persistent alias named logcheck to be created to run these two commands. Which command would you enter into her shell configuration file to create this persistent alias?
alias logcheck="cd /home/mbrown/logs;ls -al"
Which of the following commands will create a shortcut to the tail -f /var/log/messages command?
alias sysmesg="tail -f /var/log/messages"
What commonly predefined alias is configured to run the ls -l command
ll
What would you enter at the command prompt to display the current working directory?
pwd
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.
uname -h
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?
yum install httpd
What command would you enter while in vi command mode to copy the entire line of text to the general buffer?
yy
What command would you enter while in vi command mode to find the term Sam?
/Sam ?Sam
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? (Select TWO).
/root/ni ./ni
As an administrator, you are tasked with configuring an Apache web server by modifying the /etc/apache2/apache2.conf file. You open the file in vi. As you're looking at the file, you knock your spill-proof drink container onto the keyboard. It rolls over several keys as you try to pick it up. Now there are extra characters everywhere in the text buffer. Which of the following commands can you use to exit vi without saving any changes that were made to the text buffer?
:q!
Which of the following vi key combinations should you press while in Insert mode to save the file you are working on and quit?
<Esc>:wq
Drag the server role to its proper description.
A protocol used to communicate with and monitor network devices and servers SNMP A protocol used to securely log on to remote systems using encryption. SSH Resolves (or maps) the fully qualified domain names (FQDNs) to IP Addresses. Name Server A program responsible for accepting HTTP (Hypertext Transfer Protocol) requests from clients. Web Server
Which of the following is displayed when the uname -a command is run?1. The current working directory2. The names of files and directories in the current directory3. All system information4. The current username
All system information
Which of the following commands searches man pages for a specific key word
Apropos man -k whatis
Which of the following is the standard shell for MOST Linux computers?1. tcsh2. C-shell3. Bourne-again shell (bash)4. Bourne shell5. Korn
Bourne-again shell(bash)
Drag the server role to its proper description
Capturing a timeline of events that have taken place on the computer in the form of a file. Logging A network that uses encryption to allow IP traffic to travel securely over the TCP/IP VPN Increases response time to back-end servers by distributing the workload across the available servers Load Balancer A computer that provides indirect internet access to the computers in your network. proxy
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?
Certificate Authority
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 event of a system failure?
Clustering
Your company develops applications to run on Linux systems. You currently have four teams working on a different aspect of the same application.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?
Containers
Users are complaining that they are unable to connect to any servers or the internet. Based on the symptoms they describe, you suspect that the users are not being assigned the correct IP addresses.
DHCP (Dynamic Host Configuration Protocol)
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?
Database
Your company uses both Linux desktops and Windows desktop.Which of the following server roles should be used to provide a central location for users of both operating systems to share files?
File Servers
Which of the following nano editor keyboard shortcuts will display help text which includes a list of all keyboard shortcuts
G (Ctrl +G)
Which of the following nano text editor features makes it easier for beginners to learn that the vi test editor
Keyboard shortcuts are displayed at the bottom of the editor
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 file system usage.Which of the following sever roles should be installed to provide this functionality?
Monitoring
Match the vi command on the left with the description of the cursor movement the on the right.
Move the cursor up a line. k move the cursor one space to the left h move the cursor one space to the right l move the cursor down a line j
Users are complaining that the clocks for their OS do not match the current time for the location in which they live. Which of the following server roles is best for correcting this issues?
Network time protocol NTP
Using the vi editor in Insert Mode, you made a few changes to the /boot/grub/grub.conf
Press the Esc Key Type :wq
Which of the following server roles would you implement to provide services offered by CUPS and IPP?
Print Server
Linux can be implemented in many different ways.
Running Linux and Windows on the same physical computer. Linux Virtualization Infrastructure as a Service (IaaS). Linux and Cloud Computing Used by Google on many of the physical products it sells. Linux on mobile devices Manages intelligent devices, such as automation and control equipment. Embedded Linux
Match the vi mode on the left to the correct definition of the right.
The initial vi mode used when vim is started. It has commands that cut and replace text and it is the mode vi uses to enter the other modes. Command Mode The vi mode that works with the file system. Use it to save files after editing them. Command line mode The vi mode that vim uses to write and edit text in the file. Edit mode
Which of the following is the primary role of a mail transfer agent (MTA)?
Which of the following is the primary role of a mail transfer agent (MTA)?
What would you enter at the command prompt to start a new Bourne-again shell (bash) session?
bash
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?
exec ./myapp
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?1. clear2. history3. chsh4. uname
history
While in the 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 pastes the copied text?
p