Complete the code to display the current logged-in users on a Linux server.
who [1]-a shows all information but is verbose.-l shows login processes, not users.-r shows runlevel, not users.The who -u command shows the current logged-in users along with their idle time.
Complete the command to check disk usage in human-readable format.
df [1]-a shows all filesystems including dummy ones.-l limits output to local filesystems only.-t filters by filesystem type.The df -h command shows disk usage with sizes in KB, MB, or GB for easy reading.
Fix the error in the command to restart the Apache web server using systemctl.
sudo systemctl [1] apache2start only starts the service if stopped.enable sets service to start on boot but doesn't restart.status only shows service status.To restart the Apache server, use systemctl restart apache2.
Fill both blanks to create a dictionary comprehension that maps each word to its length if length is greater than 3.
{word: [1] for word in words if [2]word.upper() as value instead of length.word.startswith('a') as condition instead of length check.The dictionary comprehension maps each word to its length using len(word) and filters words longer than 3 characters with len(word) > 3.
Fill all three blanks to create a dictionary comprehension that maps uppercase keys to values only if value is positive.
{ [1]: [2] for [3], [2] in data.items() if [2] > 0 }item instead of k and v in the loop.The comprehension uses k.upper() as keys, v as values, and iterates over k, v in data.items(), filtering values greater than zero.