1/153
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
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!
What directory would this ~ 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
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
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
How would you set permissions on a newly created script so that it could be executed.
chmod u+x script.sh
What is the proper syntax for creating a parent directory, followed by a child subdirectory?
mkdir -p dir1/dir2
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
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
Which of the following commands would you use to view a default gateway address on your system? (choose 2)
route
netstat -r
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
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
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
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
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?
MANPATH
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?
~/.bashrc
In which directory will you find system-related configuration files?
/etc
Which software movement is against proprietary software?
FSF
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
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
echo $PATH
What utility allows us to switch users, including switching to the root user?
su
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?
de
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
Which of the following types of bus can connect hard disk drives with the motherboard?
The SATA bus
What information can be displayed by top?
Running processes, ordered by CPU or RAM consumption.
Which of the following commands can be used to resolve a DNS name to an IP address?
host
What is the UID of the user root?
0
What is true about the owner of a file?
Each file is owned by exactly one user and one group
Whichi of the following permissions are set on the /tmp/directory?
rwxrwxrxt
Which command adds the new user tux and creates the user’s home directoy with default configuration files?
useradd -m tux
Which of the following keys can be pressed to exit less?
q
Which of the following commands sorts the output of the command export-logs?
export-logs | sort
Which of the following commands will search for the file foo.txt under the directory /home?
find/home -name foo.txt
What is a Linux distribution?
A bundling of the linux kernel, system utilities and other software.
Which package management tool is used in Red Hat-based Linux Systems?
rpm
Which of the following programs is a graphical editor for vector graphics?
Inkscape
Where is the operating system of a Raspberry Pi stored?
On a removable SD card which is put into the Raspberry Pi.
What is defined by a Free Software license?
Conditions for modifying and distributing the licensed software.
Why are web browser cookies considered dangerous?
Cookies support identification and tracking users.
Which of the following in a shell prompt indicates the shell is running with root privileges?
#
What is true about a recursive directory listing?
It includes the content of sub-directories.
Which of the following directories contains information, documentation and example configuration files for installed software packages?
/usr/share/doc/
A directoy contains the following 3 files:
texts 1.txt
texts 2.txt
texts 3.csv
Which command copies the 2 files ending in .txt to the /tmp/ directory?
cp*.txt/tmp/
Which of the follwoing is a protocol used for automatic IP address configuration?
DHCP
Which of the following devices represents a hard disk partition?
/dev/sda2
Which of the following statements regarding Linux hardware drivers is correct?
Drivers are either compiled into the Linux kernel or are loaded as kernel modules.
What can be found in the /proc/ directory?
One directory per running process.
Which of the following directories must be mounted with read and write access if it resides on its own dedicated file system?
/var
What is true about links in a Linux file system?
A symbolic link can point to a file on another file system.
Which files are the source of the information in the following output? Choose 2
uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (wireshark), 989 (docker), 1001 (libvirt)
/etc/passwd
/etc/group
What is true about the su command?
It runs a shell or command as another user.
Most commands on Linux can display information on their usage.
How can this information typically be displayed?
By running the command with the option -h or —help or-m or --manpage.
Which of the following commands shows the absolute path to the current working directory?
pwd
Which command displays file names only and no additional information?
Is -a