Linux Server Quiz
- November 21, 2017
- Posted by: Surender
- Category: Linux Server
The following Quiz comprises multiple choice questions which tests the knowledge of a user in various areas of Linux system administration.
Ready for the Quiz? Click Play button below to get started.
Which of the following command lists the last 10 lines of a file?
tail command is used to display last 10 lines of a file. You could use -n parameter with tail command and specify how many lines you want to display (10 lines are default).
tail -n 20 /var/log/messages
The above command will display last 20 lines of /var/log/messages file.
Which program is used to schedule jobs on a Linux system?
Cron is the right answer.
RPM stands for Red Hat Package Manager
What command is used to assign executable permission to everyone on the file named "work"?
The chmod ugo+x work command will grant execute permission to everyone on file named work
What is the location of some system configuration and system administrator executable files?
/sbin is the right answer
What command is used to count the number of files in the current directory by using pipes?
ls | wc -l is the right answer.
What file contains the list of port numbers & associated names monitored by inetd?
/etc/services is the right answer
Which tool is used to automate the install of Red Hat Linux on identical hardware?
kickstart is used to automate the installation of Red Hat Linux on identical hardware. The configuration file is saved as /root/anaconda-ks.cfg
What command is used to halt a Linux system?
init 0 command halts the Linux system while init 6 causes it to reboot.
What is the result of following command:
find . -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c | sort -rn
This command displays the inode count of all the sub-directories in current working directory.
The Web Hosting providers generally advertise themselves as offering unlimited disk space on their Shared hosting. But they offer the users with a limited inode count. If you want to display the count of inodes in each directory, this command is for you.
Which command changes a file’s group owner
chgrp command changes the file’s group owner
Which command is used to display disk consumption of a specific directory?
du command displays the disk consumption of a specific directory
LILO is the abbreviation for LInux LOader. It is a legacy boot loader for Linux used to boot the Kernel on x86 hardware
You added a new user named bob to a linux system. Which group is bob added to by default?
The user bob will be member of bob group.
When a user is created in Linux, a group with same name is already created and the user is added as a member of this group. In a nutshell, when a user is created, the user belong to same group as that of his username.
What will be the result of following command:
find / -name ‘*’
This command lists all files and directories recursively starting from /
Which of the following command is equivalent to:
chmod 761 letter
chmod u = rwx, g = rw, o = x letter is the right answer
Which command is used to extract intermediate result in a pipeline?
tee command is used to extract intermediate result in a pipeline.
Where does Ret Hat Linux stores the system and mail logs?
By default, system and mail logs are written to /var/log directory.
How can you rebuild the RPM file to include the new patches?
rpmbuild --rebuild command is used to rebuild the RPM file to include the new patches
Which option of ls command is used to view file inode number?
ls -i command is used to display index number (inode) of file(s)
What command is used to query for a specific package with RPM?
rpm -q command is used to query a specific package.
What is the result of following command:
zip -r backup.zip techtutsonline.com/*
This command will add the techtutsonline.com directory recursively (excluding hidden files) to backup.zip archive
Which of the following tool is used to check and repair Linux file systems?
fsck is used to check the Linux file system.
This is similar to chkdsk in Windows systems. 🙂
Which Linux command shows which user I am currently logged on with?
whoami commands displays the currently logged on user name.
Which of the following is the main configuration file of Apache server?
httpd.conf is Apache server's main configuration file.
Who founded the Linux Kernel?
Linus Torvalds is known as founder of Linux kernel.
Which command is used to display the operating system name?
uname command displays the operating system name. It is commonly used with other options to generate desired output. uname -a command displays the complete name of operating system including hostname, kernel, and OS architecture.
In what file can you specify which users are not allowed to access a system via FTP?
What would be the Partition ID of swap partition created using fdisk?
Swap partition ID is 82 whereas regular Linux partition ID is 83.
What command is used to display your current working directory?
pwd command (abbreviation for print working directory) is used to display current working directory