Complete the code to enable SSH on Raspberry Pi for headless setup.
sudo systemctl [1] sshTo allow remote access, SSH must be enabled using systemctl enable ssh.
Complete the command to create an empty file named 'ssh' in the boot directory to enable SSH on first boot.
touch /boot/[1]Creating an empty file named ssh in the boot directory enables SSH on first boot.
Fix the error in the command to add Wi-Fi credentials to the Raspberry Pi's wpa_supplicant.conf file.
sudo nano /etc/wpa_supplicant/[1]The correct file to edit Wi-Fi settings is wpa_supplicant.conf.
Fill both blanks to create a dictionary comprehension that maps each device name to its IP address if the device is active.
active_devices = {device: info[1] for device, info in devices.items() if info['status'] [2] 'active'}The dictionary comprehension extracts the IP address using ['ip'] and filters devices with status equal to 'active'.
Fill all three blanks to create a dictionary comprehension that maps uppercase device names to their IPs if the IP is not empty.
filtered = { [1]: [2] for [3], info in devices.items() if info['ip'] != '' }The comprehension uses device.upper() as keys, info['ip'] as values, and iterates over device, info.