#1
Which of the following commands is used to change the ownership of a file in Linux?
chown
ExplanationChanges file ownership in Linux.
#2
What does the acronym 'SSH' stand for in Linux?
Secure Shell
ExplanationSecure Shell is a network protocol for secure communication.
#3
Which command is used to display the current date and time in Linux?
date
Explanationdate displays the current date and time in Linux.
#4
What is the purpose of the 'passwd' command in Linux?
To change a user's password
Explanationpasswd changes a user's password in Linux.
#5
Which command is used to find files in Linux based on various criteria such as name, size, or permissions?
find
Explanationfind locates files based on specified criteria in Linux.
#6
What does the 'cron' service do in Linux?
Schedules recurring tasks
Explanationcron schedules recurring tasks in Linux.
#7
Which command is used to display the contents of a file in Linux?
cat
Explanationcat displays the contents of a file in Linux.
#8
What does the command 'grep' do in Linux?
Searches for patterns in text files
Explanationgrep searches for patterns in text files in Linux.
#9
Which command is used to create a new directory in Linux?
mkdir
Explanationmkdir creates a new directory in Linux.
#10
What does the command 'pwd' do in Linux?
Prints the current working directory
Explanationpwd prints the current working directory in Linux.
#11
Which of the following is a correct statement regarding 'sudo' in Linux?
It is used to execute a command with elevated privileges
Explanationsudo grants elevated privileges for command execution.
#12
What is the purpose of the 'iptables' command in Linux?
To configure network firewall rules
Explanationiptables configures network firewall rules in Linux.
#13
Which file contains user-specific shell initialization commands in Linux?
.bashrc
Explanation.bashrc contains user-specific shell initialization commands.
#14
What is the purpose of the 'umask' command in Linux?
To configure default file permissions
Explanationumask configures default file permissions in Linux.
#15
Which command is used to compress files in Linux?
gzip
Explanationgzip compresses files in Linux.
#16
What does the command 'chroot' do in Linux?
Changes the root directory for a process
Explanationchroot changes the root directory for a process in Linux.
#17
Which command is used to view the system's hostname in Linux?
hostname
Explanationhostname displays the system's hostname in Linux.
#18
Which file contains the system-wide shell initialization commands in Linux?
/etc/profile
Explanation/etc/profile contains system-wide shell initialization commands.
#19
What is SELinux ('Security-Enhanced Linux')?
A mandatory access control mechanism
ExplanationSELinux is a mandatory access control mechanism in Linux.
#20
What does the command 'ls -l' display in Linux?
A long listing format of files and directories
Explanationls -l displays files and directories in a long listing format.
#21
What is the purpose of the 'auditd' service in Linux?
Monitors user activity and system events
Explanationauditd monitors user activity and system events in Linux.