;inux Flashcards

1
Q

What is true about links in a Linux file system?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which files are the source of the information in the following output? (Choose two.)
uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (wireshark), 989 (docker),
1001 (libvirt)

A

/etc/passwd
/etc/group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following tasks can the command passwd accomplish? (Choose two.)

A

Create a new user account.
Lock a user account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is true about the su command?

A

It runs a shell or command as another user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What parameter of ls prints a recursive listing of a directory’s content? (Specify ONLY the option
name without any values or parameters.)

A

ls -R

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Most commands on Linux can display information on their usage. How can this information
typically be displayed?

A

By running the command with the option -m or –manpage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following commands output the content of the file Texts 2.txt? (Choose two.)

A

cat ‘Texts 2.txt’
cat ‘Texts 2.txt’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which command displays file names only and no additional information?

A

ls -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the PATH environment variable?

A

It allows the execution of commands without the need to know the location of the executable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following commands sets the variable USERNAME to the value bob?

A

USERNAME=bob

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What command displays manual pages? (Specify ONLY the command without any path or
parameters.)

A

man

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which command copies the contents of the directory /etc/, including all sub-directories, to /root/?

A

cp -r /etc/* /root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which of the following commands puts the lines of the file data.csv into alphabetical order?

A

sort data.csv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following examples shows the general structure of a for loop in a shell script?

A

for file in *.txt
do
echo $i
done

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which operator in a regular expression matches the preceding character either zero or one time?

A

?

17
Q

!/bin/bash

The file script.sh in the current directory contains the following content:

echo $MYVAR

The following commands are used to execute this script:

MYVAR=value
./script.sh

The result is an empty line instead of the content of the variable MYVAR. How should MYVAR be
set in order to make script.sh display the content of MYVAR?

A

export MYVAR=value

18
Q

What is the return value of a shell script after successful execution?

A

0

19
Q

Which of the following commands creates the ZIP archive poems.zip containing all files in the
current directory whose names end in .txt?

A

zip poems.zip *.txt

20
Q

Which of the following statements are true regarding a typical shell script? (Choose two.)

A

It has the executable permission bit set.

It is compiled into a binary file compatible with the current machine architecture.

21
Q

Which of the following commands extracts the contents of the compressed archive file1.tar.gz?

A

tar -xzf file1.tar.gz

22
Q

Which of the following commands finds all lines in the file operating-systems.txt which contain the
term linux, regardless of the case?

A

cut linux operating-systems.txt

23
Q

Which one of the following statements concerning Linux passwords is true?

A

Passwords are only stored in hashed form.

24
Q

Which of the following programs are web servers? (Choose two.)

A

Apache HTTPD
NGINX

25
Q

Which of the following Linux Distributions is derived from Red Hat Enterprise Linux?

A

CentOS

26
Q

Which of the following statements is true about Free Software?

A

It may be modified by anyone using it.

27
Q

How is a new Linux computing instance provisioned in an laaS cloud?

A

A provider-specific configuration file describing the desired installation is uploaded to the cloud
provider.

28
Q

What are the differences between a private web browser window and a regular web browser
window? (Choose three.)

A

Private web browser windows do not store cookies persistently.

Private web browser windows do not keep records in the browser history.

Private web browser windows do not send regular stored cookies.

29
Q

What is the preferred source for the installation of new applications in a Linux based operating
system?

A

The distribution’s package repository

30
Q
A