The _________ command is used to display the disk usage of files and directories.
- df
- du
- space
- usage
The "du" (disk usage) command is used to display the disk usage of files and directories in Linux. It provides information about the space consumed by each file or directory, helping you manage disk space effectively.
Which Linux distribution focuses primarily on security and is often used for penetration testing?
- CentOS
- Fedora
- Kali Linux
- Ubuntu
Kali Linux is a Linux distribution that focuses primarily on security and is widely used for penetration testing and ethical hacking. It comes pre-installed with a variety of security tools and is maintained by Offensive Security.
To temporarily save iptables rules, one would use the command iptables-save > ________.
- rules.txt
- config.rules
- iptables.conf
- saved-rules
To temporarily save iptables rules, one would use the command iptables-save > **rules.txt**. This command saves the current firewall rules to a file called "rules.txt" for later use or backup.
You are trying to optimize a Linux server that handles large amounts of data transfer. Which command would you use to monitor disk activity in real-time?
- iotop
- vmstat
- df
- ifconfig
To monitor disk activity in real-time on a Linux server, you can use the iotop command. It displays a list of processes and their disk I/O usage, helping you identify which processes are the most disk-intensive.
The _________ directory in Linux is typically used for transient or temporary data, often cleared during boot.
- /home
- /opt
- /tmp
- /var
The /tmp directory in Linux is typically used for transient or temporary data. It is often cleared during system boot to ensure it doesn't accumulate unnecessary files and take up space.
Which protocol is primarily used by SSH for secure remote access?
- SSH
- FTP
- HTTP
- Telnet
SSH (Secure Shell) primarily uses the SSH protocol for secure remote access. SSH is a cryptographic network protocol that ensures secure communication over unsecured networks. It provides authentication and encrypted data transfer.
The _________ Linux distribution is enterprise-focused and is backed by Red Hat.
- CentOS
- Debian
- Fedora
- Ubuntu
The CentOS Linux distribution is enterprise-focused and is backed by Red Hat. It is known for its stability and long-term support, making it a popular choice for enterprise environments.
In a shell script, if you want a loop to execute infinitely, which of the following would be the most appropriate construct?
- while true; do
- for (( ; ; )); do
- until false; do
- do forever;
The most appropriate construct for an infinite loop in a shell script is while true; do. This creates a loop that continues to execute as long as the condition true remains true, effectively resulting in an infinite loop.
If you want to view detailed information about disk usage for each directory, the __________ command would be appropriate.
- du
- df
- ls
- lsblk
If you want to view detailed information about disk usage for each directory in Linux, the du (disk usage) command would be appropriate. It displays the disk space consumed by each directory and its subdirectories.
To change or set the UUID of a filesystem in Linux, you would use the ________ command.
- tune2fs
- uuidgen
- fsck
- resize2fs
To change or set the UUID of a filesystem in Linux, you would use the tune2fs command. This command allows you to modify various filesystem parameters, including the UUID.
Which command can be used to query DNS records, including MX, NS, and SOA records?
- nslookup
- ifconfig
- route
- ping
The nslookup command can be used to query DNS (Domain Name System) records, including MX (Mail Exchange), NS (Name Server), and SOA (Start of Authority) records. It's a valuable tool for DNS troubleshooting and network diagnostics.
In Debian and its derivatives, which tool is primarily used for package management?
- APT
- YUM
- DNF
- Zypper
In Debian and its derivatives, the primary tool used for package management is APT (Advanced Package Tool). APT is a package management system that allows users to install, upgrade, and remove software packages on Debian-based systems.