Practice Flashcards Preview

Linux + > Practice > Flashcards

Flashcards in Practice Deck (70):
1

Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?

/etc/inittab

2

During a system boot cycle, what program is executed after the BIOS completes its tasks?

The bootloader

3

Which of the following are init systems used within Linux systems?

systemd, Upstart, SysV init

4

What information can the lspci command display about the system hardware?

Device IRQ settings, PCI Bus Speed. Device vendor identification

5

Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks?

init 1, telinit 1

6

What is the first program that is usually started at boot time by the linux kernel when using SysV init?

/sbin/init

7

Which of the follwing commands will write a message to the terminals of all logged in users

wall

8

which of the following kernel parameters instructs the kernel to suppress most boot messages

quiet

9

which of the following options for the kernel's command line changes the systemd boot target to rescue.target instead of the default target

systemd.unit=rescue.target

10

After modifiying GNU GRUB's configuration file, which command must be run for the changes to take effect?

no action is required

11

Which of the following commands is used to update the list of available packages when using dpkg based package management

apt-get update

12

which of the following commands lists the dependencies of a given dpkg package?

apt-cache depends package

13

Which of the following options is used in a GRUB legacy configuration file to define the amount of time that the GRUB menu will be shown to the user?

timeout

14

what can the Logical Volume Manager(LVM) be used for?

to dynamically change the size of logical volumes, to create snapshots, and to dynamically create or delete logical volumes

15

Which of the following commands updates the linker cache of shared libraries

ldconfig

16

Which of the following commands lists all currently installed packages when using RPM package management?

rpm --query --all

17

Which of the following commands can be used to download the RPM package kernel without installing it?

yumdownloader kernel

18

When using rpm --verify to check files created during the installation of RPM packages, which of the following information is taken into consideration

Timestamps, MD5 Checksums, File sizes

19

Which of the following is correct when talking about mount points

Every existing directory can be used as a mount point

20

Which function key is used to start safe mode in Windows NT

Windows NT does not support Safe Mode

21

Which of the following environment variables overrides or extends the list of directories holding shared libraries

LD_LIBRARY_PATH

22

Which RPM command will output the name of the package which supplied the file /etc/exports

rpm -qf /etc/exports

23

When removing a package which of the following dpkg options will completely remove the files including configuration files

--purge

24

Which file should be edited to select the network locations from which Debian installation package files are loaded

/etc/apt/sources.list

25

Which of the following commands overwrites the bootloader on /dev/sda without overwriting the partition table or any data following it

dd if=/dev/zero/ of=/dev/sda bs=440 count=1

26

Which of the following commands can be used to create a USB storage media from a disk image

dd

27

in Bash, inserting 1>&2 after a command redirects

standard output to standard error

28

What command will generate a list of user names from /etc/passwd along with their login shell?

cut -d: -f1,7 /etc/passwd

29

In a nested directory structure which find command line option would be used to restrict the command to searching down a particular number of subdirectories

-maxdepth

30

Which of the following statements is a correct regarding the command foo 1>bar

the stdout from the command foo overwrites the file bar

31

Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting

kill -TERM 123

32

what is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process

19

33

Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line

p

34

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?

rmdir ~/\\dir

35

In compliance with the FHS in which of the directories are man pages found

/usr/share/man

36

Which of the following commands will send output from the program myapp to both standard output(stdout) and the file file1.log

myapp | tee file1.log

37

What is the purpose of the Bash built-in export command

It sets up environment variables for applications

38

What is the output of the following command

echo "Hello World" | tr -d aieou

hll wrld

39

Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string which is on a separate line and without any trailing spaces is reached?

<

40

Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt

file /tmp/myfile.txt

41

What is the default nice level when a process is started using the nice command

10

42

What is the default action of the split command on an input file

It will break the file into new files of 1,000 line pieces each.

43

What is the difference between the i and a commands of the vi editor

i inserts text before the current cursor position whereas a inserts text after the cursor.

44

Which of the following commands moves and resumes in the background the last stopped shell job

bg

45

What is the effect of the egrep command when the -v option is used

it only outputs non-matching lines

46

what does the ? symbol within regular expressions represent?

match the preceding qualifier zero or one times

47

In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?

By specifiying the number right in front of a command such as 4l or 2yj

48

Which of the following files located in the user home directory is used to store the bash history?

bash_history

49

Which of the following commands displays the contents of a gzip compressed tar archive

tar ztf archive.tgz

50

which grep command

grep -v'/$' foo

51

Which of the following commands is used to change options and positional parameters for a running Bash

set

52

Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newsletter

sed 's/bob/Bob/g' letter > newletter

53

From a Bash Shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell

source /usr/local/bin/runme.sh , ./usr/local/bin/runme.sh

54

Regarding the command:

nice -5 /usr/bin/prog

Which of the following statements is correct

/usr/bin/prog is executed with a nice level of 5

55

Which shell command is used to continue background execution of a suspended command

bg

56

Which of the following shell redirections will write standard output and standard output and standard error output to a file named filename

>filename 2>&1

57

In the vi editor, which of the following commands will copy the curent line into the vi buffer

yy

58

Which of the following sequences in the vi editor saves the opened document and exits the editor?

esc: wq! , esc ZZ

59

When starting a program with the nice command without any additional parameters which nice level is set for the resulting process

10

60

Which of the following commands will reduce all consecutive spaces down to a single space

tr -s ' ' < a.txt > b.txt

61

Which character added to the end of a command, runs that command in the background as a child process of the current shell

&

62

Which of the following commands will print the last 10 lines of a text file to the standard output

tail -n 10 filename

63

Which of the following commands prints a list of usernames(first column) and their primary group(fourth column) from the /etc/passwd file

cut -d: -f1,7 /etc/passwd

64

Which of the following signals is sent to a process when the key combination CTRL+C is pressed on a keyboard

SIGINT

65

What happens after issuing the command vi without any additional parameters

vi starts in command mode opens a new empty file

66

Which of the following command sets the Bash variable named TEST with the content FOO

TEST="FOO"

67

Which variable defines the directories in which a bash shell searches for executable commands

PATH

68

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types

file

69

Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root

find /tmp -user root -print, find /tmp -user root

70

When running the command

sed -e "s/a/b/" /tmp/file > /tmp/file

While /tmp/file contains data why is /tmp/file empty afterwards

When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading