{"id":1933,"date":"2019-02-16T13:00:48","date_gmt":"2019-02-16T13:00:48","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=1933"},"modified":"2019-02-15T22:57:42","modified_gmt":"2019-02-15T22:57:42","slug":"using-the-nano-editor-with-a-raspberry-pi","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/1933\/using-the-nano-editor-with-a-raspberry-pi\/","title":{"rendered":"Using the Nano Editor with a Raspberry Pi"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"1936\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1933\/using-the-nano-editor-with-a-raspberry-pi\/using_nano_on_raspberry_pi\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"using_nano_on_raspberry_pi\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?resize=678%2C254\" alt=\"\" class=\"wp-image-1936\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_raspberry_pi.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p>Today I talk about the Nano  editor which can be used to edit files on the Raspberry Pi over SSH.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">What is Nano?<\/h2>\n\n\n\n<p>Nano is an easy to use command line text editor. It is very useful when you need to edit files on your Raspberry Pi over SSH.<\/p>\n\n\n\n<p>Using Nano means you don&#8217;t need to launch any GUI applications, which can be tricky over SSH.<\/p>\n\n\n\n<p>Nano is considered one of the easier to use editors as all its key combinations are shown on the screen at once.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using Nano<\/h2>\n\n\n\n<p>Nano can be started on the command line by running the <code>nano<\/code> command. To open a file with nano you can run the command <code>nano &lt;filename&gt;<\/code>.<\/p>\n\n\n\n<p>Once nano has been opened with a file, you will see the following screen.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"404\" data-attachment-id=\"2009\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1933\/using-the-nano-editor-with-a-raspberry-pi\/nano\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/nano.png?fit=644%2C404&amp;ssl=1\" data-orig-size=\"644,404\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"nano\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/nano.png?fit=300%2C188&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/nano.png?fit=644%2C404&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/nano.png?resize=644%2C404&#038;ssl=1\" alt=\"\" class=\"wp-image-2009\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/nano.png?w=644&amp;ssl=1 644w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/nano.png?resize=300%2C188&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/nano.png?resize=50%2C31&amp;ssl=1 50w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/figure>\n\n\n\n<p>This works similar to a standard word processors, if you want to move around the screen you use the keyboard arrows. To add text you are able to use the keyboard and type like normal.<\/p>\n\n\n\n<p>The bottom row of the editor gives a list of commands you can perform to save, exit, get help, or do a number of other functions.<\/p>\n\n\n\n<p>The commands are in the form of ^ and then a letter. This can be entered by pressing CTRL and then the letter indicated. For example to save the file (write it out) you can press CTRL-o.<\/p>\n\n\n\n<p>Once you have made your edits you can press Ctrl-o to save the file. This will prompt you to choose the filename to save it as. By default it will save it as the current filename however you can save it as whatever you wish.<\/p>\n\n\n\n<p>Once saved, you are able to exit nano with Ctrl-x. If it detects there are unsaved changes you have the option of discarding your changes or writing them. Again if you decide to write them out you are given the option to save the file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>Nano is a useful command line editor available on most Linux Distributions. For all the future work with configuring the Raspberry Pi Cluster I will use nano.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I talk about the Nano editor which can be used to edit files on the Raspberry Pi over SSH.<\/p>\n","protected":false},"author":1,"featured_media":1944,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Today I talk about how you can use the #Nano #Editor with a #RaspberryPi","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[57,329,37,58],"class_list":["post-1933","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-informational","tag-commandline-text-editor","tag-nano","tag-raspberry-pi","tag-text-editor"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/using_nano_on_the_pi.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-vb","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2002,"url":"https:\/\/chewett.co.uk\/blog\/2002\/raspberry-pi-cluster-node-12-automatic-start-with-rc-local\/","url_meta":{"origin":1933,"position":0},"title":"Raspberry Pi Cluster Node \u2013 12 Automatic Start with rc.local","author":"Chewett","date":"March 6, 2019","format":false,"excerpt":"This post builds on\u00a0my previous posts in the Raspberry Pi Cluster series by creating a script which automatically starts the slave and master with rc.local. What is the rc.local file? The rc.local file is used on many Linux operating systems to schedule operations to run after services are started on\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":241,"url":"https:\/\/chewett.co.uk\/blog\/241\/installing-raspbian-onto-raspberry-pi\/","url_meta":{"origin":1933,"position":1},"title":"Installing Raspbian onto a Raspberry Pi","author":"Chewett","date":"May 17, 2017","format":false,"excerpt":"Here I suggest some recommended steps to install Raspbian on top of their install guide. Choosing an OS for the Raspberry Pi One of the main ways to install a Raspberry Pi OS is to download a disk image called NOOBS.\u00a0This lets you\u00a0choose to easily install a number of different\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":461,"url":"https:\/\/chewett.co.uk\/blog\/461\/updating-raspberry-pi-cluster-without-logging-every-pi\/","url_meta":{"origin":1933,"position":2},"title":"Updating the Raspberry Pi Cluster without logging in to every Pi","author":"Chewett","date":"July 1, 2017","format":false,"excerpt":"The Raspberry Pi foundation have recently updated their Raspbian image. This brings bugfixes and upgrades to the Raspberry Pi. In this blogpost I share how you can run a command on your Raspberry Pi without logging in (this is mostly true although you still do \"log in\" just not in\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/raspbian_update_command.png?fit=580%2C307&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/raspbian_update_command.png?fit=580%2C307&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/raspbian_update_command.png?fit=580%2C307&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":409,"url":"https:\/\/chewett.co.uk\/blog\/409\/setting-raspberry-pi-cluster-node\/","url_meta":{"origin":1933,"position":3},"title":"Setting up a Raspberry Pi Cluster Node","author":"Chewett","date":"August 19, 2017","format":false,"excerpt":"To set up a Raspberry Pi node I will follow a specific set of steps so that every Pi is set up \u00a0similarly. For the initial deployment I will follow this once and then clone the SD Card multiple times. If at a later date more are added I will\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":407,"url":"https:\/\/chewett.co.uk\/blog\/407\/ssh-connect-host-raspberrypi-port-22-connection-refused-error-fixed\/","url_meta":{"origin":1933,"position":4},"title":"ssh: connect to host raspberrypi port 22: Connection refused Error Fixed","author":"Chewett","date":"June 24, 2017","format":false,"excerpt":"I was setting up a new install of Raspbian Pixel and found I couldn't login to the Raspberry Pi. It was giving me an error: chewett@bunker-master:~$ ssh pi@raspberrypi ssh: connect to host raspberrypi port 22: Connection refused It turns out that recently the Raspberry Pi Foundation have changed the default\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":375,"url":"https:\/\/chewett.co.uk\/blog\/375\/setting-up-the-ci20-for-the-cluster\/","url_meta":{"origin":1933,"position":5},"title":"Setting up the CI20 for the cluster","author":"Chewett","date":"October 27, 2018","format":false,"excerpt":"This post talks about the steps I have followed to set up my Creator CI20 for the Raspberry Pi Cluster. Burning Debian to the onboard NAND and configuring it To run the CI20 on the Raspberry Pi Cluster I am going to write Debian 8 to the NAND storage. First\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/ci40_setup.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/ci40_setup.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/ci40_setup.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/ci40_setup.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1933"}],"version-history":[{"count":7,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1933\/revisions"}],"predecessor-version":[{"id":2013,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1933\/revisions\/2013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1944"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}