Which command is used to check the memory usage in Linux?
Correct answer:
B) free
Explanation: The free command shows the amount of free and used memory in the system.
Which command is used to check the memory usage in Linux?
Correct answer:
B) free
Explanation: The free command shows the amount of free and used memory in the system.
What does the ps aux command display?
Correct answer:
B) Running processes with detailed information
Explanation: The ps aux command provides detailed information about all running processes on the system.
What is the use of the kill command in Linux?
Correct answer:
A) Terminate processes
Explanation: The kill command is used to terminate processes by specifying their process ID (PID).
Which command displays information about your network interfaces?
Correct answer:
A) ifconfig
Explanation: The ifconfig command is used to display or configure network interface settings.
What does the df -h command display?
Correct answer:
A) Disk space usage in human-readable format
Explanation: The df -h command shows disk usage in a human-readable format, such as MB or GB.
Which command can be used to count the number of lines in a file?
Correct answer:
A) wc -l
Explanation: The wc -l command counts the number of lines in a file.
What does the chmod command do in Linux?
Correct answer:
A) Change file permissions
Explanation: The chmod command is used to modify the permissions of a file or directory.
Which command is used to display the last few lines of a file?
Correct answer:
A) tail
Explanation: The tail command displays the last 10 lines of a file by default.
How do you display hidden files in Linux?
Correct answer:
A) ls -a
Explanation: The ls -a command displays all files, including hidden files (those starting with a dot).
Which command is used to find the location of an executable file?
Correct answer:
A) which
Explanation: The which command shows the location of an executable file in the system's PATH.
Which command is used to display the contents of a file one page at a time?
Correct answer:
A) less
Explanation: The less command displays the contents of a file one page at a time, allowing for easier navigation.
How do you change the owner of a file in Linux?
Correct answer:
A) chown
Explanation: The chown command is used to change the ownership of files and directories.
What does the sudo command do?
Correct answer:
A) Executes commands as the superuser
Explanation: The sudo command allows a permitted user to execute a command as the superuser or another user.
Which file stores user account information in Linux?
Correct answer:
A) /etc/passwd
Explanation: The /etc/passwd file contains basic information about user accounts.
How can you view the system's kernel log messages?
Correct answer:
A) dmesg
Explanation: The dmesg command displays messages from the kernel ring buffer.
Which command shows the disk partitions on your system?
Correct answer:
A) fdisk -l
Explanation: The fdisk -l command lists the disk partitions on the system.
How do you find out the path of the shell currently being used?
Correct answer:
A) echo $SHELL
Explanation: The echo $SHELL command displays the path of the shell being used in the current session.
Which command is used to display the current date and time?
Correct answer:
A) date
Explanation: The date command displays the current date and time.
Which command is used to display system-wide environment variables?
Correct answer:
A) printenv
Explanation: The printenv command displays the system-wide environment variables.
What does the uname command display?
Correct answer:
A) System information
Explanation: The uname command shows basic system information, such as the kernel name and version.
Which command can be used to monitor real-time network connections?
Correct answer:
A) netstat
Explanation: The netstat command provides real-time information on network connections and listening ports.
How can you view the current working directory in Linux?
Correct answer:
A) pwd
Explanation: The pwd command prints the current working directory.
Which command is used to delete files and directories?
Correct answer:
A) rm
Explanation: The rm command is used to remove files and directories.
Which command is used to display the manual for a specific command?
Correct answer:
A) man
Explanation: The man command provides detailed information on how to use a particular command.
How do you display the first 10 lines of a file?
Correct answer:
A) head
Explanation: The head command shows the first 10 lines of a file.
Which command is used to change a user's password?
Correct answer:
A) passwd
Explanation: The passwd command allows users to change their passwords.
What does the ping command do?
Correct answer:
A) Checks network connectivity
Explanation: The ping command sends ICMP echo requests to test network connectivity.
How can you check the available disk space on a system?
Correct answer:
A) df
Explanation: The df command displays available and used disk space on mounted file systems.
Which command is used to create a new user in Linux?
Correct answer:
A) useradd
Explanation: The useradd command is used to create a new user account on the system.
How do you reboot a Linux system using the command line?
Correct answer:
A) reboot
Explanation: The reboot command reboots the system.
Which file contains the group information in Linux?
Correct answer:
A) /etc/group
Explanation: The /etc/group file contains information about the groups on the system.
How do you add a new group in Linux?
Correct answer:
A) groupadd
Explanation: The groupadd command is used to create a new group on the system.
Which command is used to monitor system logs in real-time?
Correct answer:
A) tail -f /var/log/syslog
Explanation: The tail -f command continuously monitors a log file in real-time.
Which command shows the number of files and directories in a directory?
Correct answer:
A) ls | wc -l
Explanation: The ls | wc -l command counts the number of files and directories in the current directory.
How can you remove a directory in Linux?
Correct answer:
A) rmdir
Explanation: The rmdir command removes empty directories.
Which command lists all the available commands in Linux?
Correct answer:
A) compgen -c
Explanation: The compgen -c command lists all available commands.
Which file stores hashed passwords in Linux?
Correct answer:
A) /etc/shadow
Explanation: The /etc/shadow file stores user passwords in a hashed format for security.
What does the hostname command do?
Correct answer:
A) Displays or sets the system's hostname
Explanation: The hostname command is used to display or change the system's hostname.
How do you forcefully log out a user in Linux?
Correct answer:
A) pkill -KILL -u username
Explanation: The pkill -KILL -u username command forcefully logs out a user by killing all their processes.
Which command checks the status of a service in systemd?
Correct answer:
A) systemctl status service_name
Explanation: The systemctl status service_name command shows the status of a service in systemd.
How do you extract files from a .zip archive?
Correct answer:
A) unzip
Explanation: The unzip command is used to extract files from a .zip archive.
Which command provides detailed information about a file in Linux?
Correct answer:
A) stat
Explanation: The stat command provides detailed information about a file, including its size, permissions, and modification time.
How do you schedule a one-time task in Linux?
Correct answer:
A) at
Explanation: The at command is used to schedule one-time tasks in Linux.
What does the jobs command do?
Correct answer:
A) Lists background jobs in the current shell
Explanation: The jobs command shows all background jobs running in the current shell session.
Which command creates a new empty file?
Correct answer:
A) touch
Explanation: The touch command creates a new empty file or updates the timestamp of an existing file.
How can you remove all files in a directory without being prompted?
Correct answer:
A) rm -rf *
Explanation: The rm -rf * command forcefully removes all files and directories without any prompts.
How do you check the IP address of your system in Linux?
Correct answer:
A) ifconfig
Explanation: The ifconfig command shows detailed information about network interfaces, including IP addresses.
Which command is used to create a symbolic link?
Correct answer:
A) ln -s
Explanation: The ln -s command creates a symbolic (soft) link to a file or directory.
What does the du command display?
Correct answer:
A) Disk usage of files and directories
Explanation: The du command shows the disk usage of files and directories.
Which command terminates a program or process by name?
Correct answer:
A) killall
Explanation: The killall command terminates all processes by name.
If this exam is giving you a hard time, let us be your helping hand. Contact us, and we'll provide the assistance you need to pass and move forward.