Font size
WorksheetsLinux Final Quiz
Total questions: 75
Worksheet time: 38mins
What command is used to create a new directory in Linux?
createdir
mkdir
mkfile
newdir
Explain the difference between absolute path and relative path in Linux file system.
Absolute path starts with a forward slash, while relative path starts with a backward slash.
Absolute path is used for directories, while relative path is used for files.
Absolute path can be used for remote file systems, while relative path is only for local file systems.
Absolute path includes the full path from the root directory, while relative path is based on the current working directory.
How can you list all the files and directories in a directory in Linux?
list
dir
show
ls
What command is used to change the permissions of a file in Linux?
ls
chown
grep
chmod
Explain the purpose of the 'ls' command in Linux.
The purpose of the 'ls' command in Linux is to create a new file.
The purpose of the 'ls' command in Linux is to delete all files in the current directory.
The purpose of the 'ls' command in Linux is to rename a file.
The purpose of the 'ls' command in Linux is to list the files and directories in the current directory.
How can you add a new user in Linux?
Use the 'createuser' command to add a new user in Linux.
Use the 'newuser' command to add a new user in Linux.
Use the 'adduser' or 'useradd' command to add a new user in Linux.
Use the 'makeuser' command to add a new user in Linux.
What command is used to display the IP address of a Linux system?
ipconfig
ifconfig
netstat
ping
Explain the purpose of the 'chmod' command in Linux.
The purpose of the 'chmod' command in Linux is to change the permissions of a file or directory.
The purpose of the 'chmod' command in Linux is to rename files
The purpose of the 'chmod' command in Linux is to compress files
The purpose of the 'chmod' command in Linux is to delete files
What command is used to install a new package in Linux using the command line?
get-package
add-package
install-package
apt-get install (for Debian-based systems) or yum install (for Red Hat-based systems)
Explain the purpose of the 'echo' command in bash.
The purpose of the 'echo' command in bash is to execute a shell script
The purpose of the 'echo' command in bash is to delete files
The purpose of the 'echo' command in bash is to print the specified text or string to the standard output.
The purpose of the 'echo' command in bash is to create a new directory
Which of the following file permissions belong to a symbolic link?
-rwxrwxrwx
+rwxrwxrwx
lrwxrwxrwx
srwxrwxrwx
What is the core of a Linux Operating System?
Kernel
Shell
Command
GUI
A command-line command in Linux that allows to search files for lines containing a match to a given pattern is called:
rm
chmod
find
grep
A Linux command-line command allowing a user to change his/her own password is known as:
pwd
pass
passwd
password
What is the function of the Linux chmod command?
Changes file access permissions
Changes file owner and group permissions
Compares the contents of two files or sets of files
Changes the Linux command prompt
Which of the answers listed below refers to a Linux command that allows for assuming the identity of a different system user and executing commands with security privileges of that user account?
sync
id
usermod
su
What is the name of a Linux command-line utility used for reporting statistics on running processes?
ps
tasklist
nbtstat
id
A Linux command that allows for modifying security privileges in order to be able to execute a single command that requires root access permissions is called:
id
sudo
usermod
su
Which of the following key combinations allows to terminate the current process in Linux shell?
Ctrl + C
Ctrl + A
Ctrl + E
Ctrl + L
What does Bash stand for?
Born Again Shell
Born Again Sign
Born All Shell
None of the above
What does the diff command do in the Terminal?
Compares only directories
Compares two different files or directories
Compares only files
None of the above
What does the command Head do?
Prints out the first 5 lines of a file
Prints out the first 10 lines of a file
Prints out the first 15 lines of a file
Prints out the first 20 lines of a file
What does the command "wc" do?
None of the below
Window Command
Wow Cool!
Word count
What was special about the Linux?
It's Free.
It's Open-Source.
It's bugs free.
It's hacker proof.
what is the package name for Apache web server in redhat linux?
http
apache
webd
httpd
what is the full form of ssh ?
secure shell
silent shell
service shell
super shell
which Commands used in red hat Linux to create the partition in hard disk.?
lsblk
mount
fdisk
mdisk
What is MBR in hard disk
Master boot recorder
Master Boot Record
Master Bootable Record
None of the above
User Password stored under which file in redhat linux
/etc/passwd
/etc/password
/etc/gshadow
/etc/shadow
How to list an archive content using tar in redhat linux ?
tar -cvf
tar -lvf
tar -xvf
tar -tvf
what is the use of lsblk command
list block device file
list all character device file
both of the above option
none of the above option
what is the use of partprobe command
save the partition table
print the partition
delete the partition
update the partition table changes to kernel
Which command is used to format the partition in redhat linux
fkfs
gkfs
mkfs
rkfs
How can you display the manual page for a specific command in Linux?
man
info
help
manual
User passwords are stored in
/etc/password
/etc/passwd
/root/passwd
/root/password
Different versions of Linux OS is called _________
Kernal
Shell
Wildcard
Distributaries
How do you add execute permission for owner and group in a file?
chmod +x filename
chmod +w filename
chmod +r filename
chmod +e filename
Add the line "Ryan" to the file enemies without removing any other data without using a text editor
echo "Ryan" >> enemies
echo "Ryan" > enemies
echo "Ryan" < enemies
cp "Ryan" enemies
In a BASH Script which of the below would you choose to see if a number is greater than another number
<
>
-gt
-ge
What would type to run a script with the file name test.sh if you are in the same directory as the script
script.sh
/script.sh
./script.sh
exec script.sh
We often say that Ansible is
Simple
Agentless
Extensible
All of the above
Which of the following terms best describes the Ansible architecture?
Client/Server
Event-Driven
Stateless
Agentless
Containers running on a single machine all share the same operating system kernel, so they start instantly and make more efficient use of RAM
TRUE
FALSE
Do virtual Machines run on top of?
Kernal
Operating System
Hypervisor
Running instance of an image is called?
Container
Registry
Daemon
Which command is used for fetching the list of running containers
docker ps
docker images
docker ps -a
what is Docker?
A virtual machine
A container runtime
A hypervisor
A programmimg language
what is docker hub?
A public repository of docker images
A tool for managing docker images
A tool for monitoring docker hosts
what is the command to run container from an image?
docker create
docker run
docker build
why we use -d command in docker?
To attach to the terminal
To get into seconday shell
To run container in detach mood
Default Apache stores its html pages in:
/etc/www
/var/www
/apache/www
/var/www/html
On which port does Apache run by default?
443
80
8080
22
What is the correct syntax for a secure copy command, to copy the file "foobar.txt" from the local host to a remote host?
scp foobar.txt your_username@remotehost.edu:/some/remote/directory
scp your_username@remotehost.edu:/some/remote/directory foobar.txt
scp foobar.txt remotehost.edu:/some/remote/directory -u your_username
scp -u your_username@remotehost.edu:/some/remote/directory foobar.txt
The correct command in Linux to restart the ssh daemon is:
systemctl ssh restart
sshd restart now
sudo service restart sshd
sudo systemctl restart sshd
Which symbol/command is used to move a job from terminal?
&
fg
@
rm
What is the use of grep command?
Filter the output
Remove the output
Delete the directory
Create the file
TAR stands for___
Traditional file
Targeted file
Tape archieve file
Thread renderer
Which shell is the most common and best to use?
Korn shell
C shell
Bourne shell
Bash Shell
command to change the owner of a particular file or directory
iwconfig
clear
dd
chown
Untuk membuka editor teks dilinux, kita dapat menjalankan perintah..
Gedit
notepad
word
text
mcdit
Can you delete a directory with the command: "rm -rf" ?
Only using the Root-user
Yes
No
Only if the directory is empty
What makes a file or folder hidden on Linux?
the -h attribute
having a period ( . ) at the beginning of its name
the "hidden" command
no files or folders can be hidden on Linux
Is it legal to edit Linux Kernel?
Yes
No
Only if you have a valid Licence for the distribution
Sometimes, depending on the distribution
What is command used to print the directory list with detail information?
ls -a
ls -l
ls
ls -v
How to force remove file and directory at the same time
rm -r
rm -rf
rmdir -r
rm -f
What is the NFS?
Null File System
New File System
Network File System
Number File System
