rpi_common

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rpi_common [2020/07/28 08:24] – [Configure wireless connection] JΓΊne Parkrpi_common [2024/04/18 08:52] (current) – JΓΊne Park
Line 1: Line 1:
 <nav>  <nav> 
   * {{fa>server?color=#8B0000}} Linux   * {{fa>server?color=#8B0000}} Linux
-    * [[:rpi_common|β–  General Things on Raspbian]]Β +    * [[rpi_common|β–  General Things on Raspbian]]Β 
-    * [[:rpi_autism|Media Ditorium ─ AUTiSM Rainbow]]Β +    * [[rpi_nimbus|ππ’πŒππ”π’ π••π•–π”Ήπ•π•’π•Ÿπ•”]]Β 
-    * [[:rpi_epigen|Private Cellarium ─ EPiGEN Crystal]]Β +    * [[debian_common|β–  General info on Debian Linux]]Β 
-    * [[:rpi_nimbus|Webius Officium ─ NiMBUS deBlanc]]Β +    * [[deb_cicada|𝐂𝐒𝐂𝐀𝐃𝐀 π•Šπ•’π•©π• π•₯π•¦π•ž]]Β 
-    * [[:debian_common|β–  General info on Debian Linux]]Β +    * [[deb_mutism|πŒπ”π“π’π’πŒ π•„π•’π•˜π•Ÿπ•¦π•ž]] Β 
-    * [[:deb_mutism|Opus Imperium ─ MUTiSM Magnum]]Β +    * [[deb_gilead|𝐆𝐒𝐋𝐄𝐀𝐃 π”Έπ•£π•˜π•–π•Ÿπ•₯𝕒]] Β 
-    * [[:deb_gilead|Actu Periculum ─ GiLEAD Argenta]]Β +    * [[deb_symbio|π’π˜πŒππ’πŽ β„‚π• π•Ÿπ•’π•₯𝕦𝕀]]Β 
-    * [[:deb_debris|Finca LaDichium ─ DEBRiS Chrome]]+    * [[deb_tardis|𝐓𝐀𝐑𝐃𝐒𝐒 π•Šπ•‘π•’π•₯π•šπ•¦π•ž]] Β 
 +    * [[deb_debris|𝐃𝐄𝐁𝐑𝐒𝐒 β„‚π•™π•£π• π•žπ•–]] 
   * {{fa>windows?color=#0000A0}} Windows   * {{fa>windows?color=#0000A0}} Windows
     * [[:pc_common|β–  Common Works on Windows]]     * [[:pc_common|β–  Common Works on Windows]]
-    * [[:pc_mesonism|Primus Workstation ─ MESONiSM]]Β +    * [[PC_MESONiSM|πŒπ„π’πŽππ’π’πŒ]] Β 
-    * [[:pc_mesonium|Manibus Tablet ─ MESONiUM]]Β +    * [[PC_MESONiST|πŒπ„π’πŽππ’π’π“]]
-    * [[:pc_mesonist|Domumus Workstage ─ MESONiST]]Β +
-    * [[:pc_mesonity|Praevus Station ─ MESONiTY]]+
   * {{fa>android?color=#006400}} Android   * {{fa>android?color=#006400}} Android
     * [[:cell_common|β–  Common Stuffs on Androids]]     * [[:cell_common|β–  Common Stuffs on Androids]]
-    * [[:cell_epiaux|JΓΊne's Primus ─ EPiAUX 5X]]Β +    * [[CELL_EPiCON|π„ππ’π‚πŽπ π”½πŸ™]] Β 
-    * [[:cell_epihex|JΓΊne's Extentus ─ EPiHEX 6]]Β +    * [[CELL_EPiMER|π„ππ’πŒπ„π‘ 𝟑]] Β 
-    * [[:cell_epinex|JΓΊne's Secondus ─ EPiNEX 5]]Β +    * [[CELL_EPiLUX|𝐄𝐏𝐒𝐋𝐔𝐗 𝟟]]   Β 
-    * [[:cell_epitab|JΓΊne's Laminus - EPiTAB 7]]Β +    * [[CELL_EPiTAP|𝐄𝐏𝐒𝐓𝐀𝐏 πŸ™πŸ™]] Β 
-    * [[:cell_epixus|JΓΊne's Tertius ─ EPiXUS 4]]+    * [[CELL_EPiETA|𝐄𝐏𝐒𝐄𝐓𝐀 𝟜]] 
 </nav> </nav>
  
Line 75: Line 74:
  
 <code bash> <code bash>
-  sudo passwd root +sudo passwd root 
 </code>   </code>  
  
Line 91: Line 90:
  
 <code autoconf> <code autoconf>
-  # User privilege specificationΒ +# User privilege specificationΒ 
-  root    ALL=(ALL:ALL) ALLΒ +root    ALL=(ALL:ALL) ALLΒ 
-  userid   ALL=(ALL) NOPASSWD: ALL+userid   ALL=(ALL) NOPASSWD: ALL
 </code> </code>
  
Line 126: Line 125:
 sudo rpi-update  sudo rpi-update 
 </code>  </code> 
 +
 +----
 +
 +==== Mount external disk(s) ==== 
 +
 +Check attached or plugin devices using 
 +
 +<code bash> 
 +sudo blkid
 +</code> 
 +
 +=== Format the disk with ext4 ===
 +
 +<code bash> 
 +sudo mkfs.ext4 /dev/sdXY 
 +</code>
 +
 +=== Mount NTFS formatted disk ===
 +
 +NTFS format has little advantage under Linux system but could mount it as well  
 +
 +<code bash> 
 +sudo apt-get install ntfs-3g
 +</code>
 +
 +Formatting disk with NTFS 
 +
 +<code bash> 
 +mkfs.ntfs -Q -L diskLabel /dev/sdXY
 +</code> 
 +
 +=== Disk mount at booting ===
 +
 +Edit ''/etc/fstab'' 
 +
 +Append line(s) with device's UUID or location path ''/dev/sdXY''. strongly prefer UUID  with mount pointing 
 +
 +<code ini>
 +  UUID="dd7c1879-68c5-e9b9-bad6-789d3b8db984"     /(path)/Storage    ext4     defaults          0       0
 +</code> 
 +
 +Reboot the system and check the disk mounted. 
  
 ---- ----
Line 191: Line 232:
 ----  ---- 
  
-==== Mount external disk(s) ==== +==== Set Google Public NTP ==== 
  
-Check attached or plugin devices using Β +<accordion>Β 
-Β +<panel title="Under review"> 
-<code bashΒ +
-sudo blkidΒ +
-</code> Β +
-Β +
-=== Format the disk with ext4 ===Β +
-Β +
-<code bash> Β +
-sudo mkfs.ext4 /dev/sdXY Β +
-</code>Β +
-Β +
-=== Mount NTFS formatted disk ===Β +
-Β +
-NTFS format has little advantage under Linux system but could mount it as well  Β +
-Β +
-<code bash> Β +
-sudo apt-get install ntfs-3gΒ +
-</code>Β +
-Β +
-Formatting disk with NTFS Β +
-Β +
-<code bash> Β +
-mkfs.ntfs -Q -L diskLabel /dev/sdXYΒ +
-</code> Β +
-Β +
-=== Disk mount at booting ===Β +
-Β +
-Edit ''/etc/fstab'' Β +
-Β +
-Append line(s) with device's UUID or location path ''/dev/sdXY''. strongly prefer UUID  with mount pointing Β +
-Β +
-<code ini>Β +
-  UUID="dd7c1879-68c5-e9b9-bad6-789d3b8db984    /(path)/Storage    ext4     defaults          0       0Β +
-</codeΒ +
-Β +
-Reboot the system and check the disk mounted. Β +
-Β +
-----Β +
-Β +
-==== Set Google Public NTP ==== +
  
 Use either ''systemd-timesyncd'' or ''ntp'' service. If you wish to use ''ntp'' Use either ''systemd-timesyncd'' or ''ntp'' service. If you wish to use ''ntp''
Line 260: Line 262:
 sudo service ntp reload sudo service ntp reload
 </code>  </code> 
 +
 +</panel>
 +</accordion>
  
 ---- ----
Line 272: Line 277:
  
   * ''vim'' --- vim is a text editor. It can be used for editing any kind of text and is especially suited for editing computer programs.   * ''vim'' --- vim is a text editor. It can be used for editing any kind of text and is especially suited for editing computer programs.
 +
 +  * ''iftop'' --- iftop is a real time console-based Linux network bandwidth monitoring
  
 ---- ----
  
-==== Colorful prompt ==== +==== Time stamp prompt ==== 
  
 Edit ''~/.bashrc'' and change ''PS1'' line  Edit ''~/.bashrc'' and change ''PS1'' line 
Line 299: Line 306:
 Edit ''/etc/motd''  Edit ''/etc/motd'' 
  
-<button type="info" size="sm" icon="mdi mdi-message-text">[[https://wiki.meson.one/doku.php?id=secured:motd_raspbian|Live Configuration]]</button>+<button type="danger" size="sm" icon="mdi mdi-message-text">[[https://wiki.meson.one/doku.php?id=secured:motd_raspbian|Live Configuration]]</button>
  
 Create ''20-disks'' (arbitrary name) and edit in ''/etc/update-motd.d/''  Create ''20-disks'' (arbitrary name) and edit in ''/etc/update-motd.d/'' 
Line 311: Line 318:
  
 Script shows the information of the attached disks, which also reminds whether disk is mounted or not.  Script shows the information of the attached disks, which also reminds whether disk is mounted or not. 
 +
 +<code ini> 
 +Mounted on             Type  Size  Used Avail Use%
 +/home/userid/disk1     ext4  917G  338G  533G  39%
 +/home/userid/disk2     ext4  458G  307G  128G  71% 
 +</code> 
  
 ----    ----   
 ==== Move directories & files using rsync ====  ==== Move directories & files using rsync ==== 
 +
 +<accordion>
 +<panel title="Under review">
 ''rsync'' is useful command to transfer data from source to destination.  ''rsync'' is useful command to transfer data from source to destination. 
  
Line 326: Line 342:
  
 After running ''rsync'' command, ''find'' command runs to find and delete empty directories.  After running ''rsync'' command, ''find'' command runs to find and delete empty directories. 
 +</panel>
 +</accordion> 
  
 ---- ----
-==== hash sum mismatch during apt-get update ====  
  
-This problem has something to do with ''slow connection'' or ''connection failure'' due to bad network situation. +==== Upgrade Raspbian from Jessie to Stretch ==== 
  
-<code bash> Β +[[https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=184830|Upgrade video guide]]  | [[https://www.52pi.com/blog/7-upgrade-raspbian-jessie-to-raspbian-stretch|Upgrade Guide]] 
-sudo vi /etc/apt/source.lists Β +
-</code> Β +
-Β +
-Remove downloaded repository information from the ''/var/lib/apt/lists/'' directory.+
  
 <code bash> <code bash>
-sudo rm -rf /var/lib/apt/lists/*Β +sudo apt update Β 
-</code>Β +sudo apt dist-upgrade 
-Β +
-Change mirror address seemingly to be fast. Β +
-Β +
-[[https://www.raspbian.org/RaspbianMirrors|Raspbian Mirrors]] Β +
-Β +
-This is a kind of temporary problem due to network condition. Β +
-Β +
----- Β +
-==== Upgrade Raspbian from Jessie to Stretch ==== Β +
-[[https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=184830|Upgrade video guide]] Β +
-[[https://www.52pi.com/blog/7-upgrade-raspbian-jessie-to-raspbian-stretch|Upgrade Guide]] Β +
-Β +
-<code bash>Β +
-  sudo apt-get update Β +
-  sudo apt-get upgrade Β +
-  sudo apt-get dist-upgrade +
 </code> </code>
  
Line 362: Line 359:
  
 <code bash> <code bash>
-  sudo dpkg -C+sudo dpkg -C
 </code> </code>
  
Line 368: Line 365:
  
 <code bash> <code bash>
-  sudo apt-mark showhold+sudo apt-mark showhold
 </code> </code>
  
-Packages showing ''On Hold'' will not upgrade\\ +Packages showing ''On Hold'' **will not be upgraded**Β 
 + 
 Replace ''Jessie'' to ''Stretch'' in distribution sources.  Replace ''Jessie'' to ''Stretch'' in distribution sources. 
  
 <code bash> <code bash>
-  sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list+sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list
 </code> </code>
  
Line 381: Line 379:
  
 <code bash> <code bash>
-  lsb_release -a+lsb_release -a
 </code> </code>
  
Line 439: Line 437:
 sudo reboot  sudo reboot 
 </code>  </code> 
- 
  
  
 ---- ----
  
-==== Customize login messages ====  
  
-edit or append ''/etc/update-motd.d/xx-command'', where xx is arbitrary number to set priorities.  
- 
-For example touch ''/etc/update-motd.d/20-disk'' with the following,  
- 
-<code bash>  
-#!/bin/sh 
-printf "\n" 
-df -h /dev/sd* --out=target,fstype --output=size,used,avail,pcent --type=ext4 
-printf "\n" 
-</code>  
- 
-shows size of disk, used and available capacities of ''ext4'' format disk(es).  
- 
-<code ini>  
-Mounted on             Type  Size  Used Avail Use% 
-/home/userid/disk1     ext4  917G  338G  533G  39% 
-/home/userid/disk2     ext4  458G  307G  128G  71%  
-</code>  
- 
----- 
  • rpi_common.1595924692
  • Last modified: 2020/07/28 08:24
  • by JΓΊne Park