1/70
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
If you wanted to disable a second network interface in Linux, what command would you enter at the shell?
ifdown eth1
You have been editing a configuration file using vi. You realize that you've made many mistakes and need to quit without saving the changes so that you can start over. Which command will allow you to do this?
:q! ("colon Q Bang!")
What directory would the ~ character represent?
The home directory of our currently logged in user.
What is the default shell for most Linux distributions?
bash
You need to troubleshoot a hardware issue. Which command would let you view the kernel ring buffer to see what hardware was just added?
dmsg | less (driver messages) "dmsg pipe less"
Which of the following sections give a brief review of the syntax used for a particular command or utility within a man page?
SYNOPSIS
In which directory could you add files so that a newly created user will automatically have them when they first log in?
/etc/skel
Which of the following provides binary files containing prewritten code elements or interfaces that programmers can call when writing Linux programs?
Libraries
You are running the ping command to see if a particular host is up. How would you specify to the ping command that only five packets get sent to the remote host?
ping -c 5 host.example.com (-c = count, number of times can vary)
You need to verify that a remote host with a hostname of dns2.linuxacademy.com is up and running. Which of the following commands would you enter at the shell prompt to do this?
ping dns2.linuxacademy.com
While using vi to edit a file in command mode, you try to use the BACKSPACE key to delete a word, but nothing happens. What's wrong?
You have to switch to insert mode.
Which command would uncompress the contents of the file 'important.bz2'?
bunzip2
How would you add a new user account to a system?
useradd newguy
Which software development model is considered to be less structured than the others?
Bazaar
Which command in a script would display the text "hello world" to the screen, followed by a new line?
echo "hello world"
Which file(s) are used for DNS resolution? (Choose 2)
/etc/hosts
/etc/resolv.conf
An application has the following permissions set on it:
rw-r--r--
Yet it does not run. Why is that?
There is no execute permission set
What protocol is used by network programs/applications that need very low latency and, therefore, can tolerate a degree of unreliability?
User Datagram Protocol - UDP is a 'connection-less' protocol and does not require an acknowledgement (no check for reliability) from the receiving end of the communication.
How would you set permissions on a newly created script so that it could be executed.
chmod u+x script.sh
+x means add execute
-x means remove execute
What is the proper syntax for creating a parent directory, followed by a child subdirectory?
mkdir -p dir1/dir2 (make directory switch p [for parent] then parent name slash child name)
You need to create a symbolic link from a file located at /usr/share/doc/manual to a link in your home directory named 'manual'. Which command would we use to achieve this?
ln -s/usr/share/doc/manual ~/manual
(link -s [for symbolic] /usr/share/doc path, to home directory known as tilde /manual)
While working in the command line console, not running X Windows, you suddenly need access to another shell to do another task. You don't want to quit or halt the current application. What might you do to run both your other functions in a shell while still running your current application?
You can press ALT-F2 or CTRL-ALT-F2 to open an alternate console screen and access a new shell session.
You need to search for man pages that relate to the Postfix service. Which command will do this? (Choose 2 correct answers)
apropos postfix
man -k postfix (you must be root to use this)
Which directory contains filesystem management utilities such as cp or mv?
/bin and /usr/bin
What utility can we use to view manual pages?
man
What file might we look at to view our most recently entered shell commands?
~/.bash_history
What command will print a list of all running processes on our system?
top (top hat hat view of p - stands for processes)
Which of the following commands would you use to view a default gateway address on your system? (choose 2)
route (think of a map showing routes, gateway would be the doorway from your house or office to the rest of the world)
netstat -r (network status -r standing for 'route')
Which commands would you run to see who is currently logged into the system? (choose 2)
who
w
If we wanted to learn about all the available options for the cd command, how might we display its manual page?
man cd
You have a project where you have to build an email server for your organization of around 200 employees. You are thinking of using a Linux system to accomplish this. Would it be possible to achieve this?
Yes. Linux can be configured to provide email services.
We need to find a file named la.txt in our current directory. Which command would we use?
find ./-name la.txt (this structure ./ signifies "current directory") -- this is our answer, but double-check
find -name ls.txt (doubtful this works, since no path)
Which file contains the encrypted passwords for the users on a system?
/etc/shadow
You're using vi to edit a text file in insert mode. You have discovered that you need to replace a large part of a single line of code. The best way to do this is to change from insert mode into replace mode. Given that you are already in insert mode, which steps would you take to enter into replace mode?
First hit the ESC key, then the shift + R keys.
By default, which port does the sshd daeman listen on for incoming SSH connections?
22
Who founded the GNU project?
Richard Stallman
Which of the following services allow us to use shared network printing? (Choose all that apply)
Choose 2
SAMBA
CUPS
When using command completion within a Linux shell, what key should you press?
Tab
The users in your organization are having issues accessing the corporate e-mail server, hosted by a third-party vendor. You suspect that a router may be down somewhere within your organization's network. Given that the hostname of the e-mail server is pop.linuxacademy.com, which of the following commands would you enter at the shell prompt to test this? (Choose all that apply)
Choose 2:
traceroute pop.linuxacademy.com
tracepath pop.linuxacademy.com
Which statements are true about hardware MAC addresses? (Choose all that apply)
Choose 2:
They are unique identifiers
The MAC address is hard-coded to the NIC
Besides man, what other text-mode utility can you use to get help in Linux?
info
What is the syntax to change the group ownership on a file?
chgrp group file.txt
While currently reading any man page, how might we quit and go back to the shell?
q
You have just added a second network interface to your Linux system. If your first NIC is aliased as eth0, what is the most likely value of your newly-added NIC alias?
eth1
Which command would send the output of the 'who' command to a text file?
who > who.txt
You need to search for man pages that relate to the Samba daemon. Which command will do this? (Choose all that apply)
Choose 2 correct answers:
apropos smbd
man -k smbd
Which section of a man page contains administrative utilities used by the root user?
8
You need to move a directory (dir1), along with all of its contents, to a new location (dir2). Which command would accomplish this task?
mv ~/dir1 ~/dir2
the move command will take ALL contents along... only copy or cp will make a copy, but not move it.
You need to delete the /APP directory within your user's home directory. Given that it has child folders and files in it, which is the best command to do this?
rm -rf ~/APP (remove -recursive (all) -force to location ~/APP)
Which command would copy all files ending in .pdf to the Documents directory?
cp *.pdf Documents/
Which of the following are actual roles of the Linux filesystem? (Choose all that apply)
Choose 2:
To preserve data integrity
Being able to locate data easily
From your current location on the file system, how would you change to three directories above the current directory?
cd ../../..
What environmental variable might we use to specify the directory where man page files will be located?
/etc/man_db.conf
this is the configuration file and db can refer to it being the database of the man configuration file
What Linux server application can you configure in order to provide network database services? (Choose all that apply)
MySQL
Microsoft SQL Server
When it comes to bash configuration files, which of the following will be read/executed when logging into a shell that is considered to be a non-login shell?
/etc/profile (/etc contains all the primary system configuration files, bash is typically the default shell, so it's redundant to say ''bash configuration files."
In which directory will you find system-related configuration files?
/etc (ALL Config files are here)
all the system info and etcetera
Which software movement is against proprietary software?
FSF
(Free Software Foundation)
Which of the files below will configure the path to the man page's files?
~/.MANPATH
/etc/man.conf
You've downloaded an application package that has an extension of .rpm. What is required to install it on your Linux system?
Red Hat Package Management System
What commands will tell us what our IP address is on our Linux system? (Choose all that apply)
Choose 2:
ip addr show
ifconfig
Which of the following shell commands will load the ssh client and connect as the 'stephen' user to an ssh server with an IP address of 172.16.10.123? (Choose all that apply)
Choose 2:
ssh stephen@172.16.10.123
ssh -l stephen 172.16.10.123 (-l stands for 'login name')
You are in charge of installing a new Linux server. This Linux server will be used to host a high load production database application that will be used by a large number of users. Which might be the best Linux distribution to choose for this mission-critical application server, with consideration for out-of-box configuration? (Choose all that apply)
Choose 2:
SUSE Linux Enterprise Server
Red Hat Enterprise Linux
You have a single computer on your network that can not connect to a networked printer. Of the following, what should be a troubleshooting step that you would perform?
Run the ping command to the IP of the printer to see if it responds
How might we find out what directory paths are currently set up on our Linux file system? (Choose all that apply)
Choose 2:
env (tells you about your current environment)
echo $PATH (tell me back $ = any, path)
What utility allows us to switch users, including switching to the root user?
su
use the su command, which stands for "switch user"
What should the first line of a bash shell script contain?
#!/bin/bash
As you are editing a file in vi, you find a word that needs to be deleted. You place your cursor at the beginning of that word. What command will delete this word without deleting the space that follows after our word?
e = word under cursor, and will RETAIN THE SPACE AFTER
As a developer, your supervisor wants you to download the source code for the latest Linux kernel and then modify it to support a custom application that your organization is developing in-house. Given the current kernel open source licensing is this possible to do?
Yes, you can create a new Linux flavor and even redistribute it as long as the source code will remain freely available.
You have just copied an executable file called pinehead.sh from our company's server to your ~/Downloads directory. You have changed to the ~/Downloads directory at your shell prompt. When you entered pinehead.sh as a command in the prompt, the shell tells us that the command is invalid. What possible things could we do? (Choose all that apply)
Choose 2:
Type out the full path leading up to the filename.
Add a ./ before our filename.
What section within a man page provides a list of man pages or other resources that are related to the command or utility?
SEE ALSO (other)
When it comes to bash configuration files, which one of these files would be read first when a login bash shell is run?
~/.bashrc (the 'c' refers to configuration of bash)