WorksheetsLPI Linux Essentials (40 Questions)
Total questions: 40
Worksheet time: 40mins
Which of the following is an example of embedded Linux?
Android
Red Hat Linux
Fedora
Linux Mint
Which Linux distribution is used as a basis for the creation of Ubuntu Linux?
Arch
SUSE
Gentoo
Debian
Which of the following programs on a Linux system could you use as a replacement for Microsoft Word?
Pages
Pico
Writer
Nano
Which of the following programs on a Linux system could you use instead of Windows Media Player?
VLC
QuickTime
iTunes
Winamp
Which of the following is TRUE about open source software?
Open source software is always free
Open source software is a prominent example of open collaboration
Open source software is more secure than closed source software
Open source software does not have any support
What does GUI stand for?
General User Interface
Great User Interface
Generic Unique Interlink
Graphical User Interface
Which of the following is NOT a Linux desktop environment?
KDE
XFCE
Dwarf
Gnome
The output of the program date should be saved in the variable datenow. What is the correct statement to enter into the shell to set this variable?
set datenow='date'
date | datenow
datenow='date'
date > $datenow
Which of the following is NOT a valid rule for naming a variable?
Variable names must start with a letter
Variable names must start with numbers
Underscores are used instead of embedded spaces
Punctuation marks are not allowed
To see all the variables that are in the user's environment, use the ____ command.
printer
ping
printenv
processvar
What could provide a set of electronic pages that explains a specific command available on the system?
Man pages
Help pages
Master pages
Informational pages
Which of the following are not man page sections?
Name
Mistakes
Configuration
Return Value
How can the current directory and its subdirectories be searched for the file named MyFile.xml?
find . -name MyFile.xml
grep MyFile.xml | find
grep -r MyFile.xml
find -P MyFile.xml | grep
The "cd" command is short for ____.
Check Directory
Change Directory
Change Disk
Check Disk
Which command is used to copy files from one directory to another?
mv
copy
cp
rm
What does the "rm -rf" command do in Linux?
Remove all files from the directory and subdirectories
Remove all the files in the current directory
Rename all the files in the directory and subdirectories
Rename all the files in the current directory
Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?
tar -cf backup.tar /home
tar -cf /home backup.tar
tar -xf /home backup.tar
tar -xf backup.tar /home
Which of the following commands creates an archive file work.tar from the contents of the directory ./work/?
tar --new work.tar ./work/
tar -cf work.tar ./work/
tar --create work.tgz --content ./work/
tar work.tar < ./work/
How can the normal output of a command be written to a file while discarding the error output?
command < output > /dev/null
command > discard-error > file
command > /dev/null 2&> 1 output
command > file 2> /dev/null
Which command will display the last line of the file document.txt?
head -n 1 document.txt
tail -n 1 document.txt
tail document.txt
last -n 1 document.txt
Why is the file data.txt empty after executing sort data.txt > data.txt?
Because sort cannot sort text files, only binary files
Because sort detects that both files are the same
Because the file gets truncated before sort is executed
Because the file gets executed before sort is truncated
What is the output of the following command?
anbncn
abc
$token$token$token
{a}{b}{c}
Which of the following statements may be used to access the second command line argument to a script?
$arg2
$2
$1
$var2
What keyword should be used to fill in the blank in the following segment of the given shell script?
do
then
when
fi
How is it possible to determine if an executable file is a shell script which is read by Bash?
The file must end with .sh
The first line starts with #!/bin/bash
/bin/bash has to be run in debug mode
Only if you are logged in as root
Which of the following is NOT TRUE about the Linux Distribution Life Cycle?
Linux distros are always short term releases
Most of the release schedules are publicly announced months or years in advance
Some developers come up with catchy names for versions
The final-release version is considered to be the stable version
What does HCL mean?
Hindustan Computer Limited
Hardware Compatibility List
Hardware Computer License
House Computer Linux
Which of the following properly identifies the third partition, on the second hard disk, on the first IDE controller on a PC system?
/dev/hdb3
/dev/hd1b3
/dev/hdc1d2p3
/dev/hdc1a3
After installing a new package, in which directory are you most likely to find its configuration file?
/lib
/etc
/conf
/usr
Which of the following directories is often used to store log files?
/var
/temp
/dev/hdc1d2p3
/usr
What is the command that will show system boot time messages?
echo
lspci
dmesg
display system boot
Which network interface always exists in a Linux system?
lo
eth0
wlan0
vlan0
Which of the following displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics?
net
ping
netstat
traceroute
Which of the following commands can determine the time of the last login of a given user?
showlog
recent
last
history
Which command shows who is logged in and what they are doing in the system?
who
w
whoami
id
Which of the following files holds the definition of the local user accounts?
c/users
/etc/passwd
c/id
c/home
Which command adds the new user tux and creates the user's home directory with default configuration files?
usercreate tux
useradd -o default tux
useradd -m tux
passwd -a tux
Which of the following commands will display a list of all files in the current directory, including those that may be hidden?
ls -a
ls -h
ls -all
ls -hidden
What does the letter t at the end of drwxrwxrwt indicate within the following directory permissions? drwxrwxrwt 14 root root 36864 2012-03-02 11:17 /tmp
The t is used to show that the directory is globally writable, but only the owner can delete their own files within the directory
The directory is accessible by everyone
The directory contains only temporary files that can be deleted by the system when more space is needed
The files contained in this directory can only be accessed by the root user
What command would you use to create a symbolic link in Linux?
ln -d
ln -s
link -d
link -s
