[vc_row][vc_column width=”1/4″][vc_single_image media=”48459″ media_width_percent=”90″ alignment=”center”][/vc_column][vc_column width=”3/4″][vc_column_text]For us Linux “late-adopters”?it can be a daunting task?of carrying out a routine file transfer to our Raspberry Pi from our Windows PC.?However, the learning curve is not so great.?There are plenty of easy tools for?achieving this feat.?If you have not been introduced to Notepad++ then we will give you a quick introduction. We will also educate you on?a small plugin inside of Notepad++ that allows you to run a lightweight FTP client. This client is really only suitable for your scripting files or editing configuration files but you will learn the basics of?how FTP works and then have the skills to upgrade to a more robust FTP client for moving other files onto the Raspberry Pi.[/vc_column_text][/vc_column][/vc_row][vc_row row_height_percent=”0″ override_padding=”yes” h_padding=”2″ top_padding=”2″ bottom_padding=”2″ overlay_alpha=”50″ gutter_size=”3″ shift_y=”0″][vc_column][vc_separator sep_color=”color-iopl”][vc_custom_heading heading_semantic=”h4″ text_size=”h4″]Prerequisites[/vc_custom_heading][uncode_list larger=”yes” icon=”fa fa-code-outline” icon_color=”color-iopl”]
- Install Notepad++ on your windows PC.?https://notepad-plus-plus.org/
- Download Putty. Link Below
- Ensure your Raspberry Pi is plugged into your network via Ethernet (cat5)
- Power up your Pi
- Ensure your LAN has DHCP enabled…most routers will have this set as default.
[/uncode_list][vc_separator sep_color=”color-iopl”][vc_custom_heading heading_semantic=”h4″ text_size=”h4″]Finding your RPi IP address[/vc_custom_heading][vc_column_text]If you already have your raspberry pi on the network and you know its IP address then that is half the battle. Alternatively, if you have just finished installing Raspbian and you are not sure what to do from here then do not panic!! Check this article to find your IP address. https://dirtyoptics.com/find-raspberry-pi-ip-address/
[/vc_column_text][vc_separator sep_color=”color-iopl”][vc_custom_heading heading_semantic=”h4″ text_size=”h4″]Method 1: Notepad++ (My Favourite!)[/vc_custom_heading][vc_column_text]Navigate your way to?https://notepad-plus-plus.org/
?and download the latest release for Notepad++. Install as per any other windows application and run it up. You will notice it looks very similar to the generic windows text editor however it does allow for some syntax highlighting. A handy little editor also if you are just starting to dive into Python and other coding languages.
Once Notepad++ is open,?navigate to: Plugins / NppFTP / Show NppFTP Window. (If you do not see NppFTP you may need to go to the plugin manager and install it)[/vc_column_text][vc_single_image media=”48468″ media_width_percent=”50″][vc_column_text]Once you have the NppFTP window open you will need to create an SFTP profile for your RPI. Please note that when SSH is enabled on your Pi it also opens up port 22 for you to utilize SFTP over the SSH connection. (Well that’s my understanding anyhow!).[/vc_column_text][uncode_list larger=”yes” icon=”fa fa-code-outline” icon_color=”color-iopl”]
- Insert Pi IP
- Port 22
- Select SFTP
- Username: pi (If left as default)
- Password: raspberry (If left as default)
[/uncode_list][vc_column_text]After you have set it up, click close/save. Find and click the connect button in the NppFTP window and connect to the profile you just set up. After a few seconds, you should?be able to view a “windows like” file tree?of your Pi. You can also double-click on any text file and edit directly in the Notepad ++ editor. When you click “save” it will automatically upload that file back to the Pi. Particularly useful when editing Python code and you want to run directly on the Pi. This can be dangerous at times if updating important configuration docs. Ensure you back them up first.[/vc_column_text][vc_single_image media=”48473″ media_width_percent=”50″][vc_raw_html]JTVCYWRpbnNlcnRlciUyMG5hbWUlM0QlMjJCbG9jayUyMDElMjIlNUQ=[/vc_raw_html][vc_separator sep_color=”color-iopl”][vc_custom_heading heading_semantic=”h4″ text_size=”h4″]Method 2: Using SSH/Terminal and ‘Nano’ Editor[/vc_custom_heading][vc_column_text]If you are feeling adventurous, and want to use SSH to edit configuration files then strap yourself in. For the ‘un-initiated’, Linux commands differ heavily from the standard Win DOS commands. You will notice some similarities but for the most part, it’s a bit of a learning curve. We are not going to cover absolutely everything here but the basics for editing files whilst you are in a terminal session. (Accessing you Pi directly)
The first thing you will want to ensure is that your RPI is powered up, Plugged into your network and you know the IP address. Assuming you have installed Raspbian onto your Micro SD and inserted the SD card prior to powering up we can then begin to access the Pi via SSH. (SSH = Secure SHell). This is pretty much a standard way of accessing your Raspberry Pi if you do not have a monitor available. SSH is enabled by default as part of the Raspbian build.
You will now be required to download and open a small terminal program called ‘Putty’ (There are other, but this is the most popular) http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html run the putty.exe from your PC and input the following information.[/vc_column_text][uncode_list larger=”yes” icon=”fa fa-code-outline” icon_color=”color-iopl”]
- Hostname/IP Addres – Insert your RPI IP
- Port 22
- Select SSH
[/uncode_list][vc_single_image media=”48604″ media_width_percent=”40″][vc_column_text]Now that you have logged into your Raspberry Pi via SSH its time to start Nano. Nano is a Linux command line text editor. It is pretty simple to get running and use. It can be run in two different ways.
This will create a blank text entry. The correct syntax to follow is:
sudo nano /path/to/filename
If you use a path that is not valid or it cannot find the file you want to edit, then a blank entry will be created.
If you wanted to edit the Raspberry Pi config file, then the command would look like:[/vc_column_text][vc_single_image media=”48619″ media_width_percent=”50″][vc_column_text]Now that you have accessed the config file with nano, you can go through and make your changes. Use the arrow keys to navigate through the text file, and the usual backspace/enter to move things around.
It would be wise to make a backup file of this configuration first.
Once complete, hit CTRL-X to exit, then Y to save. It will overwrite the old file with your new one.[/vc_column_text][vc_separator sep_color=”color-iopl”][vc_gallery el_id=”gallery-205479″ type=”carousel” medias=”48623,48622,48621,48620,48625″ carousel_lg=”3″ carousel_md=”3″ carousel_sm=”1″ gutter_size=”3″ carousel_interval=”0″ carousel_navspeed=”400″ carousel_nav=”yes” carousel_nav_mobile=”yes” carousel_nav_skin=”dark” carousel_dots=”yes” carousel_dots_mobile=”yes” single_overlay_opacity=”50″ single_padding=”2″][vc_raw_html]JTVCYWRpbnNlcnRlciUyMG5hbWUlM0QlMjJCbG9jayUyMDElMjIlNUQ=[/vc_raw_html][vc_separator sep_color=”color-iopl”][vc_custom_heading heading_semantic=”h4″ text_size=”h4″]What Next?[/vc_custom_heading][uncode_list larger=”yes” icon=”fa fa-code-outline” icon_color=”color-iopl”]
- Download and try winSCP to transfer images and larger files.
- Setup an FTP server on the?Raspberry Pi.
- Utilise a standalone FTP client to connect to the Raspberry Pi. (Filezilla/cuteFTp etc etc)