Setting up wireless networking
You will need to define afile for your particular wireless network:
Put this file in the boot folder (On Windows is a dedicated drive), and when the Pi first boots, it will copy that file into the correct location in the Linux root file system and use those settings to start up wireless networking.
Connecting via SSH
By default the pi will appear asin your local network. It will also boot with a default user called . You can ssh into it by running and using as password.
Adding a new user
To give the user sudo privileges:
Note that you might need to add the user to other specific groups to make use of certain capabilities (e.g. thegroup to take pictures with a camera attachment). You can do this with the same command, but replacing with the group of your choosing. Here's a list of all the groups that the default user belongs to (you can use to check the which groups a particular user belongs to):
Change Network Hostname
You can change the visible name of the pi on the network (which will also by the name you ssh to and log in your samba server from - more about this later) by using the official configuration tool. First, run, then choose the following options:
Alternatively, edit the hostname file by typing
The change will be effective on the next reboot. To reboot the pi, type
Setting up a Samba file server
By setting up a samba file server we can access specific folders on the pi directly via the file explorer, making us able to open files and folders in visual studio code, and generally treat it like a generic folder on our PC.
First, install samba:
Create the folder you intend to share:
Open the samba configuration file by running:
Add the entry for the newly created folder to the config file (the entry name between square brackets will be the name of the shared location as it appears on your network):
Then, we need to add a user and password to Samba. Once the user has a local account their corresponding Samba samba user can be added using:
You can view a list of all registered samba users with:
Finally, restart the samba service:
You can now access the shared samba folder by navigating to your PI network hostname (eg.)
Alternatively, you can map any of the shared folders directly to a drive using the same username / password combination as credentials: