{"id":66,"date":"2017-06-06T12:46:40","date_gmt":"2017-06-06T16:46:40","guid":{"rendered":"https:\/\/itp.nyu.edu\/networks\/?page_id=66"},"modified":"2024-09-26T22:52:10","modified_gmt":"2024-09-27T02:52:10","slug":"setting-up-a-raspberry-pi","status":"publish","type":"page","link":"https:\/\/itp.nyu.edu\/networks\/setting-up-a-raspberry-pi\/","title":{"rendered":"Setting Up A Raspberry Pi"},"content":{"rendered":"\n<p>There are many guides to setting up a Raspberry Pi available on the web. This one is geared toward projects at ITP. It assumes you&#8217;re interested in working with the Pi mainly through the command line interface, and don&#8217;t want to have to set up a monitor and keyboard every time you use your Pi. It also assumes you want to connect to the internet safely. It also explains how to install node.js as your initial programming environment.<\/p>\n\n\n\n<p>This tutorial was written primarily with the Raspberry Pi 3 and the Pi Zero W in mind. The Pi 4 has superseded the 3 as the latest model with the greatest processing capability, and the Zero W is the least expensive networked model. All have built-in WiFi and Bluetooth, which are important&nbsp;to many projects. Together, these two models cover most of what an ITP student might need from a Pi. This tutorial should work for other models as well, but it&#8217;s been tested on these two.<\/p>\n\n\n\n<p>The parts you&#8217;ll need are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Raspberry <a href=\"https:\/\/www.raspberrypi.org\/products\/pi-zero-w\/\">Pi Zero W<\/a> or <a href=\"https:\/\/www.raspberrypi.org\/products\/raspberry-pi-3-model-b\/\">Pi 3 Model B<\/a> or another model<\/li>\n\n\n\n<li>USB mini cable<\/li>\n\n\n\n<li>5V power supply, preferably capable of supplying 2A or more current<\/li>\n\n\n\n<li>USB-to-serial adapter such as:\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.sparkfun.com\/products\/14050\">SparkFun Serial Basic Breakout &#8211; CH340G<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.sparkfun.com\/products\/12731\">SparkFun USB to Serial Breakout &#8211; FT232RL<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.adafruit.com\/product\/3309\">Adafruit CP2104 Friend &#8211; USB to Serial Converter<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.adafruit.com\/product\/284\">Adafruit\u00a0FTDI Friend<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>USB cable for adapter<\/li>\n\n\n\n<li>MicroSD card, 8GB or larger<\/li>\n\n\n\n<li>SD card reader<\/li>\n<\/ul>\n\n\n\n<p>The steps you need to take are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#installing-os\">Install the operating system on an SD card<\/a><\/li>\n\n\n\n<li><a href=\"#powering-and-connecting\">Make Power and Serial (or Ethernet) connections<\/a><\/li>\n\n\n\n<li><a href=\"#logging-in\">Connect to the command line interface<\/a><\/li>\n\n\n\n<li><a href=\"#configuring-system\">Set up your initial system configuration<\/a><\/li>\n\n\n\n<li><a href=\"#changing-defaults\">Change defaults to increase security<\/a><\/li>\n\n\n\n<li><a href=\"#connecting-to-network\">Connect to the\u00a0network<\/a><\/li>\n\n\n\n<li><a href=\"#updating-system\">Update the operating system<\/a><\/li>\n\n\n\n<li><a href=\"#configuring-a-firewall\">Configure a firewall<\/a><\/li>\n\n\n\n<li><a href=\"#installing-node\">Install your programming\u00a0environment<\/a><\/li>\n\n\n\n<li><a href=\"#backing-up\">Back up your custom installation<\/a><\/li>\n<\/ul>\n\n\n\n<p><a name=\"installing-os\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_the_Operating_System_on_an_SD_Card\"><\/span>Installing the Operating System on an SD Card<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You need an operating system for your Pi. There are many different Linux distributions that will run on the Pi. The official distribution from Raspberrypi.org is called Raspbian. It&#8217;s a variant of the Debian distribution of Linux, and comes in two versions: the full version and the Lite version. The Lite version can always be upgraded by adding software packages, so it&#8217;s a good place to start. The full version takes more space and contains additional software you may not need. Either will work.<\/p>\n\n\n\n<p>Download the <a href=\"https:\/\/www.raspberrypi.org\/downloads\/\">Raspberry Pi Imager<\/a> from the raspberrypi.org site. Install the application once it&#8217;s downloaded. On the first screeen, click Choose OS. You&#8217;ll see a list of distributions you can use. The Raspbian Lite image is listed under &#8220;Raspberry Pi OS (Other)&#8221;as &#8220;Raspberry Pi OS Lite (32-bit)&#8221; Choose that. Then insert an SD card in your computer and click &#8220;Choose SD card.&#8221; Choose the SD card that you just inserted. Then click &#8220;write.&#8221; Installing Raspbian Lite will take about three minutes; the full Raspbian will take about ten minutes. When it&#8217;s done, you have a boot disk.<\/p>\n\n\n\n<p>The two most convenient ways to access the Pi without a keyboard or monitor are through the serial port console or through WiFi and ssh. In order to access through the serial port, you need a USB-to-serial adapter. This is usually more reliable, as it doesn&#8217;t depend on network access, but it does require the adapter. In order to access through WiFi and ssh, you need to configure the Pi to connect to the network that your personal computer is on. <\/p>\n\n\n\n<p>There are a couple of files you need to know about in order to enable SSH access through either the serial port or through WiFi. They are the <em>config.txt<\/em> file, a file you will create called <em>ssh<\/em>, and the <em>wpa_supplicant.conf<\/em> file, which holds your WiFi network credentials. You can create and edit all of these on your boot disk before you power up the Pi. Once the boot disk is created, remove and re-insert it into your computer and open the <em>config.txt<\/em> file in a text editor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Enabling_Serial_Port_Access\"><\/span>Enabling Serial Port Access<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>As of Rasbpian&#8217;s 2017-04-10 release, the Pi&#8217;s serial terminal is not enabled by default. To access the Pi via a serial terminal, you&#8217;ll need to modify the <em>config.txt<\/em> file on your boot disk.&nbsp;Open the  file, and add the following line at the end:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">enable_uart=1<\/pre>\n\n\n\n<p>UART stands for Universal Asynchronous Receiver-Transmitter; in other words, an asynchrnous serial port. That&#8217;s all you need to do to enable the serial port. See below for how to connect to the hardware.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Making_a_New_User\"><\/span>Making a New User<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You can create a new user by creating a new file in your boot drive called <code>userconf.txt<\/code>. Add this file in the boot partition of the SD card; this is the part of the SD card which can be seen when it is mounted in a Windows or MacOS computer.<\/p>\n\n\n\n<p>This file should contain a single line of text, consisting of <em>username:password<\/em>. That is, your username, followed immediately by a colon, followed immediately by an encrypted representation of the password you want to use. NEVER put an unencrypted password in this file.<\/p>\n\n\n\n<p>To encrypt your password, type the following on the command line of a POSIX computer (MacOS, Linus, Unix, or on Windows WSL):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> echo 'mypassword' | openssl passwd -1 -stdin<\/pre>\n\n\n\n<p>This will produce what looks like a string of random characters. It&#8217;s an encrypted version of your password. Copy it into the username:password line in the userconf.txt file. Make sure you don&#8217;t add an extra blank line to this file.<\/p>\n\n\n\n<p>Note: Windows users may need to install openssl first. To do this, Launch Windows Subsystem for Linux (WSL) then type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install openssl<\/pre>\n\n\n\n<p>This will prompt you for your admin password, then will download the ssl application and install it in WSL for you. <a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/configuration.html#setting-up-a-routed-wireless-access-point\">https:\/\/www.raspberrypi.com\/documentation\/computers\/configuration.html#setting-up-a-routed-wireless-access-point<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Powering_and_Connecting_to_Your_Pi\"><\/span>Powering and&nbsp;Connecting to Your Pi<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Insert the card into a Raspberry Pi. Connect your Pi to a 5V DC power adapter&nbsp;via the USB micro connection marked PWR IN. Use a power adapter that can supply at least 2A of current.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Connecting_Via_Serial_Port\"><\/span>Connecting Via Serial Port<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>By enabling the UART above, you configured the Pi to provide a command line console via the serial port. Connect the adapter to the Pi&#8217;s I\/O pins as shown below. The USB-to-serial adapter&#8217;s receive pin (RX) goes to the Pi&#8217;s transmit pin (TX) and vice versa. Connect the ground of the adapter to the ground of the Pi as well. Then connect the USB-to-serial adapter to your computer. Install any needed adapters for your USB-to-serial adapter and you should then see it show up as a serial port in whatever serial terminal application you normally use. The <em>screen<\/em> program on the MacOS and Linux command line will work best. CoolTerm works well for this on MacOS, Windows, and Linux as well.<\/p>\n\n\n\n<p>To connect to the serial port via screen on MacOS, first you need to know the name of your serial port. Plug the adapter in, open the Terminal application, and list the ports in the <code>\/dev<\/code> directory like so:<\/p>\n\n\n\n<p><em><strong>Note:<\/strong> From here on, whenever you see $ in front of a line, you can assume it&#8217;s the command prompt, and you don&#8217;t need to type the $, just the rest of the line.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ls \/dev\/cu.*<\/pre>\n\n\n\n<p>You&#8217;ll likely get a port name like <code>\/dev\/cu.usbserial-14430<\/code> or <code>\/dev\/cu.SLABtoUART<\/code>. Once you know the name of your port, open screen at 115200 bits per second like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ screen &lt;portname&gt; 115200\n<\/pre>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_serial_bb.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"980\" src=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_serial_bb-1024x980.png\" alt=\"Diagram showing USB-to-serial adapter connected to a Raspberry Pi through their respective transmit (TX) and receive (RX) pins. The adapter's ground pin is also connected to the Pi's ground pin.\" class=\"wp-image-69\" srcset=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_serial_bb-1024x980.png 1024w, https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_serial_bb-300x287.png 300w, https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_serial_bb-768x735.png 768w, https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_serial_bb.png 1025w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 1. USB-to-serial connection to a Raspberry Pi. Click to enlarge.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_pinouts.png\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"1024\" src=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_pinouts-503x1024.png\" alt=\"Diagram identifying each of the I\/O pin connections for the Raspberry Pi.\" class=\"wp-image-76\" srcset=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_pinouts-503x1024.png 503w, https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_pinouts-147x300.png 147w, https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/pi_pinouts.png 744w\" sizes=\"(max-width: 503px) 85vw, 503px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 2. I\/O pin connections for the Raspberry Pi. Click to enlarge.<\/figcaption><\/figure>\n\n\n\n<p>Once you&#8217;ve opened a serial connection at 115200 bps, and press the spacebar a few times. You&#8217;ll get a login prompt like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Raspbian GNU\/Linux 8 raspberrypi ttyAMA0\nraspberrypi login:<\/pre>\n\n\n\n<p>Now you&#8217;re ready to log in.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Logging_In_To_The_Command_Line_Interface\"><\/span>Logging In To&nbsp;The Command Line Interface<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The default login for the Raspbian OS is <strong>pi<\/strong>, and the default password is <strong>raspberry<\/strong>. If you didn&#8217;t create a username and password of your own, you can use this. Use these to log into your Pi. When you&#8217;re logged in, you&#8217;ll get a prompt like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">The programs included with the Debian GNU\/Linux system are free software;\nthe exact distribution terms for each program are described in the\nindividual files in \/usr\/share\/doc\/*\/copyright.\n\nDebian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\npermitted by applicable law.\nLast login: Wed May 31 22:24:04 2017 \n\n\npi@rasbperrypi: ~ $\n<a name=\"configuring-system\"><\/a><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuring_Your_System\"><\/span>Configuring Your System<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Once you are logged in, you need to configure the operating system for general use. This includes changing the default password and administrative user, changing the default hostname, setting the interfacing options, and expanding the filesystem on the SD card. To start, type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo raspi-config<\/pre>\n\n\n\n<p><strong>Note:<\/strong> most of the commands you&#8217;ll use on the pi will be run though <em>sudo<\/em>, the <strong>su<\/strong>peruser <strong>do<\/strong> command. Sudo enables users to use administrative commands, making sure they&#8217;re a part of the system&#8217;s administrative users group, also called <em>sudo<\/em>. The system will ask for your password whenever you use sudo.<\/p>\n\n\n\n<p>You&#8217;ll get a menu which you can scroll through with the arrow keys and select items with the enter key, as shown below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/raspi-config.png\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"213\" src=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/raspi-config-300x213.png\" alt=\"Screenshot of the raspi-config main menu during installation.\" class=\"wp-image-70\" srcset=\"https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/raspi-config-300x213.png 300w, https:\/\/itp.nyu.edu\/networks\/wp-content\/uploads\/2017\/06\/raspi-config.png 650w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/a><figcaption class=\"wp-element-caption\">raspi-config main menu. Click to enlarge.<\/figcaption><\/figure><\/div>\n\n\n<p>Here are the most important things to take care of:<\/p>\n\n\n\n<p>First choose System Options. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In this menu, you should Change Password if you&#8217;re still using the default pi\/raspberry combination, and follow the prompts to change your password. If you made your own username with the <code>userconfig.txt<\/code> file, there&#8217;s no need to do this. <\/li>\n\n\n\n<li>You can also Change Hostname, and change the name of your system from <em>raspberrypi<\/em> to something meaningful to you. <\/li>\n\n\n\n<li>You can also set the SSID of your wireless network and the password, or follow the steps below if you&#8217;re using an enterprise network.<\/li>\n<\/ul>\n\n\n\n<p>Next choose Interfacing Options. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you didn&#8217;t make an ssh file on your SD card before booting, enable ssh. This will allow you to log in remotely via ssh.<\/li>\n\n\n\n<li>If you plan to use a camera, or the I2C or SPI buses to communicate with external hardware, enable those options. <\/li>\n<\/ul>\n\n\n\n<p> Finally choose Advanced Options, and expand the filesystem. This will make more room on your SD card for the system. This will finish by asking you to reboot your Pi. Choose Yes to reboot.<\/p>\n\n\n\n<p>From now on, if you&#8217;re using the ethernet-over-USB option or logging into your Pi over a network using ssh (which we&#8217;ll get to shortly), you&#8217;ll need to log into <em>your-username@your-pi-name.local<\/em> (change <em>your-pi-name<\/em>&nbsp;to the name you chose).<br><a name=\"changing-defaults\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Changing_Defaults_To_Increase_Security\"><\/span>Changing Defaults To Increase Security<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Anyone who&#8217;s used a Pi knows the default username (pi) and password (raspberry) and the default device name (raspberrypi), so it&#8217;s a good idea to &nbsp;change these to make your Pi harder to find and harder to break into. For more advice on security hardening your Pi, see <a href=\"http:\/\/www.nexuslite.com\/2015\/02\/05\/raspberry-pi-raspbian-security-hardening\/\">these tips<\/a>.<\/p>\n\n\n\n<p>First, if you didn&#8217;t use the userconfig.txt file above to make a custom user, you should add a new user. Change&nbsp;<em>username<\/em> below to a name you want to use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo adduser <em>username<\/em><\/pre>\n\n\n\n<p>This will ask you twice for a password for the new user and ask you to fill in some identifying details. You can skip any question by hitting enter. Next, add your new user to the <em>sudo<\/em> group so it can act as a superuser:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo adduser <em>username<\/em> sudo<\/pre>\n\n\n\n<p>To access some of the Pi&#8217;s hardware, you may need to add your new username to some other groups, as follows:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pi       User-specific group. A group is automatically created for \n         each new user; you can ignore this.\nadm      Allows access to log files in \/var\/log and using xconsole\ndialout  Allows access to serial ports\/modem reconfiguration, etc.\ncdrom    Enables access to optical drives.\nsudo     Enables sudo access for the user.\naudio    Allows access to audio devices like microphones and soundcards\nvideo    Allows access to a video devices, e.g. framebuffer, videocard, webcam\nplugdev  Enables access to external storage devices\ngames    Many games are SETGID to games so they can write their high score files.\nusers    A Pi-specific group enabling access to \n         \/opt\/vc\/src\/hello_pi\/ directory and contained files.\ninput    Appears to give access to the \/dev\/input\/mice folder and nothing else.\nnetdev   Enables access to network interfaces\ngpio     Pi-specific group for GPIO pin access.\ni2c      Pi-specific group for I2C access. \n         Generated after installing i2c-tools.\nspi      Pi-specific group for the SPI bus.<\/pre>\n\n\n\n<p>You can do this group by group with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo adduser <em>username<\/em> <em>groupname<\/em><\/pre>\n\n\n\n<p>or you can add many at a time like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi <em>username<\/em><\/pre>\n\n\n\n<p>For security reasons it&#8217;s a good idea to add as few groups as you actually need. So if your project only uses GPIO and SPI, for example, add those groups and not the others.<\/p>\n\n\n\n<p>When you&#8217;ve added your new user and given it permissions, log out by typing <code>logout<\/code> or <code>exit<\/code>, then log back in as the user you just created:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ssh username@your-pi-name.local<\/pre>\n\n\n\n<p>Now make sure the root account is disabled by locking it like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo passwd -l root<\/pre>\n\n\n\n<p>If you need to unlock it later you can do so by typing:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo passwd -u root<\/pre>\n\n\n\n<p>Next delete the default &nbsp;<em>pi<\/em> user like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo deluser --remove-home pi<\/pre>\n\n\n\n<p>You&#8217;ll get a message: <em>Warning: group `pi\u2019 has no more members.<\/em> Don&#8217;t worry. When you delete the pi account, the system will delete the corresponding pi group automatically. Now that the default <em>pi<\/em> user is gone, there&#8217;s less chance that someone will guess your username and gain access to your Pi.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuring_After_Changing_Users\"><\/span>Configuring After Changing Users<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Note that many software packages install per user, rather than system-wide, so it&#8217;s a good idea to make sure you&#8217;ve got the user configuration you want before you install firewalls, development software, or other tools you plan to use. You don&#8217;t want the nasty surprise of installing software as one user only to find it gone when you change users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Connecting_To_the_Network_via_WiFi\"><\/span><a name=\"connecting-to-network\"><\/a><br>Connecting To the Network via WiFi<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The Pi Zero W and the Pi 3 and Pi 4 and later models all have built-in WiFi and the drivers are included in the Raspbian distributions. To check that yours is working, type<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ iwconfig wlan0<\/pre>\n\n\n\n<p>If you get a response that begins like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wlan0 IEEE 802.11bgn Nickname:<\/pre>\n\n\n\n<p>Then you know the radio is there and working. If not, your Pi&#8217;s wifi might need to be unblocked. This is often the case with 5GHz radios like the Pi 3 B+, as the allowable frequencies are different from country to country, so the manufacturer sometimes ships units with the wifi disabled.&nbsp; If so, try this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo rfkill unblock wifi<\/pre>\n\n\n\n<p>Now try this command to see nearby WiFi hotspots:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ iwlist wlan0 scan | less<\/pre>\n\n\n\n<p>You will get a list of WiFi hotspots nearby and their credentials. It&#8217;s piped through &nbsp;the <em>less<\/em> utility&nbsp;to paginate it. You should see a list of all nearby WiFi access points, with their details. You can see the listings page by page using the spacebar, and close the list by typing&nbsp;<em>q<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Getting_the_MAC_address_of_the_Pis_WiFi_Radio\"><\/span>Getting the MAC address of the Pi&#8217;s WiFi Radio<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You might also need the MAC address of your Pi in order to connect to an institutional network. For example, you can&#8217;t connect a Pi at ITP  until you&#8217;ve registered its MAC address at <a href=\"https:\/\/computer.registration.nyu.edu\">computer.registration.nyu.edu<\/a>. To get the MAC address of your Pi&#8217;s WiFi, type the following once you&#8217;re logged in:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ifconfig wlan0 | grep ether<\/pre>\n\n\n\n<p>You&#8217;ll get a response like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ether b8:27:eb:aa:bb:cc txqueuelen 1000 (Ethernet)<\/pre>\n\n\n\n<p>Take that MAC address and register it with your institution. Then modify the <em>wpa_supplicant.conf<\/em> file to connect to the institution&#8217;s network as explained below. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Network_Configuration_by_Editing_wpa_supplicantconf\"><\/span>Network Configuration by Editing wpa_supplicant.conf<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you didn&#8217;t set the network name and password using the raspi-config tool, you can do it like so: Create a file called <em>wpa_supplicant.conf<\/em> that stores your wifi configuration. It belongs in the <code>\/etc\/wpa_supplicant<\/code> directory. To create or edit it, type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">$ sudo nano \/etc\/wpa_supplicant\/wpa_supplicant.conf<\/pre>\n\n\n\n<p>You should see something like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ctrl_interface=DIR=\/var\/run\/wpa_supplicant GROUP=netdev\nupdate_config=1\ncountry=GB\n\nnetwork={\n        ssid=\"your_network_name\"\n        psk=\"your_password\"\n}\n<\/pre>\n\n\n\n<p>You never want to store your password in plaintext, so you should generate an encrypted version (called a <em>hash<\/em>) of your password like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$&nbsp;wpa_passphrase your_network_name your_password<\/pre>\n\n\n\n<p>This will generate a response like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">network={\n ssid=\"your_network_name\"\n #psk=\"your_password\"\n psk=6a24edfec4d204601b6e1f409630702...\n}<\/pre>\n\n\n\n<p>Delete the line with your password in plaintext, then use this in place of the <code>network={...}<\/code> block in the <em>wpa_supplicant.conf <\/em>file and you should be good to go. The <em>wpa_supplicant.conf<\/em> file can contain network blocks for multiple networks, so if you want to add your home network as well, you can. On startup, the Pi will go through the list and try to connect to each one in turn, stopping when it succeeds. So if you have two networks available in one location, then make sure to put the default one first.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuring_For_An_Enterprise_Network\"><\/span>Configuring For An Enterprise Network<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>If you&#8217;re connecting to an enterprise network like the one at NYU, your network configuration is a bit more complex. If you don&#8217;t need to do this, skip to the next section. <\/p>\n\n\n\n<p>Many enterprise networks use the Protected Extensible Authorization Protocol, or PEAP, to manage multiple user logins. Here&#8217;s the wpa_supplicant.conf file for a PEAP network using MSCHAPv2, a common authentication protocol used with PEAP:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ctrl_interface=DIR=\/var\/run\/wpa_supplicant GROUP=netdev\nupdate_config=1\ncountry=US\n\nnetwork={\n  ssid=\"network_name\"\n  key_mgmt=WPA-EAP\n  eap=PEAP\n  proto=WPA2\n  phase2=\"auth=MSCHAPV2\"\n  anonymous_identity=\"your_username\"\n  identity=\"your_username\"\n  password=your_password\n}\n<\/pre>\n\n\n\n<p>Put your network name in for the ssid and your username for the anonymous_identity and the identity. Again, notice that the username and password are stored in cleartext. To make a hash for the password this time, do the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ echo -n your_password | iconv -t utf16le | openssl md4\n<\/pre>\n\n\n\n<p>You&#8217;ll get a reply like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(stdin)= dad3329614566332455803ad3b...\n<\/pre>\n\n\n\n<p>Replace <em>your_password<\/em> in the <em>wpa_config.conf<\/em> with this hash like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">  password=hash:dad3329614566332455803ad3b...\n<\/pre>\n\n\n\n<p>Once that&#8217;s set, you&#8217;ve enabled your Raspberry Pi to access the network configuration you set up, and you&#8217;ve saved the configuration to disk. The WiFi radio should start scanning for networks. You can check that you&#8217;re connected using ifconfig wlan0 and iwconfig wlan0 as you did before.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Connecting_Via_WiFi_and_ssh\"><\/span>Connecting Via WiFi and ssh<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To connect via WiFi and ssh instead of serial, you need to have created the ssh file and the <code>wpa_supplicant.conf<\/code> file mentioned above. Your Pi should connect to the network that you configured it for after it boots up. This might take a minute or two. When the Pi is booted up, make sure your personal computer is on the same WiFi network, then open the command line interface on your personal computer and type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh username@your-pi-name.local<\/pre>\n\n\n\n<p>Alternately, you can use the IP address of your Pi if you know it, instead of raspberrypi.local. You should get a response like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">username@your-pi-name.local's password:<\/pre>\n\n\n\n<p>Enter your password and you&#8217;ll be logged in.<br><a name=\"logging-in\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Testing_Your_Network_Connection_with_curl\"><\/span>Testing Your Network Connection with curl<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You can test your network connection by making a web request. The command line program <em>curl<\/em> is a good way to do this. Type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ curl http:\/\/www.example.com\n<\/pre>\n\n\n\n<p>You should get a response that includes a lot of HTML,<br>ending with the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;body&gt;\n &lt;div&gt;\n &lt;h1&gt;Example Domain&lt;\/h1&gt;\n nts. You may use this\n domain in examples without prior coordination or asking\n for permission.&lt;\/p&gt;\n &lt;p&gt;&lt;a href=\"http:\/\/www.iana.org\/domains\/example\"&gt;More\n information...&lt;\/a&gt;&lt;\/p&gt;\n &lt;\/div&gt;\n &lt;\/body&gt;\n &lt;\/html&gt;<\/pre>\n\n\n\n<p>If you got this result, your Raspberry Pi is now connected to the internet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Deleting_Your_History_File\"><\/span>Deleting Your History File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>At this point you have entered some sensitive information on the command line (like your passwords) and it gets saved in a file called <code>.bash_history.<\/code> To see this file, type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo less ~\/.bash_history<\/pre>\n\n\n\n<p>You can scroll through and see everything you&#8217;ve typed. This is useful, because you can just hit the up arrow on the command line to repeat older commands, but it&#8217;s also a security risk. You may notice the line where you typed in your password, for example. You can open this file with the nano text editor and delete any line with cmd-k. To save and close the file, type cmd-x, then y to confirm the change.<a name=\"updating-system\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Updating_the_Operating_System\"><\/span>Updating the Operating System<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Next you should upgrade the operating system to make sure you have the latest patches for all the software in it. Make sure you&#8217;re connected to the internet, because you&#8217;re going to update the list of installed software packages and upgrade them from the Raspbian package repository. You&#8217;ll use APT, the advanced packaging tool, to do this, via its <em>apt-get<\/em> utility. Each of these commands will take a long time. Type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt update<\/pre>\n\n\n\n<p>You should get this message at the end:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Reading package lists... Done<\/pre>\n\n\n\n<p>If you get an error, check your network connection. The most likely error is that it didn&#8217;t get all the updates&nbsp;because it didn&#8217;t have a network connection. If it says you don&#8217;t have enough disk space, make sure you expanded the filesystem using&nbsp;<em>raspi-config<\/em>&nbsp;earlier. When you&#8217;ve updated the package lists,&nbsp;Type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt upgrade<\/pre>\n\n\n\n<p>This will upgrade any installed software packages. This will take even longer than the update, and will ask you to confirm that you want to upgrade all the software. Type <em>y<\/em> to do so. Once this is complete, you&#8217;ll have the latest versions of all the tools in your Raspbian distribution.<br><a name=\"configuring-a-firewall\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuring_a_Firewall\"><\/span>Configuring a Firewall<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you&#8217;re connecting to the internet, it&#8217;s wise to set up a firewall to control incoming and outgoing network connections. Understanding network ports and connections is a topic larger than this tutorial can cover. For now, we&#8217;ll assume you know that networked devices connect to each other on ports, that ports are numbered and can be incoming or outgoing, and that network traffic can use a number of transport protocols, most commonly TCP and UDP.<\/p>\n\n\n\n<p>The firewall rules explained here will block access to all incoming traffic except that on port 22, which is the standard port for ssh connections; &nbsp;ports 80, 443, which are the standard ports HTTP traffic; and port 8080, which is a common port for node.js servers. Based on this example, you should be able to add or delete ports to your firewall configuration when you need them.<\/p>\n\n\n\n<p>For more on ufw, see<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.linux.com\/learn\/introduction-uncomplicated-firewall-ufw\">An Introduction to ufw<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wiki.debian.org\/Uncomplicated%20Firewall%20%28ufw%29\">Debian ufw wiki page<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/linode.com\/docs\/security\/firewalls\/configure-firewall-with-ufw\/\">How to Configure a Firewall with ufw<\/a><\/li>\n<\/ul>\n\n\n\n<p>First you need to install ufw. Assuming you&#8217;ve updated your package manager, start by installing ufw:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">$ sudo apt install ufw<\/pre>\n\n\n\n<p>Once it&#8217;s installed, you can set defaults to allow outgoing traffic and deny incoming:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">$ sudo ufw default allow outgoing\n$ sudo ufw default deny incoming<\/pre>\n\n\n\n<p>This would disconnect your ssh connection if you enabled it now, so you might want to enable ssh connections before you enable the firewall. The following line will enable TCP connections on port 22, the default ssh port:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">$ sudo ufw allow ssh<\/pre>\n\n\n\n<p>If you&#8217;re planning to run an HTTP server, or an HTTPS server, you&#8217;ll need to enable them as well. You can specify not only the application (http, https), but also the transport protocol, like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">$ sudo ufw allow http\/tcp\n$ sudo ufw allow https\/tcp<\/pre>\n\n\n\n<p class=\"p1\"><span class=\"s1\">More specific rules ensure that someone won&#8217;t try a sneaky attack like flooding UDP packets through your open HTTP ports. If you&#8217;re planning to do custom server development, you might want to enable the ports you&#8217;ll use for that as well. These settings are typical for node.js development.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">$ sudo ufw allow 8080\/tcp\n$ sudo ufw allow 8081\/tcp<\/pre>\n\n\n\n<p>Port 8081 is used by the p5.serialserver, which is common at ITP.<\/p>\n\n\n\n<p>If you plan to use VNC  to connect to the Pi desktop remotely, you&#8217;ll need to enable port 5900 as well.<\/p>\n\n\n\n<p>Once you&#8217;ve configured your firewall, you enable it like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo ufw enable<\/pre>\n\n\n\n<p class=\"p1\">You should reboot once you do this, to check that everything is in order. Once enabled, you can get a status report from ufw like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">$ sudo ufw status<\/pre>\n\n\n\n<p>You should get a reply like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">Status: active\n\nTo                         Action      From\n--                         ------      ----\n22\/tcp                     ALLOW       Anywhere                  \n80\/tcp                     ALLOW       Anywhere                  \n443\/tcp                    ALLOW       Anywhere                  \n8080\/tcp                   ALLOW       Anywhere                  \n8081\/tcp                   ALLOW       Anywhere                  \n22\/tcp (v6)                ALLOW       Anywhere (v6)             \n80\/tcp (v6)                ALLOW       Anywhere (v6)             \n443\/tcp (v6)               ALLOW       Anywhere (v6)             \n8080\/tcp (v6)              ALLOW       Anywhere (v6)             \n8081\/tcp (v6)              ALLOW       Anywhere (v6)  \n<\/pre>\n\n\n\n<p>Now you&#8217;ve got a reasonably secure setup for a networked device.<a name=\"installing-node\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Updating_your_Programming_Environment\"><\/span>Updating your Programming Environment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now that you&#8217;ve got the operating system installed and upgraded and the network connections in place, the next step is to make sure you have the right programming tools in place. At ITP, node.js is&nbsp;a&nbsp;popular development environment for networked applications. You&#8217;ll also want to install git, since it&#8217;s used frequently for software version management. If you don&#8217;t want to use node.js, the section below about git and the package manager may still be useful.<\/p>\n\n\n\n<p><strong>Note:<\/strong> make sure you&#8217;ve created a unique user before you install custom software like this. Also, many open source software packages (like node.js) compile after download, so do your software config on the fastest Pi you can. You can always transfer your SD card to a slower Pi.<\/p>\n\n\n\n<p>To check if any software tool is already installed, you can use the which command like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ which git<\/pre>\n\n\n\n<p>You&#8217;ll get a reply like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/bin\/git<\/pre>\n\n\n\n<p>If you get no reply, then the software is not installed. You can check if the software is listed in the package repository like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$&nbsp;sudo apt-cache show <em>packageName<\/em><\/pre>\n\n\n\n<p>Replace <em>packageName<\/em> with the name of the package you&#8217;re looking for. If it&#8217;s there, you&#8217;ll get all the details on it, and you can install it using apt-get, like you&#8217;ll do for git next. &nbsp;Install git like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install git<\/pre>\n\n\n\n<p>This will automatically install the&nbsp;version of git that&#8217;s listed in the Raspbian package list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Upgrading_nodejs\"><\/span>Upgrading node.js<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In this section, you&#8217;ll remove the installed version of node.js from the Rasbpian distribution and upgrade &nbsp;to a more modern version. First, remove all node and npm files already on your Pi. These instructions come from <a href=\"https:\/\/github.com\/sdesalas\/node-pi-zero\">this gitHub repo<\/a>. Note that node.js stopped support for the processor on the Pi Zero as of version 12.0.0, so you&#8217;ll use an older version:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ wget -O - https:\/\/raw.githubusercontent.com\/sdesalas\/node-pi-zero\/master\/install-node-v16.3.0.sh <span class=\"pl-k\">|<\/span> bash<\/pre>\n\n\n\n<p>Check the version of node.js that you installed like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ node --version<\/pre>\n\n\n\n<p>You should get this reply:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted p1\">v16.3.0<\/pre>\n\n\n\n<p>Now you&#8217;ve got a working, reasonably secure Pi, and a programming environment with which to program it. Congratulations! Finally, reboot or shutdown:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo reboot<\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo poweroff<a name=\"backing-up\"><\/a><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Back_Up_Your_Custom_Installation\"><\/span>Back Up Your Custom Installation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>At this point you may want to make a copy of the SD card using Etcher as you did at the beginning. Then you&#8217;ll have&nbsp;a customized image on which you can build other things. Since you&#8217;ll likely customize your system further for each application, it&#8217;s helpful to have a base installation from which to start. The <a href=\"https:\/\/www.tweaking4all.com\/hardware\/raspberry-pi\/applepi-baker-v2\/#InstallingApplePiBaker\">ApplePiBaker<\/a> app makes it easy for MacOS users to do backups simply. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Remote_File_Access\"><\/span>Remote File Access<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Remote file editing can be a pain on a Pi. If you&#8217;re using <a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a>, here&#8217;s a set of <a href=\"https:\/\/medium.com\/@prtdomingo\/editing-files-in-your-linux-virtual-machine-made-a-lot-easier-with-remote-vscode-6bb98d0639a4\">instructions for the remote VSCode plugin<\/a> that works well on the Pi. They have to be on the same network, but it can make editing much easier. Here&#8217;s the summary version:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Visual Studio Code on your personal computer and run it<\/li>\n\n\n\n<li>Click the Extensions icon in the right side toolbar and search for Remote VSCode. Install it and relaunch VS Code.<\/li>\n\n\n\n<li>On your Pi, install rmate like so:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo wget -O \/usr\/local\/bin\/rmate https:\/\/raw.github.com\/aurora\/rmate\/master\/rmate<br><br>$ sudo chmod a+x \/usr\/local\/bin\/rmate<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In VS Code, Open the command palette (CTRL+P for Windows,  CMD+P for MacOS) and type<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt;Remote: Start Server<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This will start the VSCode live share server. <\/li>\n\n\n\n<li>Get your Pi&#8217;s IP address. <\/li>\n\n\n\n<li>Now open the terminal pane in VS code (CTRL+` for MacOS and Windows) and type (replace PI_IP_ADDR with the Pi&#8217;s IP address):<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ssh -R 52698:localhost:52698 PI_IP_ADDR\n<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This will log your computer into your Pi. You can then use rmate to open and edit files. For example, if there&#8217;s a file called <em>myFile.txt<\/em>, you can edit it by typing <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">$ rmate myFile.txt<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The file will open in VSCode, and you can edit and save, and it&#8217;ll automatically get saved on the Pi. Simple!<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>There are many guides to setting up a Raspberry Pi available on the web. This one is geared toward projects at ITP. It assumes you&#8217;re interested in working with the Pi mainly through the command line interface, and don&#8217;t want to have to set up a monitor and keyboard every time you use your Pi. &hellip; <a href=\"https:\/\/itp.nyu.edu\/networks\/setting-up-a-raspberry-pi\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Setting Up A Raspberry Pi&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-66","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages\/66"}],"collection":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":93,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages\/66\/revisions"}],"predecessor-version":[{"id":1259,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages\/66\/revisions\/1259"}],"wp:attachment":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/media?parent=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}