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:25] – [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 170: Line 169:
  
 ---- ----
 +==== Configure wireless connection ==== 
 +
 +<accordion>
 +<panel title="Under review"> 
 +
 +  * Check wireless & configuration ''sudo iwconfig'' to find wireless is available. 
 +  * Change proper configuration with editing ''/etc/network/interfaces'' 
 +
 +{{fa>warning?size=16&color=#b84592}} Since ''Stretch'', ''/etc/network/interfaces'' is not useless unless stop ''dhcpcd'' service. Use ''/etc/dhcpcd.conf'' instead. 
 +
 +<code ini>
 +# Do not use in Stretch 
 +  allow-hotplug wlan0
 +  iface wlan0 inet static
 +    address 192.168.abc.xyz
 +    netmask 255.255.255.0
 +    gateway 192.168.abc.1
 +    dns-nameservers 8.8.8.8 8.8.4.4
 +    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
 +</code>
 +
 +''Edit'' ''/etc/dhcpcd.conf'' for static IP address
 +<code ini> 
 +# Here is an example which configures a static address, routes and dns.
 +# define static profile
 +profile static_eth0
 +static ip_address=192.168.1.23/24
 +static routers=192.168.1.1
 +static domain_name_servers=192.168.1.1
 +
 +# fallback to static profile on eth0
 +interface eth0
 +fallback static_eth0
 +</code>
 +
 +This configuration is static (fixed) IP with assigned DNS servers. ''fallback'' option is possible to configure a static profile within dhcpcd and fall back to it when DHCP lease fails.
 +
 +  * Edit ''/etc/wpa_supplicant/wpa_supplicant.conf''  
 +
 +<code autoconf>
 +  country=US
 +  ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 +  update_config=1
 +  
 +  network={
 +    ssid="YOUR_SSID"
 +    psk="YOUR_PRESHARED_KEY_FOR_WIRELESS"
 +    key_mgmt=WPA-PSK
 +  }
 +</code>
 +
 +  * Gear wireless up 
 +
 +<code bash>
 +  sudo ip link set wlan0 down
 +  sudo ip link set wlan0 up
 +</code> 
 +
 +</panel>
 +</accordion>
 +
 +---- 
  
 ==== Set Google Public NTP ====  ==== Set Google Public NTP ==== 
 +
 +<accordion>
 +<panel title="Under review"> 
  
 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 198: Line 262:
 sudo service ntp reload sudo service ntp reload
 </code>  </code> 
 +
 +</panel>
 +</accordion>
  
 ---- ----
Line 210: 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 237: 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 249: 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 264: 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 300: Line 359:
  
 <code bash> <code bash>
-  sudo dpkg -C+sudo dpkg -C
 </code> </code>
  
Line 306: 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 319: Line 379:
  
 <code bash> <code bash>
-  lsb_release -a+lsb_release -a
 </code> </code>
  
Line 377: 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.1595924705
  • Last modified: 2020/07/28 08:25
  • by JΓΊne Park