LPI 010-160 Linux, 010-160: LPI Linux Essentials, LPI Linux Essentials (01)

5.0(1)
studied byStudied by 13 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/99

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

100 Terms

1
New cards

Single character that will allow you to exit the less program in the terminal

q

2
New cards

what happens to a users files when a user account is deleted using sudo userdel?

The files remain attached to the UID of the user account that was deleted

3
New cards

what is the purpose of the su command in Linux

to switch to a different user profile

4
New cards

which of the following best describes what the dmesg command gives you

shows you the message buffer of the kernel

5
New cards

provide the argument to ls that will recursively list a directory's contents

-R or -recursive

6
New cards

Which most frequently is used to connect a harddrive to a motherboard

SATA

7
New cards

Used to change permissions in linux

Chmod

8
New cards

Which of the following switched would allow you to extract a tar.gz file

-xvzf

9
New cards

which of the following is the proper command to archive /Documents/Sales/Docs into a tar ball with name of archivedocs?

Tar -czvf archiveddocs.tar.gz /documents/Sales/Docs

10
New cards

Which of the following best describes the purpose of the /etc/skel directory?

Allows for a default home directory when users profile is first created

Allows new user profiles to be easily set up with the same defaults

11
New cards

what are the default permissions for the /etc/skel

drwxr-xr-x

12
New cards

Which of the following distros would still be receiving security updates

Ubuntu LTS(Long Term Service)

13
New cards

which two special characters would you use to start a BASH script

#!

14
New cards

Which of the following commands would allow you to run the script with its output going into a file with the name of testoutput.txt

./testscript.sh > testoutput.txt

15
New cards

which of the following would be the output of the "free" command

total used free shared buff/cache available(says free)

16
New cards

Type the command to bring up the manual for a command

Man

17
New cards

What would be a possible output of the following command echo*.??

Customers.gz

echo(display line of text)

*(any # of characters)

.(Single Character)

?(Single Alphanumeric)

18
New cards

What is the purpose of the PATH variable

It is used to create a generic script that can be run across multiple machines regardless of the different file paths

19
New cards

Which distros are webservers on linux

NgineX

Apache

20
New cards

which of the following would be the output of the last command

wtmp begins Mon Jul 15 10:04

21
New cards

Which of the following does Red Hat use for its package management

RPM

22
New cards

Which of the following is used for vector graphics

inkscape

23
New cards

Which of the following would allow you to remove the directory assuming it was empty

rmdir Docs19

24
New cards

which of the following would be a proper partition name on a drive

/dev/sdc4

(has to be a single letter drive listed after sd)

25
New cards

which are characteristics of free software

source code must remain freely available to users

software allows users to access and change the source code to fit their needs

26
New cards

What is a linux distro

Different versions of the linux kernel modified to fit more specific functions

27
New cards

What is the single word that indicates the beginning of a loop statement in a bash script

while

28
New cards

What is the default UID value of the root user

0

29
New cards

type the single character that would allow you to split lines in a bash shell script

\

30
New cards

how would you add to the PATH variable

edit the/etc/environment file with a text editor

31
New cards

Which of the following are decedents of RedHat

CentOS

OpenSUSE

32
New cards

which of the following best describes the difference between SSD and HDD

SSD is more likely to survive a fall than HDD

SSD usually has a longer lifespan

33
New cards

Which of the following allow you to turn on the help feature

-h

--help

34
New cards

Shows you the path of your current directory

pwd

35
New cards

which of the following could explain why browser cookies could be considered bad

they contain info to identify the user to the website

36
New cards

which would allow you to bring up help page for the ls command

ls --help

37
New cards

Which of the following are the usual services a cloud service provider might offer

SaaS

IaaS

PaaS

38
New cards

what should you do in order to run the script with the proper permissions

use the "chmod a+x" command and then attempt to rerun the script

39
New cards

in an IaaS situation, where would you get the OS for your system

you must provide the OS yourself

40
New cards

which would allow you to copy all files and sub directories into the the /Documents/Finance directory

cp -R /Documents/Sales /Documents/Finance

(what? How? From? To?)

41
New cards

What information can be displayed by top?

Running processes, ordered by CPU or RAM consumption.

42
New cards

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

host

43
New cards

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

rwxrwxrwt

44
New cards

Which of the following outputs could stem from the command last?

root tty2 Wed May 17 21:11 - 21:11 (00:00)

45
New cards

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

useradd -m tux

46
New cards

Which of the following commands creates an archive file work.tar from the contents of the directory ./work/?

tar -cf work.tar ./work/

47
New cards

The current directory contains the following file:

-rwxr-xr-x 1 root root 859688 Feb 7 08:15 test.sh

Given that the file is a valid shell script, how can this script be executed?

./test.sh

bash test.sh

48
New cards

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

export-logs | sort

49
New cards

Where is the operating system of a Raspberry Pi stored?

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

50
New cards

What is true about a recursive directory listing?

It includes the content of sub-directories.

51
New cards

whereis

used to search for programs in restricted locations, such as binary file directories, libraries, and man directories.

52
New cards

locate

Searches the system managed database of filenames for files containing the specified string in the filenames. (Search is much faster than the search performed using the 'find' command)

53
New cards

updatedb

Updates the system managed database of filenames

54
New cards

Displays current working directory

pwd

55
New cards

Change into the current user's home directory

cd ~

cd $HOME

Both of these do what

56
New cards

Change to the parent directory of the current directory

cd ..

57
New cards

Change to the etc directory in the root (/) directory

cd /etc

58
New cards

Creates a hard link named 'format.txt' for the file 'fmt.txt'

ln fmt.txt format.txt

59
New cards

Creates a symbolic link named sym.txt of fmt.txt

ln -s fmt.txt sym.txt

60
New cards

touch

Can be used to update the timestamp of a file or if that file doesn't exist it will create a blank file with the specified name.

61
New cards

Will update the timestamp of the specified file if it exists. If it does not exist it will not create a blank file.

touch -c file1.txt

62
New cards

Adds the content "Hey there!" to the specified file.

echo "Hey there!" > sample.txt

63
New cards

cat filename.txt

Displays the contents of a file

64
New cards

Opens the vi editor for the file "sample". This will allow you to write text into a file.

vi sample

65
New cards

Will display the "sample" file's byte count

wc -c sample

66
New cards

Displays the number of characters in the "sample" file

wc -m sample

67
New cards

Display the number of lines in the "sample" file

wc -l sample

68
New cards

Display the word count of the "sample" file

wc -w sample

69
New cards

Extracts the first field of the "/etc/passwd" file

cut -f 1 /etc/passwd

70
New cards

Extract the first three characters from the "/etc/passwd" file

cut -c 1, 2, 3 /etc/passwd

71
New cards

Extracts the third field from the "/etc/shadow" file and uses the : seperator. Since "/etc/shadow" is a : (colon) seperated file, this command will display only the content of the third field in the file.

cut -d ":" -f 3 /etc/shadow

72
New cards

Search for all the rows containing the string "/home" in the "/etc/passwd" file

grep /home /etc/passwd

73
New cards

Display the number of lines containing the string "/bin" in the "/etc/passwd" file

grep -c /bin /etc/passwd

74
New cards

Display the details of the root user from the /etc/shadow file

grep root /etc/shadow

75
New cards

Search the /etc directory recursively for the string "wlan"

grep -r wlan /etc

76
New cards

Find all the files in the /etc directory having names that start with pass

find /etc -name pass*

77
New cards

List the files in the /etc directory with extensions conf (limit the search to one level)

find /etc -maxdepth 1 -name *.conf

78
New cards

List all the files on system with the permission set 640 (limit the search to two levels)

find / -maxdepth 2 -perm 640

79
New cards

List the files in the var/cache directory owned by the root user (limit the search to two levels)

find /var/cache -maxdepth 2 -user root

find /var/cache -maxdepth 2 -uid 0

80
New cards

List all the files in the /root directory that belong to the root group (do not use shorthand for specifying the directory)

find /root -group root

find /root -gid 0

81
New cards

Sort the contents of the /etc/passwd file, and display it on the stdout

sort /etc/passwd

82
New cards

Numeric sort the third field of the /etc/passwd file and display it on the stdout

cut -f 3 -d ":" /etc/passwd | sort -n

83
New cards

Redirects the output of the echo $HOME command to a file named sample, overwriting its contents

echo $HOME > sample

84
New cards

Appends the output of the pwd command to the sample file

pwd >> sample

85
New cards

Redirects the sample file as an input to the cat command. This will display the contents of the sample file.

cat < sample

86
New cards

Appends only the standard error of the pwd;ech command to the sample file.

pwd;ech 2>> sample

87
New cards

Overwrites the contents of the sample file with the standard output and error of the ls ~ /test command.

ls ~ /test &> sample

88
New cards

Installs the traceroute program on Debian-based systems.

apt-get install traceroute

Whats it do and What distro typically uses it.

89
New cards

Upgrades the system's software

apt-get update

apt-get upgrade

90
New cards

Removes the traceroute package

apt-get remove traceroute

91
New cards

View all processes currently running

ps

92
New cards

Lists all the process that are currently running and are owned by the root user

ps -u root

93
New cards

Displays a dynamically updated list of processes running on the system

top

94
New cards

Displays the system's overall memory usage

free

95
New cards

Display a summary of services that are started via SysV scripts. /var/log/boot.log contains messages that are logged during system boot.

cat /var/log/boot.log

96
New cards

Installs the cups-daemon on the system.

apt-get install cups-daemon

97
New cards

List the files that log information related to the Linux printing system.

ls /var/log/cups

98
New cards

Displays the contents of the file that contains messages from daemons that do not have their own dedicated log file. File contains global log messages

cat /var/log/syslog

99
New cards

Displays the contents of the kernel ring buffer

dmesg

100
New cards

Opens the sample file using the vi editor.

vi sample.txt