{"id":16856123,"url":"https://github.com/peterblazejewicz/raspberry-pi-setup","last_synced_at":"2025-04-11T07:40:07.072Z","repository":{"id":151364151,"uuid":"105460756","full_name":"peterblazejewicz/raspberry-pi-setup","owner":"peterblazejewicz","description":"Setting up a Raspberry PI (mostly relevant to macOS/linux)","archived":false,"fork":false,"pushed_at":"2021-05-31T18:54:34.000Z","size":23,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-14T14:08:11.266Z","etag":null,"topics":["configuration","docker","nodejs","raspberry-pi","raspberry-pi-zero"],"latest_commit_sha":null,"homepage":"https://peterblazejewicz.github.io/raspberry-pi-setup/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterblazejewicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-01T17:40:16.000Z","updated_at":"2024-03-30T22:13:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"75da507b-7d54-40dc-ba1f-5ac0541d707d","html_url":"https://github.com/peterblazejewicz/raspberry-pi-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterblazejewicz%2Fraspberry-pi-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterblazejewicz%2Fraspberry-pi-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterblazejewicz%2Fraspberry-pi-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterblazejewicz%2Fraspberry-pi-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterblazejewicz","download_url":"https://codeload.github.com/peterblazejewicz/raspberry-pi-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248359182,"owners_count":21090490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration","docker","nodejs","raspberry-pi","raspberry-pi-zero"],"created_at":"2024-10-13T14:02:24.846Z","updated_at":"2025-04-11T07:40:07.048Z","avatar_url":"https://github.com/peterblazejewicz.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry PI setup\n\nSetting up a Raspberry PI (macOS)\n\n## Topics\n\n- [Formatting SD card](#formattingsd-card)\n- [Flashing OS](#flashing-os)\n- [Boot Configuration](#boot-configuration)\n- [WIFI](#wifi)\n- [Bluetooth](#bluetooth)\n- [SSH](#enable-ssh)\n- [OS Version Check](#os-version-check)\n- [Updates](#updateupgrade-setup)\n- [Upgrades](#updateupgrade-setup)\n- [Space Cleanup](#space-cleanup)\n- [Text Based Browsers](#text-based-browsers)\n- [VNC Server (RealVNC)](#enabling-vnc-server)\n- [Vim](#vim)\n- [USB Access](#enable-usb-access)\n- [TensorFlow](#tensorflow)\n- [Docker](#docker-support)\n- [NodeJS](#node-support)\n- [Hostname](#hostname-change)\n- [Password](#password-change)\n- [Network Connection over USB](#network-connection-over-usb)\n- [Audio](#audio)\n- [MongoDB](#mongodb)\n- [Running and Debugging Python Code](#running-and-debugging-python-code)\n- [SSH Chrome Extension](#ssh-chrome-extension)\n- [PiCamera Stream](#picamera-stream)\n- [GitHub](#github)\n\n## Formatting SD card\n\n```bash\ndiskutil list\n```\n\nFind partition with with `external`, `physical` properties on the list.\n\n```bash\nsudo diskutil eraseDisk FAT32 BACKUP MBRFormat /dev/disk2\nPassword:\nStarted erase on disk2\nUnmounting disk\nCreating the partition map\nWaiting for partitions to activate\nFormatting disk2s1 as MS-DOS (FAT32) with name BACKUP\n512 bytes per physical sector\n/dev/rdisk2s1: 31085888 sectors in 1942868 FAT32 clusters (8192 bytes/cluster)\nbps=512 spc=16 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=2 drv=0x80 bsec=31116286 bspf=15179 rdcl=2 infs=1 bkbs=6\nMounting disk\nFinished erase on disk2\n```\n\n## Flashing OS\n\n[https://etcher.io/](https://etcher.io/)\n\n## Boot Configuration\n\n```bash\n cd /Volumes/boot\n➜  boot\ntouch wpa_supplicant.conf\nvim wpa_supplicant.conf\n```\n\n```bash\ncd D:\\\nni -Type File wpa_supplicant.conf\nvim .\\wpa_supplicant.conf\n```\n\n### WiFi\n\n#### Content of `wpa_supplicant.conf`\n\n```text\nctrl_interface=DIR=/var/run/wpa_supplicant\nupdate_config=1\ncountry=PL\n\nnetwork={\n    ssid=\"YOURSSID\"\n    psk=\"YOURPASSWORD\"\n}\n```\n\n#### Disable WiFi on boot\n\nOn device with built-in WiFi add a line `dtoverlay=pi3-disable-wifi` to boot\nconfiguration:\n\n```bash\ncd /Volumes/boot\nsudo vim config.txt\n```\n\nRef.: [https://git.io/vFje3](https://git.io/vFje3)\n\n### Bluetooth\n\n#### Disable Bluetooth on boot\n\nOn device with built-in Bluetooth add a line `dtoverlay=pi3-disable-bt` to boot\nconfiguration:\n\n```bash\ncd /Volumes/boot\nsudo vim config.txt\n```\n\nRef.: [dtoverlay=pi3-disable-bt](dtoverlay=pi3-disable-bt)\n\n### Enable SSH\n\n```bash\ntouch ssh\n```\n\n```bash\nni -Type File ssh\n```\n\n## Connecting\n\n### Verify WIFI\n\n```bash\nping -c 3 raspberrypi.local\nPING raspberrypi.local (192.168.1.20): 56 data bytes\n64 bytes from 192.168.1.20: icmp_seq=0 ttl=64 time=12.041 ms\n64 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=19.085 ms\n64 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=11.659 ms\n\n--- raspberrypi.local ping statistics ---\n3 packets transmitted, 3 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 11.659/14.262/19.085/3.414 ms\n```\n\n### Connect via SSH\n\n```bash\nssh pi@raspberrypi.local\n```\n\nDefault password: **raspberry**\n\nYou could eventually update your SSH fingerprints:\n\n```bash\nssh-keygen -R raspberrypi.local\nssh pi@raspberrypi.local\n```\n\n### OS Version Check\n\nChecking installed OS version from comandline:\n\n```bash\ncat /etc/os-release\n\nPRETTY_NAME=\"Raspbian GNU/Linux 9 (stretch)\"\nNAME=\"Raspbian GNU/Linux\"\nVERSION_ID=\"9\"\nVERSION=\"9 (stretch)\"\nID=raspbian\nID_LIKE=debian\nHOME_URL=\"http://www.raspbian.org/\"\nSUPPORT_URL=\"http://www.raspbian.org/RaspbianForums\"\nBUG_REPORT_URL=\"http://www.raspbian.org/RaspbianBugs\"\n```\n\n### Update/Upgrade setup\n\n* Update\n\n```bash\nsudo apt-get update\n```\n\n* Then Upgrade\n\n```bash\nsudo apt-get dist-upgrade\n```\n\n* [Optional] Cleanup\n\n```bash\nsudo apt-get clean\n```\n\n## Text Based Browsers\n\nWhen running on lite edition (or just when booting into CLI mode) the text browsers are tremendous help sometimes.\n\n### Elinks\n\n```bash\nsudo apt-get install elinks\n```\n\n### Lynx\n\n```bash\nsudo apt-get install lynx\n```\n\n```bash\nlynx https://www.raspberrypi.org/\n```\n\n\n## Enabling VNC Server\n\n* Install/Reinstall VNC server in one go:\n\n```bash\nsudo apt-get update\nsudo apt-get install realvnc-vnc-server realvnc-vnc-viewer\n```\n\n* Enable VNC server in `raspi-config`:\n\n```bash\nsudo raspi-config\n```\n\n\u003e Interfacing Options \u003e VNC \u003e Would you like the VNC Server to be enabled? \u003e Yes\n\u003e The VNC Server is enabled\n\nLet the PI reboot\n\n* Start VNC server manually:\n\n```bash\nsudo systemctl start vncserver-x11-serviced.service\n```\n\n* Stop VNC manually:\n\n```bash\nsudo systemctl stop vncserver-x11-serviced.service\n```\n\n* To stop VNC server from running at boot:\n\n```bash\nsudo systemctl disable vncserver-x11-serviced.service\n```\n\n## Vim\n\n### Install Vim\n\n```bash\nsudo apt-get install vim\n```\n\n### Syntax Highlighting in Vim\n\n```txt\n\" Vim5 and later versions support syntax highlighting. Uncommenting the next\n\" line enables syntax highlighting by default.\n\"syntax on\n```\n\n```bash\nsudo vim /etc/vim/vimrc\n```\n\nand removes quotes before `syntax on`.\n\n### Plugin Manager for Vim\n\nThe [vim-plug](https://github.com/junegunn/vim-plug) is used here.\n\n#### Installation\n\n```bash\ncurl -fLo ~/.vim/autoload/plug.vim --create-dirs \\\n    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\n```\n\nNow configure `Vim` configuration file to support plugins with `vim-plug`:\n\n```.virmrc\n\" Star of plugin section\n\" Specify a directory for plugins\n\" - Avoid using standard Vim directory names like 'plugin'\ncall plug#begin('~/.vim/plugged')\n\" Make sure you use single quotes\n\n\" Initialize plugin system\ncall plug#end()\n\" end of plugin section\n```\n\nExample setup:\n\n```.vimrc\n\" Star of plugin section\n\" Specify a directory for plugins\n\" - Avoid using standard Vim directory names like 'plugin'\ncall plug#begin('~/.vim/plugged')\n\" Make sure you use single quotes\n\nPlug 'scrooloose/syntastic'\n\nPlug 'tpope/vim-fugitive'\n\nPlug 'pangloss/vim-javascript'\n\nPlug 'scrooloose/nerdtree'\n\nPlug 'tpope/vim-surround'\n\nPlug 'bling/vim-airline'\n\nPlug 'flazz/vim-colorschemes'\n\n\" Initialize plugin system\ncall plug#end()\n\" end of plugin section\n```\n\nFor details see:\n[`vim-plug` installation](https://github.com/junegunn/vim-plug#installation)\n\n![Vim with plugins](https://user-images.githubusercontent.com/14539/33233250-05242628-d213-11e7-82c0-2753e6ccdc70.png)\n\n## Enable USB access\n\n* Edit `config.txt`:\n\n```bash\ncd /boot/\nsudo vim config.txt\n```\n\nAdd a line on the end:\n\n```text\ndtoverlay=dwc2\n```\n\n* Creaty empty `ssh` file if not yet created in `/boot/` directory:\n\n```bash\ntouch ssh\n```\n\n* Edit `cmdline.txt`:\n\n```bash\nsudo vim cmdline.txt\n```\n\nAdd a config item `modules-load=dwc2,g_ether` after `rootwait`:\n\n```text\nrootwait modules-load=dwc2,g_ether\n```\n\nThe content of `cmdline.txt` after modification:\n\n```text\ndwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=4cc82cbf-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet splash plymouth.ignore-serial-consoles\n```\n\n## Docker support\n\n### Docker Installation\n\nDocker support is now official with Raspbian Jessie:\n\n```bash\nSUPPORT_MAP=\"\n...\narmv6l-raspbian-jessie\n...\n```\n\n```bash\ncurl -sSL https://get.docker.com | sh\n```\n\nVerify installation:\n\n```bash\nsudo docker run hello-world\n```\n\n### Removing elevated requirement\n\n```bash\nsudo usermod pi -aG docker\nlogout\n```\n\n(and start your terminal session again, e.g. using SSH)\n\n### Example Dockerfile built and run on device\n\nHere is an example of using custom built Docker image to use Blinkt pHAT:\n\n```Dockerfile\nFROM resin/rpi-raspbian:jessie\n\n# dependencies\nRUN apt-get update -qy\nRUN apt-get install -qy python3\nRUN apt-get install -qy python3-pip\nRUN apt-get install -qy python3-rpi.gpio\n# Cancel out any Entrypoint already set in the base image.\nENTRYPOINT []\n\n# Blinkt\nRUN apt-get install -qy python3-blinkt\n\n# app code dependecies\n\nRUN pip3 install request\n\nWORKDIR /root/\n\n# COPY library  library\n# WORKDIR /root/library\n# RUN python3 setup.py install\n# RUN pip3 install request\n\nWORKDIR /root/\nCOPY examples   examples\nWORKDIR /root/examples/\n# install app specific  requirements (can be cached already)\nRUN pip3 install -r requirements.txt\n# code\nCMD [\"python3\", \"cheerlights.py\"]\n```\n\n## Node Support\n\n### RaspberryPi\n\nAdd support for official relase packages:\n\n```bash\ncurl -sL https://deb.nodesource.com/setup_10.x | sudo bash -\n```\n\nTo install Node and NPM:\n\n```bash\nsudo apt-get install -y nodejs\n```\n\nYou would probably need this dev tools for some native extensions:\n\n```bash\nsudo apt-get install gcc g++ make\n```\n\nIf you need Yarn:\n\n```bash\ncurl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -\necho \"deb https://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list\nsudo apt-get update \u0026\u0026 sudo apt-get install yarn\n```\n\n### PiZero\n\nThis will install latest version (https://github.com/sdesalas/node-pi-zero):\n\n```bash\nwget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v.last.sh | bash\n```\n\nThis will produce:\n\n```bash\nwget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v.last.sh | bash\n--2017-11-25 18:05:45--  https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v.last.sh\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 1703 (1.7K) [text/plain]\nSaving to: ‘STDOUT’\n\n-                                       100%[===============================================================================\u003e]   1.66K  --.-KB/s   in 0.001s\n\n2017-11-25 18:05:46 (1.26 MB/s) - written to stdout [1703/1703]\n\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100   99k  100   99k    0     0  75234      0  0:00:01  0:00:01 --:--:-- 75282\n--2017-11-25 18:05:48--  https://nodejs.org/dist/v9.2.0/node-v9.2.0-linux-armv6l.tar.gz\nResolving nodejs.org (nodejs.org)... 104.20.23.46, 104.20.22.46, 2400:cb00:2048:1::6814:172e, ...\nConnecting to nodejs.org (nodejs.org)|104.20.23.46|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 16896011 (16M) [application/gzip]\nSaving to: ‘node-v9.2.0-linux-armv6l.tar.gz’\n\nnode-v9.2.0-linux-armv6l.tar.gz         100%[===============================================================================\u003e]  16.11M   878KB/s   in 27s\n\n2017-11-25 18:06:16 (619 KB/s) - ‘node-v9.2.0-linux-armv6l.tar.gz’ saved [16896011/16896011]\n```\n\n```bash\n$ node --version\nv9.2.0\n```\n\n### Yarn support\n\nThe generic installation script works without a problem. See\n[Yarn Installation](https://yarnpkg.com/en/docs/install#alternatives-tab):\n\n```bash\ncurl -o- -L https://yarnpkg.com/install.sh | bash\n```\n\n```bash\nyarn --version\n1.3.2\n```\n\n## Hostname Change\n\nEdit configuraction file:\n\n```bash\nsudo vim /etc/hostname\n```\n\n```bash\nsudo /etc/init.d/hostname.sh\nsudo reboot\n```\n\n## Password Change\n\n\u003e This is a security risk - please login as the 'pi' user and type 'passwd' to\n\u003e set a new password.\n\n```bash\npasswd\n```\n\n## Network Connection Over USB\n\nOn your Mac OS go to `\u003eSystem Preferences \u003e Sharing`, select correction\ninterface in `Share your connection from` dropdown. Then select `To Computer\nUsing` \u003e `RNDIS/Ethernet Gadget` and finally enable `Internet Sharing` service.\n\nVerify connection from your Raspberry PI:\n\n```bash\nping -c 3 google.com\n```\n\n## Audio\n\n### Setup\n\n* Write down your plugged device card and device number:\n\n```bash\narecord -l\n```\n\n* Write down your plugged device card and device number:\n\n```bash\naplay -l\n```\n\n* create and edit configuration in `/home/pi`:\n\n```bash\ntouch /home/pi/.asoundrc\nsudo vim /home/pi/.asoundrc\n```\n\n* add default configuration for sound interface based on previous steps results.\n  Example for Sound Blaster Audio card:\n\n```text\npcm.!default {\n  type asym\n  capture.pcm \"mic\"\n  playback.pcm \"speaker\"\n}\npcm.mic {\n  type plug\n  slave {\n    pcm \"hw:1,0\"\n  }\n}\npcm.speaker {\n  type plug\n  slave {\n    pcm \"hw:1,0\"\n  }\n}\n```\n\nVerify setup by running `speaker-test`:\n\n```bash\nspeaker-test -t wav\n```\n\n## TensorFlow\n\nGoogle now ships precompiled wheels of the `TensorFlow` for both arm7/arm6 architecture. Look into dedicated docs. The `TensorFlow` is ready for use stright after installation.\n\n[Install TensorFlow on Raspbian](https://www.tensorflow.org/install/install_raspbian)\n\n\u003e Python 2 version does not support precompiled wheels so expect longer installation\n\n```bash\nCollecting tensorflow\n  Downloading https://www.piwheels.org/simple/tensorflow/tensorflow-1.9.0-cp35-none-linux_armv6l.whl (62.8MB)\n    100% |████████████████████████████████| 62.8MB 1.4kB/s\n```\n\n## MongoDB\n\n```bash\nsudo apt-get update\nsudo apt-get upgrade\nsudo apt-get install mongodb-server\n```\n\nTo allow connection from other machine\n[bind to local network address](https://docs.mongodb.com/manual/reference/configuration-options/):\n\n```bash\nsudo vim /etc/mongodb.conf\n```\n\n```txt\nbind_ip = 127.0.0.1,192.168.1.13\n```\n\n## Services Status Check\n\nIf you installed any component as a service and you are interested to check\ntheir current status:\n\n```bash\nsudo service {SERVICE_NAME} status\n```\n\nor list all services statuses:\n\n```bash\nsudo service --status-all\n```\n\nHere it lists `MongoDB` service as not running:\n\n```bash\n [ + ]  kmod\n [ + ]  lightdm\n [ - ]  mongodb\n [ - ]  motd\n [ - ]  mountall-bootclean.sh\n [ - ]  mountall.sh\n```\n\n## Increase Swap File Size\n\nSometimes when compiling from the source it is usefull to increase swap file\nsize for the duration of the build:\n\n```bash\nsudo vim /etc/dphys-swapfile\n```\n\nChange from defualt `CONF_SWAPSIZE=100` to `CONF_SWAPSIZE=2048`\n\nRestart swap file service:\n\n```bash\nsudo /etc/init.d/dphys-swapfile stop\nsudo /etc/init.d/dphys-swapfile start\n...\nfree -m\n             total       used       free     shared    buffers     cached\nMem:           434        284        149          4         20        173\n-/+ buffers/cache:         90        343\nSwap:         2047          0       2047\n```\n\n## Update Python version\n\nRef.:\n[Installing Python 3.6 on Raspbian](https://gist.github.com/dschep/24aa61672a2092246eaca2824400d37f)\n\n## Install TMUX\n\n[tmux wiki](https://github.com/tmux/tmux/wiki) When using SSH you could detach\ncurrent session to background using `tmux`:\n\n[tmux cheatsheet](https://gist.github.com/MohamedAlaa/2961058)\n\n## Backup SD Card\n\n```bash\nsudo dd if=/dev/disk2 of=~/Desktop/backup.img\n```\n\nwhere `/dev/disk2` is a name of a mounted sd card, `~/Desktop/backup.img` is a\nlocation of the backup file to be created. After the backup image has been\ncreated use Etcher to flush it to new sd card.\n\n## Running And Debugging Python Code\n\nWhen using PyCharm you can configure it to:\n\n* sync your local changes with remote device\n* run/debug on remote device\n\n[Remote Development on Raspberry Pi](https://nathanpjones.com/2016/02/remote-debug-gpio-on-raspberry-pi/)\n\nWhen installing dependencies native to Linux (e.g. one that requires GPIO) you could:\n\n```bash\npip install blinkt --no-deps\n```\n\nThe same option works in PyCharm install library dialog. This allows to develop on machine without native features that are specific to device.\n\n## SSH Chrome Extension\n\nYou can connet to your PI device from any other device using Chrome and Google's SSH app extension:\n\n[Secure Shell App](https://chrome.google.com/webstore/detail/secure-shell-app/pnhechapfaindjhompbnflcldabbghjo)\n\n![Secure Shell App Image](https://lh3.googleusercontent.com/gfecjGFvIsMxm_l0KKHiHRutVpea9XXJMYZzkacT-mQEE95sLp_JKChjF1jY6Prt2yl1jggC=w640-h400-e365)\n\n## PiCamera Stream\n\nBelow is verified to be working:\n\n```sh\nraspivid -o - -n -fps 45 -w 640 -h 480 -vf -hf -t 0 -vs -fli auto | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264 :h264-fps=45\n```\n\nRequires FLV installed on Raspberry\n\nNote: be aware of FPS ranges required by PiCamera setup and GPU, otherwise you could get cryptic error messages in process output:\n\n[Sensor Modes](https://picamera.readthedocs.io/en/release-1.13/fov.html#sensor-modes)\n\n\u003e The requested framerate should be within the range of the sensor mode.\n\n## GitHub\n\n### Credentials\n\nWhen using closing repositories from GitHub using `https` option one can enable credential cache on the terminal:\n\n```bash\n$ git config --global credential.helper cache\n# Set git to use the credential memory cache\n\n$ git config --global credential.helper 'cache --timeout=3600'\n# Set the cache to timeout after 1 hour (setting is in seconds)\n```\n\nSee: [Caching your GitHub password in Git](https://help.github.com/en/articles/caching-your-github-password-in-git)\n\n### Account\n\n```bash\n# gets the username from global config\ngit config --global user.name\n# sets the username in global config\ngit config --global user.name \"UserName\"\n# gets the email from global config\ngit config --global user.email\n# sets the email in global config\ngit config --global user.name \"username@users.noreply.github.com\"\n```\n\n## Author\n\n@peterblazejewicz\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterblazejewicz%2Fraspberry-pi-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterblazejewicz%2Fraspberry-pi-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterblazejewicz%2Fraspberry-pi-setup/lists"}