Challenge your understanding of essential Linux system administration concepts, tools, and the core ecosystem. Assess your knowledge of key commands, system processes, and configuration skills necessary for efficient Linux management.
Which Linux command would you use to change the ownership of a file named 'report.txt' to a new user called 'alex'?
Explanation: The 'chown' command is specifically used to change ownership of files or directories in Linux, allowing you to assign them to a different user or group. 'chmod' changes file permissions, not the owner. 'chcron' is not a valid Linux command, making it an incorrect option. 'chdir' is used to change the current directory, not file ownership.
If you want to view running processes in real time, which command provides an interactive, updating display of system processes?
Explanation: The 'top' command offers a dynamic, real time view of all running processes and system resource usage in Linux. The 'ls' command lists directory contents, and 'rm' is used to remove files or directories. 'df' reports filesystem disk space usage and does not display processes.
When managing software packages on a Linux system that uses the apt package manager, which command installs a new package called 'nano'?
Explanation: To install a package with apt, you use 'apt install' followed by the package name. 'apt remove nano' would uninstall 'nano' rather than install it. 'apt update nano' is incorrect because 'update' refreshes the package index, not the package itself. 'apt get nano' is not a valid command on its own.
Which Linux command displays the disk space usage of files and directories, making it useful for finding large directories?
Explanation: The 'du' command shows disk usage for files and directories, helping administrators locate space-consuming items. 'ps' displays currently running processes, not disk usage. 'grep' searches for patterns in text files, and 'echo' simply prints arguments to the terminal.
On a Linux system, which tool is commonly used for editing text files directly from the terminal, for example, to modify configuration files?
Explanation: 'nano' is a widely used text editor for modifying files directly from the terminal due to its simplicity. 'ping' is a network utility for testing connectivity, not for editing files. 'tar' is used for archiving files. 'ntop' is not a text editor but rather a network monitoring tool.