Linux Essentials - Practice Practice Exam (copy)

0.0(0)
Studied by 48 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/153

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:51 AM on 8/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

154 Terms

1
New cards

If you wanted to disable a second network interface in Linux, what command would you enter at the shell?

ifdown eth1

2
New cards

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!

3
New cards

What directory would this ~ character represent?

The home directory of our currently logged in user.

4
New cards

What is the default shell for most Linux distributions?

bash

5
New cards

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

6
New cards

Which of the following sections give a brief review of the syntax used for a particular command or utility within a man page?

SYNOPSIS

7
New cards

In which directory could you add files so that a newly created user will automatically have them when they first log in?

/etc/skel

8
New cards

Which of the following provides binary files containing prewritten code elements or interfaces that programmers can call when writing Linux programs?

Libraries

9
New cards

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

10
New cards

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

11
New cards

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.

12
New cards

Which command would uncompress the contents of the file 'important.bz2'?

bunzip2

13
New cards

How would you add a new user account to a system?

useradd newguy

14
New cards

Which software development model is considered to be less structured than the others?

Bazaar

15
New cards

Which command in a script would display the text "hello world" to the screen, followed by a new line?

echo "hello world"

16
New cards

Which file(s) are used for DNS resolution? (Choose 2)

/etc/hosts

/etc/resolv.conf

17
New cards

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

18
New cards

What protocol is used by network programs/applications that need very low latency and, therefore, can tolerate a degree of unreliability?

User Datagram Protocol

19
New cards

How would you set permissions on a newly created script so that it could be executed.

chmod u+x script.sh

20
New cards

What is the proper syntax for creating a parent directory, followed by a child subdirectory?

mkdir -p dir1/dir2

21
New cards

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

22
New cards

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.

23
New cards

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)

24
New cards

Which directory contains filesystem management utilities such as cp or mv?

/bin and /usr/bin

25
New cards

What utility can we use to view manual pages?

man

26
New cards

What file might we look at to view our most recently entered shell commands?

~/.bash_history

27
New cards

What command will print a list of all running processes on our system?

top

28
New cards

Which of the following commands would you use to view a default gateway address on your system? (choose 2)

route

netstat -r

29
New cards

Which commands would you run to see who is currently logged into the system? (choose 2)

who

w

30
New cards

If we wanted to learn about all the available options for the cd command, how might we display its manual page?

man cd

31
New cards

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.

32
New cards

We need to find a file named la.txt in our current directory. Which command would we use?

find . -name la.txt

33
New cards

Which file contains the encrypted passwords for the users on a system?

/etc/shadow

34
New cards

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.

35
New cards

By default, which port does the sshd daeman listen on for incoming SSH connections?

22

36
New cards

Who founded the GNU project?

Richard Stallman

37
New cards

Which of the following services allow us to use shared network printing? (Choose all that apply)

Choose 2

SAMBA

CUPS

38
New cards

When using command completion within a Linux shell, what key should you press?

Tab

39
New cards

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

40
New cards

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

41
New cards

Besides man, what other text-mode utility can you use to get help in Linux?

info

42
New cards

What is the syntax to change the group ownership on a file?

chgrp group file.txt

43
New cards

While currently reading any man page, how might we quit and go back to the shell?

q

44
New cards

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

45
New cards

Which command would send the output of the 'who' command to a text file?

who > who.txt

46
New cards

Which section of a man page contains administrative utilities used by the root user?

8

47
New cards

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

48
New cards

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

49
New cards

Which command would copy all files ending in .pdf to the Documents directory?

cp *.pdf Documents/

50
New cards

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

51
New cards

From your current location on the file system, how would you change to three directories above the current directory?

cd ../../..

52
New cards

What environmental variable might we use to specify the directory where man page files will be located?

MANPATH

53
New cards

What Linux server application can you configure in order to provide network database services? (Choose all that apply)

MySQL

Microsoft SQL Server

54
New cards

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

55
New cards

In which directory will you find system-related configuration files?

/etc

56
New cards

Which software movement is against proprietary software?

FSF

57
New cards

Which of the files below will configure the path to the man page's files?

~/.MANPATH

/etc/man.conf

58
New cards

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

59
New cards

What commands will tell us what our IP address is on our Linux system? (Choose all that apply)

Choose 2:

ip addr show

ifconfig

60
New cards

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

61
New cards

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

62
New cards

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

63
New cards

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

64
New cards

What utility allows us to switch users, including switching to the root user?

su

65
New cards

What should the first line of a bash shell script contain?

#!/bin/bash

66
New cards

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

67
New cards

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.

68
New cards

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.

69
New cards

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

70
New cards

Which of the following types of bus can connect hard disk drives with the motherboard?

The SATA bus

71
New cards

What information can be displayed by top?

Running processes, ordered by CPU or RAM consumption.

72
New cards

Which of the following commands can be used to resolve a DNS name to an IP address?

host

73
New cards

What is the UID of the user root?

0

74
New cards

What is true about the owner of a file?

Each file is owned by exactly one user and one group

75
New cards

Whichi of the following permissions are set on the /tmp/directory?

rwxrwxrxt

76
New cards

Which command adds the new user tux and creates the user’s home directoy with default configuration files?

useradd -m tux

77
New cards

Which of the following keys can be pressed to exit less?

q

78
New cards

Which of the following commands sorts the output of the command export-logs?

export-logs | sort

79
New cards

Which of the following commands will search for the file foo.txt under the directory /home?

find/home -name foo.txt

80
New cards

What is a Linux distribution?

A bundling of the linux kernel, system utilities and other software.

81
New cards

Which package management tool is used in Red Hat-based Linux Systems?

rpm

82
New cards

Which of the following programs is a graphical editor for vector graphics?

Inkscape

83
New cards

Where is the operating system of a Raspberry Pi stored?

On a removable SD card which is put into the Raspberry Pi.

84
New cards

What is defined by a Free Software license?

Conditions for modifying and distributing the licensed software.

85
New cards

Why are web browser cookies considered dangerous?

Cookies support identification and tracking users.

86
New cards

Which of the following in a shell prompt indicates the shell is running with root privileges?

#

87
New cards

What is true about a recursive directory listing?

It includes the content of sub-directories.

88
New cards

Which of the following directories contains information, documentation and example configuration files for installed software packages?

/usr/share/doc/

89
New cards

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/

90
New cards

Which of the follwoing is a protocol used for automatic IP address configuration?

DHCP

91
New cards

Which of the following devices represents a hard disk partition?

/dev/sda2

92
New cards

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.

93
New cards

What can be found in the /proc/ directory?

One directory per running process.

94
New cards

Which of the following directories must be mounted with read and write access if it resides on its own dedicated file system?

/var

95
New cards

What is true about links in a Linux file system?

A symbolic link can point to a file on another file system.

96
New cards

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

97
New cards

What is true about the su command?

It runs a shell or command as another user.

98
New cards

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.

99
New cards

Which of the following commands shows the absolute path to the current working directory?

pwd

100
New cards

Which command displays file names only and no additional information?

Is -a