There are many applications for the Raspberry Pi that do not require a monitor and keyboard. After enabling VNC on my Raspberry Pi 4, I noticed it would not boot without the display plugged in. A simple change to the config file fixed the issue.
First, open the command line and type “cd /” and press the enter key.
Type “ls” and press the enter key. This will show the contents of the directory.
Type “cd /boot” and press enter. This will navigate to the boot directory where the config.txt file is located.
Once in the /boot directory, type “sudo nano config.txt”. The sudo is required to give proper privileges for saving the file when editing is done. Nano is the file editor used to edit our config file.
After the editor has opened, scroll down the file until you find the line with “#hdmi_force_hotplug=1”.
Uncomment the line (remove the #). Press “Ctrl X”. This is the command to exit Nano. It will ask if you want to save the file. Press Y for yes. The Raspberry Pi 4 should now boot properly without the monitor plugged in.