{"id":1818,"date":"2020-04-29T15:12:50","date_gmt":"2020-04-29T13:12:50","guid":{"rendered":"https:\/\/contactkring.nl\/wordpress\/?p=1818"},"modified":"2020-04-29T16:30:20","modified_gmt":"2020-04-29T14:30:20","slug":"raspberry-pi-commands","status":"publish","type":"post","link":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/","title":{"rendered":"Raspberry Pi commands"},"content":{"rendered":"<h1 class=\"entry-title\">57 Raspberry Pi commands that everyone should know<\/h1>\n<p>Starting on a Raspberry Pi is not always easy because you don\u2019t necessarily have the habit of using command lines<br \/>\nHowever, they are essentials and often faster or more efficient than going through the GUI<\/p>\n<p>What are the vital commands to know?<br \/>\n<strong>Well, there are quite a few, and here we will see the 50 most used sorted by category:<\/strong><\/p>\n<ul>\n<li><strong>Files management<\/strong><\/li>\n<li><b>Network commands<\/b><\/li>\n<li><strong>System updates<\/strong><\/li>\n<li><strong>Packages management<\/strong><\/li>\n<li><strong>System management<\/strong><\/li>\n<li><strong>Raspbian commands<\/strong><\/li>\n<li><strong>Misc commands<\/strong><\/li>\n<li><strong>Warrior commands \ud83d\ude42<\/strong><\/li>\n<\/ul>\n<p>This list is based on my experience on Raspberry and Linux in general<br \/>\nEveryone has a different use of his system and can use more often commands that are not present here<br \/>\nThe goal is really to introduce the essential commands to start, and not to make an exhaustive list<\/p>\n<h2>Files management<\/h2>\n<p>These commands are the basics that every Linux beginner should learn<br \/>\nMaybe you&nbsp;already know them, but it will be a reminder<\/p>\n<pre>The Linux arborescence is a Tree, starting at the root: \/\nEach subfolder created under is accessible with \/\nEx: \/home\/pi =&gt; pi is a subfolder of \/home, home is a subfolder  in \/\nDon't forget to use sudo if you are not allowed to access the file or directory (sudo gives you administrator privileges for the command that follows)<\/pre>\n<ul>\n<li><strong>cd &lt;path&gt;:<\/strong> Changes directory, go to the specified folder in the files tree\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">cd \/home\/pi<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>ls:<\/strong> Lists the files and directory in the current or specified folder\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">ls<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">ls \/home\/pi<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">ls -latr \/home\/pi<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>mkdir &lt;folder&gt;:<\/strong> Creates a new subfolder in the current or specified folder\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">mkdir myfolder<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">mkdir \/home\/pi\/myfolder<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>cp &lt;file&gt; &lt;destination&gt;: <\/strong>Copies a file or a directory to another location (to copy a complete directory you need to add the -r parameter for \u201crecursive\u201d)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">cp test.<\/span><span class=\"enlighter-m3\">txt<\/span><span class=\"enlighter-text\"> \/home\/pi\/Documents\/<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">cp \/home\/pi\/test.<\/span><span class=\"enlighter-m3\">txt<\/span><span class=\"enlighter-text\"> \/home\/pi\/Documents\/<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">cp -r \/home\/pi\/test\/ \/home\/pi\/Documents\/<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>mv &lt;source&gt; &lt;destination&gt;: <\/strong>Moves a file or a directory to another location\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">mv \/home\/pi\/test.<\/span><span class=\"enlighter-m3\">txt<\/span><span class=\"enlighter-text\"> \/home\/Documents\/<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">mv \/home\/pi\/test\/ \/home\/Documents\/<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>cat &lt;file&gt;:<\/strong> Displays all the content of the specified file\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">cat \/home\/pi\/README.<\/span><span class=\"enlighter-m3\">txt<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>more &lt;file&gt;:<\/strong> Displays the content of the specified file, page per page (enter or space to continue, q to quit)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">more \/var\/log\/syslog<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>tail &lt;file&gt;:&nbsp;<\/strong>Tail allows you to display the end of a file, it\u2019s useful to check new entries in a log file\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">tail \/var\/log\/syslog<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You can specify the number of lines to display with -n<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">tail -n20 \/var\/log\/syslog<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>And finally, my favorite&nbsp;is the option -f to displays new lines in real-time<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">tail -f \/var\/log\/syslog<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>head &lt;file&gt;:&nbsp;<\/strong>It\u2019s the same as tail but to display the beginning of a file\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">head \/home\/pi\/file.<\/span><span class=\"enlighter-m3\">txt<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">head -n20 \/home\/pi\/file.<\/span><span class=\"enlighter-m3\">txt<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>grep &lt;string&gt;: <\/strong>Grep is a powerful tool to search string in a text. You can use it to search something in a file or to filter the output of another command or script<br \/>\nBasic usage:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">grep dhcp \/var\/log\/syslog<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>As I say, you can use it on a file or a script output:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">cat \/var\/log\/syslog <\/span><span class=\"enlighter-g0\">|<\/span><span class=\"enlighter-text\"> grep dhcp<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">\/home\/pi\/myscript.<\/span><span class=\"enlighter-m3\">sh<\/span> <span class=\"enlighter-g0\">|<\/span><span class=\"enlighter-text\"> grep error<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">ls -latr <\/span><span class=\"enlighter-g0\">|<\/span><span class=\"enlighter-text\"> grep php<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>And finally, there is a lot of options to use with grep, like regular expressions or options to display lines before (-B), after (-A) or around (-C) the search string<br \/>\nYou can also use -v to display everything except the input string<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">grep <\/span><span class=\"enlighter-s0\">&#8216;dhcp\\|dns&#8217;<\/span><span class=\"enlighter-text\"> \/var\/log\/syslog<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">grep -A2 -B4 <\/span><span class=\"enlighter-s0\">&#8216;Fatal error&#8217;<\/span><span class=\"enlighter-text\"> \/var\/log\/apache\/error.<\/span><span class=\"enlighter-m3\">log<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">grep -v <\/span><span class=\"enlighter-s0\">&#8216;Notice&#8217;<\/span><span class=\"enlighter-text\"> \/var\/log\/apache\/error.<\/span><span class=\"enlighter-m3\">log<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>If you like this tool, I recommend you to read the man page to know exactly what you can do with<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">man grep<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>nano &lt;file&gt;:<\/strong> Nano is text editor.&nbsp;It would need an entire article to go into detail<br \/>\nBut quickly, it allows you to edit a file, and save your changes with (CTRL + O, Enter, CTRL + X)<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">nano \/home\/pi\/myscript.<\/span><span class=\"enlighter-m3\">sh<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You\u2019ll find all actions available at the bottom of the screen<\/li>\n<li><strong>rm &lt;file&gt;:<\/strong> Deletes a file. For a folder, add option -rf (recursive and force)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">rm monscript.<\/span><span class=\"enlighter-m3\">sh<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">rm -rf \/home\/pi\/scripts\/<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>tar -c:<\/strong> You can use tar to store files into an archive. It\u2019s often used with gzip to compress files\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">tar -cvfz archive.<\/span><span class=\"enlighter-m3\">tar<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">gz<\/span><span class=\"enlighter-text\"> \/home\/pi\/Documents\/mydirectory<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-c: create an archive<br \/>\n-v: verbose<br \/>\n-f: filename of the archive follow<br \/>\n-z: compress files with gzip<\/li>\n<li><strong>tar -x:<\/strong> It\u2019s the same command but to extract files\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">tar -xvfz archive.<\/span><span class=\"enlighter-m3\">tar<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">gz<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-x: extract an archive<\/li>\n<li><strong>find:<\/strong> As the name suggests, find is useful to locate files on your Raspberry Pi\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">find \/home\/pi -iname *.tar.<\/span><span class=\"enlighter-m3\">gz<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>There is a lot of options to help you find the good file (size, last modification date, \u2026)<\/li>\n<li><strong>pwd:<\/strong> Pwd lets you see in which directory you are.\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">pwd<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>tree:<\/strong> Another great tool to analyze your current location in the files tree. It will show you the entire lower tree (see&nbsp;the example below)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">tree<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre>pi@raspberrypi:\/var\/log $ tree\n.\n|-- alternatives.log\n|-- alternatives.log.1\n|-- alternatives.log.2.gz\n|-- apt\n|   |-- eipp.log.xz\n|   |-- history.log\n|   |-- history.log.1.gz\n|   |-- history.log.2.gz\n|   |-- term.log\n|   |-- term.log.1.gz\n|   `-- term.log.2.gz\n...<\/pre>\n<\/li>\n<\/ul>\n<h2><span id=\"Network_commands\" class=\"ez-toc-section\"><\/span>Network commands<\/h2>\n<p>Shortly after your first Raspbian installation, you\u2019ll surely need some of this commands to help you with the network configuration (especially if you&nbsp;are on a lite version or with SSH)<\/p>\n<h3><span id=\"Configuration\" class=\"ez-toc-section\"><\/span>Configuration<\/h3>\n<pre>By default, the Raspberry Pi 3B+ comes with 2 interfaces (Ethernet and WiFi)\nThe ethernet is called eth0&nbsp;and the WiFi is wlan0\nYou have to use these names with some of the commands below<\/pre>\n<ul>\n<li><strong>ifconfig:<\/strong> Displays your current network configuration, mainly your IP address if connected\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">ifconfig<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>ping &lt;ip&gt;:<\/strong> Sends a ping packet to another IP on the network to check if the host is alive\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">ping <\/span><span class=\"enlighter-n0\">192.168<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">1<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-n1\">1<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>ifup&nbsp;&lt;interface&gt;:<\/strong> Enables the specified interface\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo ifup eth0<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>ifdown&nbsp;&lt;interface&gt;:<\/strong> Disables the specified interface. Could be useful&nbsp;to disable WiFi if you are already connected by cable for example\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo ifdown wlan0<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<h3><span id=\"File_transfer_and_remote_connection\" class=\"ez-toc-section\"><\/span>File transfer and remote connection<\/h3>\n<ul>\n<li><strong>wget &lt;url&gt;:<\/strong> This command allows you to download a file from the Internet\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">wget https<\/span><span class=\"enlighter-c0\">:\/\/wordpress.org\/latest.zip<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>ssh &lt;user&gt;@&lt;ip&gt;:<\/strong> SSH is a network protocol that provides you a way to connect securely to a remote computer\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">ssh root@<\/span><span class=\"enlighter-n0\">192.168<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">1<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">201<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>scp &lt;file&gt; &lt;user&gt;@&lt;ip&gt;:&lt;path&gt;:<\/strong> scp can transfer a file to a remote computer over SSH\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">scp test.<\/span><span class=\"enlighter-m3\">txt<\/span><span class=\"enlighter-text\"> root@<\/span><span class=\"enlighter-n0\">192.168<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">1<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">201<\/span><span class=\"enlighter-text\">:\/root\/<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>rsync &lt;file&gt; &lt;user&gt;@&lt;ip&gt;:&lt;path&gt;:<\/strong> rsync does almost the same thing but with a delta comparison algorithm and some optimizations to transfer files faster\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">rsync test.<\/span><span class=\"enlighter-m3\">txt<\/span><span class=\"enlighter-text\"> root@<\/span><span class=\"enlighter-n0\">192.168<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">1<\/span><span class=\"enlighter-text\">.<\/span><span class=\"enlighter-m3\">201<\/span><span class=\"enlighter-text\">:\/root\/<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">rsync -auzr \/home\/pi\/Documents\/* \/home\/pi\/backups\/Documents\/<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>As you can see, you can also use rsync for local files synchronization<\/li>\n<\/ul>\n<h2><span id=\"System_updates\" class=\"ez-toc-section\"><\/span>System updates<\/h2>\n<p>Just after the network configuration, you\u2019ll have to update your system to get the last version of each default packages installed<span id=\"ezoic-pub-ad-placeholder-121\" class=\"ezoic-adpicker-ad\"><\/span><span id=\"div-gpt-ad-raspberrytips_com-medrectangle-4-0\" class=\"ezoic-ad ezoic-adl ezfound\" data-google-query-id=\"CJTty4DajekCFWpY5Qodi5EFQw\"><\/span><\/p>\n<div id=\"google_ads_iframe_\/1254144\/raspberrytips_com-medrectangle-4_0__container__\"><\/div>\n<pre>On Raspbian, and generally&nbsp;on all Linux distributions, you'll have a package for each app or command you install\nA list of all available packages is called a repository\nOnce installed, you need to update this repository and all your packages regularly to keep your system safe\nThese commands explain you how to do this\nWe'll need sudo for all these commands<\/pre>\n<ul>\n<li><strong>apt-get update:<\/strong> Downloads the last repository version for each&nbsp;one you have in your configuration (\/etc\/apt\/sources.list)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo apt-get update<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>apt-get upgrade:<\/strong> Updates all installed packages if needed\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo apt-get upgrade<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>rpi-update:<\/strong> Only use this if you know what you do.<br \/>\nThis&nbsp;command will update everything on your Raspberry Pi (firmware, packages, \u2026) and can potentially break something<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">rpi-update<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<h2><span id=\"Packages_management\" class=\"ez-toc-section\"><\/span>Packages management<\/h2>\n<p>After that, you may want to&nbsp;install new packages on your Raspberry Pi<br \/>\nHere are the commands you need to know to do this<\/p>\n<ul>\n<li><strong>apt-get install &lt;package&gt;:<\/strong>&nbsp; Installs the specified package(s)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo apt-get install phpmyadmin<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo apt-get install vim htop<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>apt-get remove &lt;package&gt;:<\/strong> Removes a previously selected package\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo apt-get remove vim<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>apt-cache search &lt;search&gt;:<\/strong> Searchs for a package name in the packages list (repository)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo apt-cache search myadmin<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo apt-cache search php<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>dpkg -l:<\/strong> Lists all installed packages on your system. You can use grep to find a specific package\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">dpkg -l<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">dpkg -l <\/span><span class=\"enlighter-g0\">|<\/span><span class=\"enlighter-text\"> grep myadmin<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<h2><span id=\"System_management\" class=\"ez-toc-section\"><\/span>System management<\/h2>\n<p>Here are the commands you\u2019ll often use to manage your Raspberry Pi hardware<\/p>\n<ul>\n<li><strong>reboot:<\/strong> As the name says, this command will restart the Raspberry Pi immediately\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo reboot<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>shutdown -h now:<\/strong> This is to stop the Raspberry Pi immediately\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo shutdown -h now<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You can replace \u201cnow\u201d by a specific time (shutdown -h 12:05)<\/li>\n<li><strong>service &lt;servicename&gt; &lt;action&gt;:&nbsp;<\/strong>This command allows you to start or stop services\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">service apache2 start<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">service apache2 stop<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Sometimes there are other options, depending on the service, for example:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">service apache2 reload<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">service apache2 restart<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Don\u2019t type any action to see all those&nbsp;available:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">service apache2<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>update-rc.d &lt;service&gt; &lt;action&gt;: <\/strong>On Debian, this command allows you to manage the service start or stop on the system boot<br \/>\nTo start a service on boot:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo update-rc.<\/span><span class=\"enlighter-m3\">d<\/span><span class=\"enlighter-text\"> ssh enable<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>To disable start of the service:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo update-rc.<\/span><span class=\"enlighter-m3\">d<\/span><span class=\"enlighter-text\"> -f ssh remove<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>The -f option is here to force the symbolic link deletion<\/p>\n<p>This command is only for service<br \/>\nTo start other scripts or commands on boot, you have to&nbsp;edit the \/etc\/rc.local file<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo nano \/etc\/rc.<\/span><span class=\"enlighter-m3\">local<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>ps: <\/strong>This command displays all running process on your Raspberry Pi<br \/>\nThe basic command is this one to display everything:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">ps aux<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You can also display process started by a specific user:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">ps -u pi<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This will give you a list like this<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-792 ezlazyloaded\" src=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps.jpg?ezimgfmt=rs:421x217\/rscb3\/ng:webp\/ngcb3\" sizes=\"auto, (max-width: 421px) 100vw, 421px\" srcset=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps.jpg?ezimgfmt=ng:webp\/ngcb3 421w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps-300x155.jpg?ezimgfmt=ng:webp\/ngcb3 300w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps-100x52.jpg?ezimgfmt=ng:webp\/ngcb3 100w\" alt=\"ps linux command\" data-pin-description=\"Commands cheat sheet for Raspberry Pi and Linux generally\" data-ezsrc=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps.jpg?ezimgfmt=rs:421x217\/rscb3\/ng:webp\/ngcb3\" data-ezsrcset=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps.jpg?ezimgfmt=ng:webp\/ngcb3 421w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps-300x155.jpg?ezimgfmt=ng:webp\/ngcb3 300w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/ps-100x52.jpg?ezimgfmt=ng:webp\/ngcb3 100w\" width=\"421\" height=\"217\"><br \/>\nThe process ID (PID) could be useful for other commands, to stop it for example (next command)<\/li>\n<li><strong>kill &lt;pid&gt;: <\/strong>The kill command allows you to terminate a process. You\u2019ll need the process ID to do this (see the previous command)\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">kill <\/span><span class=\"enlighter-n1\">12345<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Sometime you may need to use the -9 option to force all related commands to stop<br \/>\nFor example, if you run 20 commands in a script and kill it, it\u2019ll continue to the next line, not exit the program, except if you use the -9 option<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">kill <\/span><span class=\"enlighter-n1\">-9<\/span> <span class=\"enlighter-n1\">12345<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You could also use killall to stop all occurrences of a program<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">killall php<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This&nbsp;command will stop all PHP scripts<\/p>\n<p>Be aware that this commands will&nbsp;immediately stop the process asked, no matter what was going on. It\u2019s not a clean stop<br \/>\nYou don\u2019t know what the script is doing so it can damage data or corrupt files<br \/>\nThis should be used as a last step, and if possible on the non-critical process<\/li>\n<li><strong>htop:<\/strong> This tool is an alternative to top. It\u2019s more user-friendly than top, with colors and dynamic load bars\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">htop<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>df:<\/strong> Displays the partitions list, with the disk space used and available for each one\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">df<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">df -h<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-h option is for the human-readable format<\/li>\n<li><strong>vcgencmd measure_temp:<\/strong> You may not remember it, but this command displays the current CPU temperature\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">vcgencmd measure_temp<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<h2><span id=\"Raspbian_commands\" class=\"ez-toc-section\"><\/span>Raspbian commands<\/h2>\n<p>Most of the commands from this post are basically Linux commands<br \/>\nBut Raspbian has some&nbsp;exclusive ones that&nbsp;I will introduce first<\/p>\n<p>These are not all essentials, but you may not know them even if you are good with Linux<span id=\"ezoic-pub-ad-placeholder-122\" class=\"ezoic-adpicker-ad\"><\/span><\/p>\n<ul>\n<li><strong>raspi-config:<\/strong> This tool allows you to manage all the configuration from a terminal or an SSH connection\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo raspi-config<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-755 ezlazyloaded\" src=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config.jpg?ezimgfmt=rs:659x255\/rscb3\/ng:webp\/ngcb3\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" srcset=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config.jpg?ezimgfmt=ng:webp\/ngcb3 700w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config-300x116.jpg?ezimgfmt=ng:webp\/ngcb3 300w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config-100x39.jpg?ezimgfmt=ng:webp\/ngcb3 100w\" alt=\"raspi config\" data-pin-description=\"Commands cheat sheet for Raspberry Pi and Linux generally\" data-ezsrc=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config.jpg?ezimgfmt=rs:659x255\/rscb3\/ng:webp\/ngcb3\" data-ezsrcset=\"https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config.jpg?ezimgfmt=ng:webp\/ngcb3 700w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config-300x116.jpg?ezimgfmt=ng:webp\/ngcb3 300w,https:\/\/sf.ezoiccdn.com\/ezoimgfmt\/raspberrytips.com\/wp-content\/uploads\/2018\/09\/raspi-config-100x39.jpg?ezimgfmt=ng:webp\/ngcb3 100w\" width=\"700\" height=\"271\"><\/li>\n<li><strong>raspistill:<\/strong> If you have a camera plugged in the <a href=\"https:\/\/amzn.to\/38g1mys\" target=\"_blank\" rel=\"noopener noreferrer\">camera module<\/a>, this command takes a shot and save it to an image file\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">raspistill -o image.<\/span><span class=\"enlighter-m3\">jpg<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>raspivid:<\/strong> It\u2019s the same command but for video capture from the camera\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">raspivid -o video.<\/span><span class=\"enlighter-m3\">h264<\/span><span class=\"enlighter-text\"> -t <\/span><span class=\"enlighter-n1\">10000<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-t parameter is the time of the capture in milliseconds<\/li>\n<li><strong>raspi-gpio:&nbsp;<\/strong> This command allows you to manage the GPIO pins of the Raspberry Pi. You can either set or get a value\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">raspi-gpio get<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">raspi-gpio get <\/span><span class=\"enlighter-n1\">20<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">raspi-gpio set <\/span><span class=\"enlighter-n1\">20<\/span><span class=\"enlighter-text\"> a5 <\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">raspi-gpio set <\/span><span class=\"enlighter-n1\">20<\/span><span class=\"enlighter-text\"> op pn dh<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>raspividyuv&nbsp;or raspiyuv:&nbsp;<\/strong> This command is similar to the raspivid but for a raw YUV video stream\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">raspividyuv -o video.<\/span><span class=\"enlighter-m3\">yuv<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>rpi-update:<\/strong>&nbsp;Only use this if you know what you do. This will update everything on your Raspberry Pi (firmware, packages, \u2026) and can potentially break something\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sudo rpi-update<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<h2><span id=\"Misc\" class=\"ez-toc-section\"><\/span>Misc<\/h2>\n<p>Here are some&nbsp;other useful commands that&nbsp;I haven\u2019t managed to place in the other categories \ud83d\ude42<\/p>\n<ul>\n<li><strong>history: <\/strong>Linux&nbsp;store any command you type in an archive file. History is the command to use to display this list.\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">history<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You can also clear all the history<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">history -c<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Or clear one specific entry<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">history -d <\/span><span class=\"enlighter-n1\">123<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>crontab:<\/strong> Cron is a tool to schedule tasks on a Raspberry Pi. Crontab is the file where your enter lines for each task to run\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">crontab -l<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">crontab -e<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-l option to display lines<br \/>\n-e option to edit lines<br \/>\nYou can use sudo before to schedule tasks to run with root privileges<\/li>\n<li><strong>screen:<\/strong> This tool allows you to let something run in the background even if you close your session\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">screen -s <\/span><span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">name<\/span><span class=\"enlighter-g1\">&gt;<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">screen -r <\/span><span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">name<\/span><span class=\"enlighter-g1\">&gt;<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-s option to start a new screen with the following name<br \/>\n-r option to resume a running screen with this name<br \/>\nYou can forget the name if you want,&nbsp;an ID will be generated, use screen -r to find it and screen -r &lt;ID&gt; to resume it<br \/>\nWith only one screen running, screen -r will resume it directly<\/li>\n<\/ul>\n<h2><span id=\"Warrior_commands\" class=\"ez-toc-section\"><\/span>Warrior commands<\/h2>\n<p>For this last part, I\u2019ll introduce some powerful commands to master your Raspberry Pi<br \/>\nIf you start on Linux, you may not need to know this one, but if you want to&nbsp;save time or go further on Raspberry Pi,&nbsp;&nbsp;you should&nbsp;know this commands<\/p>\n<ul>\n<li><strong>awk:<\/strong> awk is nearly a programming language, it allows you to search string and transform them to display it differently.<br \/>\nSo it\u2019ll be difficult to summarize all of the possibilities in a few lines, but I\u2019ll try to give you some examples to understand it<br \/>\nThe basic syntax of awk is this one:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">awk <\/span><span class=\"enlighter-g1\">[<\/span><span class=\"enlighter-text\">-F<\/span><span class=\"enlighter-g1\">]<\/span> <span class=\"enlighter-g1\">[<\/span><span class=\"enlighter-text\">-v var=value<\/span><span class=\"enlighter-g1\">]<\/span> <span class=\"enlighter-s0\">&#8216;program&#8217;<\/span><span class=\"enlighter-text\"> file<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-F is the field separator string (\u201c:\u201d or \u201c,\u201d for example)<br \/>\n-v allows you to define variables to use it later in the process<br \/>\nWhat I called program is the expression used to process the file, we\u2019ll see this part just after<br \/>\nAnd finally, the \u201cfile\u201d parameter is the file name you want to process<\/p>\n<p>Here is a basic example:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">awk -F<\/span><span class=\"enlighter-s0\">&#8220;:&#8221;<\/span> <span class=\"enlighter-s0\">&#8216;{print $1}&#8217;<\/span><span class=\"enlighter-text\"> \/etc\/passwd<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>\/etc\/passwd is the file to parse. The field separator is \u201c:\u201d so we use it in the -F option<br \/>\nThen in the program string, we ask to display only the first column<br \/>\nSo this command will display only a list of usernames<br \/>\nThis is the simple way to use it if you want to know more, I recommend to read a dedicated tutorial like <a href=\"http:\/\/www.grymoire.com\/Unix\/Awk.html\" rel=\"noopener\">this one<\/a><\/li>\n<li><strong>sed:<\/strong> sed allows you to do similar things to awk, it will transform text to what you want.<br \/>\nAs for awk, it\u2019s a complex command to master, and I\u2019ll only introduce it here<br \/>\nThe basic syntax looks like this:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sed <\/span><span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">option<\/span><span class=\"enlighter-g1\">&gt;<\/span> <span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">script<\/span><span class=\"enlighter-g1\">&gt;<\/span> <span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">file<\/span><span class=\"enlighter-g1\">&gt;<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>So it\u2019s very close to awk on this<br \/>\nLet\u2019s see an example :<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sed <\/span><span class=\"enlighter-s0\">&#8216;\/^#\/d&#8217;<\/span><span class=\"enlighter-text\"> \/etc\/apache2\/apache2.<\/span><span class=\"enlighter-m3\">conf<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Generally, in each configuration file, you\u2019ll find a lot of comments to explain what is each line<br \/>\nThis command will display the apache configuration file without comments<br \/>\nWe use a regular expression to delete lines starting with #<br \/>\nYou have to redirect the output to another file to save it<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">sed <\/span><span class=\"enlighter-s0\">&#8216;\/^#\/d&#8217;<\/span><span class=\"enlighter-text\"> \/etc\/apache2\/apache2.<\/span><span class=\"enlighter-m3\">conf<\/span> <span class=\"enlighter-g1\">&gt;<\/span><span class=\"enlighter-text\"> \/etc\/apache2\/apache2-nocomment.<\/span><span class=\"enlighter-m3\">conf<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Like for awk, this is just a glimpse of what sed can do<br \/>\nIf you want to know more, there is also a <a href=\"http:\/\/www.grymoire.com\/Unix\/Sed.html\" rel=\"noopener\">good sed tutorial on the same website<\/a><\/li>\n<li><strong>cut:<\/strong> cut is the last way I\u2019ll introduce here to transform text. It\u2019s less powerful but it\u2019s simpler to use, so if cut can do it, you\u2019ll probably prefer to use it rather than awk or sed<br \/>\nAs the name suggests, cut&nbsp;allows you to extract part of a text or file<br \/>\nThe basic syntax is:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">cut <\/span><span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">options<\/span><span class=\"enlighter-g1\">&gt;<\/span> <span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">file<\/span><span class=\"enlighter-g1\">&gt;<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">echo <\/span><span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">string<\/span><span class=\"enlighter-g1\">&gt;<\/span> <span class=\"enlighter-g0\">|<\/span><span class=\"enlighter-text\"> cut <\/span><span class=\"enlighter-g1\">&lt;<\/span><span class=\"enlighter-text\">options<\/span><span class=\"enlighter-g1\">&gt;<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>The first one is for a file, and the second one to cut a string directly<br \/>\nA basic example now:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">echo <\/span><span class=\"enlighter-s0\">&#8220;abcdefghi&#8221;<\/span> <span class=\"enlighter-g0\">|<\/span><span class=\"enlighter-text\"> cut -c <\/span><span class=\"enlighter-n1\">2<\/span><span class=\"enlighter-text\">&#8211;<\/span><span class=\"enlighter-n1\">4<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This will display only&nbsp;\u201cbcd\u201d<br \/>\n-c option is for the character, so basically, it\u2019ll extract character 2 to 4<\/p>\n<p>Here are other options with a file:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">cut -d <\/span><span class=\"enlighter-g0\">:<\/span><span class=\"enlighter-text\"> -f <\/span><span class=\"enlighter-n1\">1<\/span><span class=\"enlighter-text\"> \/etc\/passwd<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This will do the same thing as the first example of the awk command<br \/>\n\/etc\/password is a file with \u201c:\u201d use as a delimiter<br \/>\n-d option is to give the delimiter character (\u201c:\u201d)<br \/>\n-f option is to indicate the column to extract (f stands for the field)<br \/>\nSo, this will display only the first column and you\u2019ll get a list of usernames<\/li>\n<li><strong>wc:<\/strong> wc stands for Word Count, it allows you to count everything in a file or stream<br \/>\nThere are three main options: -l for lines, -w for words and -m for characters<br \/>\nThere is also the -c option to get the file size<br \/>\nWc without option will give you all of this<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">wc .bash_history<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-n1\">668<\/span> <span class=\"enlighter-n1\">1977<\/span> <span class=\"enlighter-n1\">17979<\/span><span class=\"enlighter-text\"> .bash_history<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>The first column is line count, second is word count and last is the file size in bytes<br \/>\nHere are some examples of options:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">wc -l .bash_history<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">ls -latr <\/span><span class=\"enlighter-g0\">|<\/span><span class=\"enlighter-text\"> wc -l<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">wc -w myfile.<\/span><span class=\"enlighter-m3\">txt<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>lsof:<\/strong>&nbsp; lsof stands for \u201cList open files\u201d. This command displays all files open on your Raspberry Pi<br \/>\nThis could be useful to know why you can\u2019t edit a file, or which file lock the unmount process<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">lsof<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><strong>watch: <\/strong>If you are waiting for something, in a file or directory, the watch command could help you to monitor what happens. This will execute the same command every two seconds\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">watch date<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">watch ls -latr<\/span><\/div>\n<\/div>\n<div class=\"\">\n<div><span class=\"enlighter-text\">watch cat output.<\/span><span class=\"enlighter-m3\">txt<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You can also change the refresh rate with the -n option<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">watch -n10 date<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This will display the current date every ten seconds<\/li>\n<li><strong>netstat:<\/strong>&nbsp;Netstat is a powerful tool to monitor what your Raspberry Pi is doing with the network. For example, you could see every port open and every traffic flow<br \/>\nBut netstat is a complex tool that i can\u2019t explain in detail in a few lines.<br \/>\nI will only introduce some basic usages to display all listening connections you can use:<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">netstat -l<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-p option will add the process id (PID)<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">netstat -lp<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>-c option allows you to refresh data continuously<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">netstat -lpc<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You can find all options in the <a href=\"https:\/\/linux.die.net\/man\/8\/netstat\">man page<\/a> of netstat<\/li>\n<li><strong>dmesg:&nbsp; <\/strong>This command is useful for troubleshooting your Raspberry Pi boot<br \/>\nIt will show you every event that happened in the start sequence<br \/>\nHere you could see errors with drivers or services and understand why something doesn\u2019t work the way you want<\/p>\n<div class=\"enlighter-default enlighter-v-standard enlighter-t-godzilla enlighter-hover \">\n<div class=\"enlighter\">\n<div class=\"\">\n<div><span class=\"enlighter-text\">dmesg<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>You will get a column with the time elapsed since the beginning of the boot and a text explaining what happened<br \/>\nThere are also normal messages when everything is fine<\/li>\n<\/ul>\n<h2><span id=\"Video\" class=\"ez-toc-section\"><\/span>Video<\/h2>\n<p><a href=\"https:\/\/youtu.be\/0EUdPHjw6Nw\" target=\"_blank\" rel=\"noopener noreferrer\">If you need a quick demonstration of these commands, you can check this video:<\/a><\/p>\n<div class=\"fluid-width-video-wrapper\"><\/div>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>57 Raspberry Pi commands that everyone should know Starting on a Raspberry Pi is not always easy because you don\u2019t necessarily have the habit of using command lines However, they are essentials and often faster [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1848,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[],"class_list":["post-1818","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Raspberry Pi commands - ContactKring<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/\" \/>\n<meta property=\"og:locale\" content=\"nl_NL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Raspberry Pi commands - ContactKring\" \/>\n<meta property=\"og:description\" content=\"57 Raspberry Pi commands that everyone should know Starting on a Raspberry Pi is not always easy because you don\u2019t necessarily have the habit of using command lines However, they are essentials and often faster [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"ContactKring\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-29T13:12:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-29T14:30:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschreven door\" \/>\n\t<meta name=\"twitter:data1\" content=\"Beheerder\" \/>\n\t<meta name=\"twitter:label2\" content=\"Geschatte leestijd\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#website\",\"url\":\"https:\/\/contactkring.nl\/wordpress\/\",\"name\":\"ContactKring-Dedemsvaart\",\"description\":\"Dedemsvaart\",\"publisher\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/contactkring.nl\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"nl\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#primaryimage\",\"inLanguage\":\"nl\",\"url\":\"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg\",\"contentUrl\":\"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg\",\"width\":900,\"height\":480},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#webpage\",\"url\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/\",\"name\":\"Raspberry Pi commands - ContactKring\",\"isPartOf\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#primaryimage\"},\"datePublished\":\"2020-04-29T13:12:50+00:00\",\"dateModified\":\"2020-04-29T14:30:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#breadcrumb\"},\"inLanguage\":\"nl\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/contactkring.nl\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Raspberry Pi commands\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#webpage\"},\"author\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a\"},\"headline\":\"Raspberry Pi commands\",\"datePublished\":\"2020-04-29T13:12:50+00:00\",\"dateModified\":\"2020-04-29T14:30:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#webpage\"},\"wordCount\":3132,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a\"},\"image\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg\",\"articleSection\":[\"Raspberry Pi\"],\"inLanguage\":\"nl\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a\",\"name\":\"Beheerder\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#personlogo\",\"inLanguage\":\"nl\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bb792418a1620df192d82e366f5c0a90488f53f65629c5c2778caa64c0c16267?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bb792418a1620df192d82e366f5c0a90488f53f65629c5c2778caa64c0c16267?s=96&d=mm&r=g\",\"caption\":\"Beheerder\"},\"logo\":{\"@id\":\"https:\/\/contactkring.nl\/wordpress\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Raspberry Pi commands - ContactKring","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/","og_locale":"nl_NL","og_type":"article","og_title":"Raspberry Pi commands - ContactKring","og_description":"57 Raspberry Pi commands that everyone should know Starting on a Raspberry Pi is not always easy because you don\u2019t necessarily have the habit of using command lines However, they are essentials and often faster [&hellip;]","og_url":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/","og_site_name":"ContactKring","article_published_time":"2020-04-29T13:12:50+00:00","article_modified_time":"2020-04-29T14:30:20+00:00","og_image":[{"width":900,"height":480,"url":"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Geschreven door":"Beheerder","Geschatte leestijd":"17 minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/contactkring.nl\/wordpress\/#website","url":"https:\/\/contactkring.nl\/wordpress\/","name":"ContactKring-Dedemsvaart","description":"Dedemsvaart","publisher":{"@id":"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/contactkring.nl\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"nl"},{"@type":"ImageObject","@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#primaryimage","inLanguage":"nl","url":"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg","contentUrl":"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg","width":900,"height":480},{"@type":"WebPage","@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#webpage","url":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/","name":"Raspberry Pi commands - ContactKring","isPartOf":{"@id":"https:\/\/contactkring.nl\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#primaryimage"},"datePublished":"2020-04-29T13:12:50+00:00","dateModified":"2020-04-29T14:30:20+00:00","breadcrumb":{"@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#breadcrumb"},"inLanguage":"nl","potentialAction":[{"@type":"ReadAction","target":["https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/contactkring.nl\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Raspberry Pi commands"}]},{"@type":"Article","@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#article","isPartOf":{"@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#webpage"},"author":{"@id":"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a"},"headline":"Raspberry Pi commands","datePublished":"2020-04-29T13:12:50+00:00","dateModified":"2020-04-29T14:30:20+00:00","mainEntityOfPage":{"@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#webpage"},"wordCount":3132,"commentCount":0,"publisher":{"@id":"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a"},"image":{"@id":"https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/contactkring.nl\/wordpress\/wp-content\/uploads\/2020\/04\/Useful-Raspberry-Pi-Commands.jpg","articleSection":["Raspberry Pi"],"inLanguage":"nl","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/contactkring.nl\/wordpress\/raspberry-pi-commands\/#respond"]}]},{"@type":["Person","Organization"],"@id":"https:\/\/contactkring.nl\/wordpress\/#\/schema\/person\/6ab8a2d7a60a96b7d7da6ef8e2924c1a","name":"Beheerder","image":{"@type":"ImageObject","@id":"https:\/\/contactkring.nl\/wordpress\/#personlogo","inLanguage":"nl","url":"https:\/\/secure.gravatar.com\/avatar\/bb792418a1620df192d82e366f5c0a90488f53f65629c5c2778caa64c0c16267?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bb792418a1620df192d82e366f5c0a90488f53f65629c5c2778caa64c0c16267?s=96&d=mm&r=g","caption":"Beheerder"},"logo":{"@id":"https:\/\/contactkring.nl\/wordpress\/#personlogo"}}]}},"_links":{"self":[{"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/posts\/1818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/comments?post=1818"}],"version-history":[{"count":6,"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/posts\/1818\/revisions"}],"predecessor-version":[{"id":1849,"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/posts\/1818\/revisions\/1849"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/media\/1848"}],"wp:attachment":[{"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/media?parent=1818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/categories?post=1818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contactkring.nl\/wordpress\/wp-json\/wp\/v2\/tags?post=1818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}