Linux system administration is one of the most in-demand skills in IT.We are sharing few QUIZ sets to practice. Lets practice and share your feedback. Before attempting QUIZ Sets, lets revise basic concepts:
When you login you get “$” prompt, what is the prompt for root?
#
How to view difference between two files?
diff file1 and file2
How to change a user password?
passwd username
How do you search for a pattern/word in a file and then replace
it in an entire file?
sed command
Which permission allows a user to run an executable with the
permissions of the owner of that file?
First 3 bits should have x
What does the following command line do?
ps -ef | awk ‘{print $1}’ | sort | uniq
List the first column of all running processes, sort them and
remove duplicates
What is the output of the following command:
$tail -10 filename | head -1
It will show the first line from the last 10 lines of a file
How to create a directory?
mkdir
Why is “tail –f logfilename” command used most often and what
does it do?
It will output all incoming logs in real time
Where are the zone files located for DNS service?
/var/named/zonefiles
What is the difference between “hostname” and “uname” commands?
Hostname will give you system name and uname will give you OS
information
How to sort a file in reverse order?
cat filename | sort –r
List any 3 type of filesystem?
ext4,NTFS and FAT
How to check the total number of partition in Linux?
fdisk -l
Your company has terminated a server administrator. What is first
thing as an administrator you should do to enhance the security?
Change root password
What are the different types of DNS Server
Master and secondary
What is the exact command syntax to list the 5th column of a file
and cut the first 3 letters?
cat filename | awk ‘{print $5}’ | cut –c1-3
What is the purpose of pipe (|)?
To combine multiple commands
There is a command which gives you information about other
commands, please explain that command and what is it used for?
man
What is the configuration file name of DNS and where is it
located?
/etc/named.conf
Which command is used to read the top 5 lines of a file?
head -5 filename
Name the command to find specific word from a file?
grep word filename
Your PC is configured with a DNS server address but not the
default gateway. Can the PC access internet?
No
If I don’t want others to read my file1, how to do that?
Remove r from the last 3 bits of file permission
What is the port # for DNS, NTP and NFS?
53,123 and 111/2049
What is the command to change file/directory ownership and group?
chown and chgrp