;inux Flashcards
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 two.)
uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (wireshark), 989 (docker),
1001 (libvirt)
/etc/passwd
/etc/group
Which of the following tasks can the command passwd accomplish? (Choose two.)
Create a new user account.
Lock a user account.
What is true about the su command?
It runs a shell or command as another user.
What parameter of ls prints a recursive listing of a directory’s content? (Specify ONLY the option
name without any values or parameters.)
ls -R
Most commands on Linux can display information on their usage. How can this information
typically be displayed?
By running the command with the option -m or –manpage.
Which of the following commands shows the absolute path to the current working directory?
pwd
Which of the following commands output the content of the file Texts 2.txt? (Choose two.)
cat ‘Texts 2.txt’
cat ‘Texts 2.txt’
Which command displays file names only and no additional information?
ls -a
What is the purpose of the PATH environment variable?
It allows the execution of commands without the need to know the location of the executable.
Which of the following commands sets the variable USERNAME to the value bob?
USERNAME=bob
What command displays manual pages? (Specify ONLY the command without any path or
parameters.)
man
Which command copies the contents of the directory /etc/, including all sub-directories, to /root/?
cp -r /etc/* /root
Which of the following commands puts the lines of the file data.csv into alphabetical order?
sort data.csv
Which of the following examples shows the general structure of a for loop in a shell script?
for file in *.txt
do
echo $i
done