Complete the code to display the current user in Linux.
echo [1]The $USER environment variable holds the name of the current logged-in user.
Complete the command to change file permissions to read, write, and execute for the owner only.
chmod [1] filenameThe permission 700 means read, write, and execute for the owner only, and no permissions for group or others.
Fix the error in the command to list all files including hidden ones.
ls [1]The -a option shows all files including hidden files (those starting with a dot).
Fill both blanks to create a user and set a password in Linux.
[1] newuser && [2] newuser
adduser creates a new user, and passwd sets the password for that user.
Fill all three blanks to create a dictionary of users and their home directories, filtering only users with home starting with '/home'.
users = [1]: [2] for [3] in open('/etc/passwd') if [2].startswith('/home')}}
This comprehension extracts the username (field 0) and home directory (field 5) from each line in /etc/passwd, filtering lines where the home directory starts with '/home'.