debian_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
Next revisionBoth sides next revision
debian_common [2020/01/27 12:04] โ€“ [Disable power wireless off] Jรบne Parkdebian_common [2020/07/28 08:38] โ€“ [Basic commands 101] 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_autism|Media Ditorium โ”€ AUTiSM Rainbow]]
     * [[:rpi_epigen|Private Cellarium โ”€ EPiGEN Crystal]]     * [[:rpi_epigen|Private Cellarium โ”€ EPiGEN Crystal]]
     * [[:rpi_nimbus|Webius Officium โ”€ NiMBUS deBlanc]]     * [[:rpi_nimbus|Webius Officium โ”€ NiMBUS deBlanc]]
-    * [[:debian_common|General info on Debian Linux]]+    * [[:debian_common|โ–  General info on Debian Linux]]
     * [[:deb_mutism|Opus Imperium โ”€ MUTiSM Magnum]]     * [[:deb_mutism|Opus Imperium โ”€ MUTiSM Magnum]]
 +    * [[:deb_gilead|Actu Periculum โ”€ GiLEAD Argenta]]
 +    * [[:deb_debris|Finca LaDichium โ”€ DEBRiS Chrome]]
   * {{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|Primus Workstation โ”€ MESONiSM]]
     * [[:pc_mesonium|Manibus Tablet โ”€ MESONiUM]]     * [[:pc_mesonium|Manibus Tablet โ”€ MESONiUM]]
Line 14: Line 16:
     * [[:pc_mesonity|Praevus Station โ”€ MESONiTY]]     * [[: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_epiaux|Jรบne's Primus โ”€ EPiAUX 5X]]
     * [[:cell_epihex|Jรบne's Extentus โ”€ EPiHEX 6]]     * [[:cell_epihex|Jรบne's Extentus โ”€ EPiHEX 6]]
Line 22: Line 24:
 </nav> </nav>
  
-===== General info on Debian Linux ===== +====== General info on Debian ======
  
 {{:playground:boo_the_bunny_36.png?nolink&250|}} {{:playground:boo_the_bunny_36.png?nolink&250|}}
  
 ---- ----
-==== Initial steps freshly ==== +===== Initial steps ===== 
  
-=== Enable SSH === +==== Enable SSH ==== 
  
-Genesis step for all {{fa>linux}} Linux works. +Genesis step for all {{mdi>debian?2x}} Linux works. 
  
 ---- ----
Line 62: Line 64:
  
 ---- ----
-==== Configure Dynamic DNS ==== +ย 
 +==== User aliases command ==== ย 
 +ย 
 +If you don't have ''.bash_aliases'' in your home directory. ย 
 +<code bash> ย 
 +touch .bash_aliases    ย 
 +</code> ย 
 +ย 
 +''Edit'' ''.bash_aliases''. Example: Backup Nginx configuration files with date stamp. ย 
 +ย 
 +<code bash> ย 
 +alias backup_nginx='sudo rsync -avh --progress /etc/nginx/ /home/user/storage/Nginx.Config//nginx_config_`date +"%Y%m%d"`/'ย 
 +</code> ย 
 +ย 
 +----ย 
 +===== Configure Dynamic DNS ===== 
  
 === Google Domains with ddclient ===  === Google Domains with ddclient === 
Line 284: Line 301:
  
 ---- ----
 +
 +===== Disable unused settings =====
  
 ==== Disable suspend mode ====  ==== Disable suspend mode ==== 
Line 319: Line 338:
  
 ---- ----
-==== Debugging service ====  
- 
-<code bash>  
-  sudo service stop sshd   # ssd daemon for example  
-  /usr/sbin/sshd -d       # need to specify full path  
-</code>  
- 
-Find problem from messages in debugging mode.  
- 
----- 
- 
- 
  
 ==== Disable power wireless off ====  ==== Disable power wireless off ==== 
Line 363: Line 370:
  
 ---- ----
-==== User defined command alias ====  
  
-If you don't have ''.bash_aliases'' in your home directory. +==== Debugging service ==== ย 
 <code bash>  <code bash> 
-touch .bash_aliases    +  sudo service stop sshd   # ssd daemon for example ย 
 +  /usr/sbin/sshd -d       # need to specify full path 
 </code>  </code> 
  
-''Edit'' ''.bash_aliases''. Example: Backup Nginx configuration files with date stamp+Find problem from messages in debugging modeย 
 +ย 
 +----ย 
 +ย 
 +==== Configure locales ==== 
  
 <code bash>  <code bash> 
-alias backup_nginx='sudo rsync -avh --progress /etc/nginx/ /home/user/storage/Nginx.Config//nginx_config_`date +"%Y%m%d"`/'+ sudo dpkg-reconfigure locales
 </code>  </code> 
 +
 +Deselect unused ''locales'' and save them.
  
 ---- ----
 +
 +
 +===== Upgrade & Maintenance =====
 +
 +==== Major LTS upgrade ==== 
 +
 +Upgrade from 18.04 LTS to 20.04 LTS (''Focal Fossa''
 +
 +Official Guide on upgrade [[https://meson.in/2ALsTwg|How to upgrade from Ubuntu 18.04 LTS to 20.04 LTS today]] <sub>  --- Updated on //2020/07/11 03:40// </sub> 
 +
 +=== Upgrade on the command line === 
 +
 +Update all repository for packages, which already installed on the system. 
 +
 +<code bash> 
 + sudo apt update && sudo apt dist-upgrade -y && sudo apt autoremove 
 +</code> 
 +
 +Upgrade with major LTS with 
 +
 +<code bash> 
 + sudo do-release-upgrade -d 
 +</code> 
 +
 +Follow the procedures and finish.  
 +
 +<code text> 
 +Some third party entries in your sources.list were disabled. You can 
 +re-enable them after the upgrade with the 'software-properties' tool 
 +or your package manager. 
 +</code>
 +
 +----
 +
 ==== Fetch error during update ====  ==== Fetch error during update ==== 
  
Line 392: Line 440:
  
 ----  ---- 
-===== Upgrade php 7.x ===== +==== Upgrade php 7.x ==== 
  
 Append additional source for php7.x latest, Append additional source for php7.x latest,
- +<code bash> ย 
 +sudo apt install software-properties-commonย 
 +sudo add-apt-repository ppa:ondrej/phpย 
 +</code> ย 
 <code bash>  <code bash> 
 wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
-echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list+echo "deb https://packages.sury.org/php/ `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/php.list
 </code> </code>
 +
 +Append ''Nginx mainline'' packages 
 +
 +<code bash> 
 +sudo add-apt-repository ppa:ondrej/nginx-mainline
 +</code> 
 +
 +Update source lists
  
 <code bash>  <code bash> 
Line 433: Line 493:
  
 ---- ----
-====Nginx repository ===== +==== Install & upgrade Nginx ==== 
  
 Install the prerequisites: Install the prerequisites:
Line 484: Line 544:
 ==== Basic commands 101 ====  ==== Basic commands 101 ==== 
  
-{{fa>terminal?size=24&color=#AABBCC}} [[https://devhints.io/|Rico's cheatsheets]] -- First glimpse on {{fa>linux?color=#a80030}} **Linux commands**+{{fa>terminal?size=24&color=#AABBCC}} [[https://devhints.io/|Rico's cheatsheets]] -- first glimpse on {{fa>linux?color=#a80030}} **Linux commands**ย 
  
 === rm ===  === rm === 
Line 518: Line 579:
  
 ---- ----
 +
 +=== find string(s) in files ===
 +
 +<code bash> 
 +find /path/to/files/ -type f | xargs grep -n 'string_to_search'
 +</code> 
 +
 +----
 +
 === [output to file] ===  === [output to file] === 
  
Line 535: Line 605:
 | | | | | | |  | | | | | | | 
  
-ย +<code bash>ย 
-  command > output.txtย +command > output.txt   ย 
 +</code> 
 The standard output stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, it gets overwritten. The standard output stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, it gets overwritten.
  
-  command >> output.txtย +<code bash>ย 
 +command >> output.txtย 
 +</code> 
 The standard output stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, the new data will get appended to the end of the file. The standard output stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, the new data will get appended to the end of the file.
  
-  command 2> output.txtย +<code bash>ย 
 +command 2> output.txtย 
 +</code> 
 The standard error stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, it gets overwritten. The standard error stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, it gets overwritten.
  
-  command 2>> output.txtย +<code bash>ย 
 +command 2>> output.txtย 
 +</code> 
 The standard error stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, the new data will get appended to the end of the file. The standard error stream will be redirected to the file only, it will not be visible in the terminal. If the file already exists, the new data will get appended to the end of the file.
  
-  command &> output.txtย +<code bash>ย 
 +command &> output.txtย 
 +</code> 
 Both the standard output and standard error stream will be redirected to the file only, nothing will be visible in the terminal. If the file already exists, it gets overwritten. Both the standard output and standard error stream will be redirected to the file only, nothing will be visible in the terminal. If the file already exists, it gets overwritten.
  
-  command &>> output.txtย +<code bash>ย 
 +command &>> output.txtย 
 +</code> 
 Both the standard output and standard error stream will be redirected to the file only, nothing will be visible in the terminal. If the file already exists, the new data will get appended to the end of the file.. Both the standard output and standard error stream will be redirected to the file only, nothing will be visible in the terminal. If the file already exists, the new data will get appended to the end of the file..
  
-  command | tee output.txtย +<code bash>ย 
 +command | tee output.txtย 
 +</code> 
 The standard output stream will be copied to the file, it will still be visible in the terminal. If the file already exists, it gets overwritten. The standard output stream will be copied to the file, it will still be visible in the terminal. If the file already exists, it gets overwritten.
  
-  command | tee -a output.txtย +<code bash>ย 
 +command | tee -a output.txtย 
 +</code> 
 The standard output stream will be copied to the file, it will still be visible in the terminal. If the file already exists, the new data will get appended to the end of the file. The standard output stream will be copied to the file, it will still be visible in the terminal. If the file already exists, the new data will get appended to the end of the file.
  
-  (*)ย +<code bash>ย 
 +(*)ย 
 +</code> 
 Bash has no shorthand syntax that allows piping only StdErr to a second command, which would be needed here in combination with tee again to complete the table. If you really need something like that, please look at "How to pipe stderr, and not stdout?" on Stack Overflow for some ways how this can be done e.g. by swapping streams or using process substitution. Bash has no shorthand syntax that allows piping only StdErr to a second command, which would be needed here in combination with tee again to complete the table. If you really need something like that, please look at "How to pipe stderr, and not stdout?" on Stack Overflow for some ways how this can be done e.g. by swapping streams or using process substitution.
  
-  command |& tee output.txtย +<code bash>ย 
 +command |& tee output.txtย 
 +</code> 
 Both the standard output and standard error streams will be copied to the file while still being visible in the terminal. If the file already exists, it gets overwritten. Both the standard output and standard error streams will be copied to the file while still being visible in the terminal. If the file already exists, it gets overwritten.
  
-  command |& tee -a output.txtย +<code bash>ย 
 +command |& tee -a output.txtย 
 +</code> 
 Both the standard output and standard error streams will be copied to the file while still being visible in the terminal. If the file already exists, the new data will get appended to the end of the file. Both the standard output and standard error streams will be copied to the file while still being visible in the terminal. If the file already exists, the new data will get appended to the end of the file.
- 
  
 ---- ----
-=== Find string(s) in files === 
  
-<code bash>  
-find /path/to/files/ -type f | xargs grep -n 'string_to_search' 
-</code>  
  
----- 
  • debian_common
  • Last modified: 2024/04/18 08:58
  • by Jรบne Park