User Tools

Site Tools


os:linux:start

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
os:linux:start [2024-03-07 17:39] Manuel Freios:linux:start [2024-06-27 18:37] (current) Manuel Frei
Line 1: Line 1:
 ====== Linux ====== ====== Linux ======
  
 +  * [[os:linux:apt|APT]]
   * [[os:linux:kernel-tuning|Kernel-Tuning]]   * [[os:linux:kernel-tuning|Kernel-Tuning]]
   * [[os:linux:read_hfsplus|Read HFS+ Partition]]   * [[os:linux:read_hfsplus|Read HFS+ Partition]]
Line 10: Line 11:
   * [[os:linux:tmux|tmux]]   * [[os:linux:tmux|tmux]]
   * [[apps:systemd]]   * [[apps:systemd]]
-  + 
-==== Backup directory ====+===== Backup directory =====
   rsync -vr /home/user/important_directory /media/some_hdd/backups/   rsync -vr /home/user/important_directory /media/some_hdd/backups/
  
 **Hint:** With a / at the end of the first directory, all sub directories are copied directly to the destination folder. Without / it will create the source folder (ex. important_directory) with all sub directories are copied to the destination folder **Hint:** With a / at the end of the first directory, all sub directories are copied directly to the destination folder. Without / it will create the source folder (ex. important_directory) with all sub directories are copied to the destination folder
  
-==== Forward Mails of A User ====+===== Forward Mails of A User =====
  
 You have a server for example and some mails are sent directly to root. The easiest way to forward them to a real address ist to create a .forward file. You have a server for example and some mails are sent directly to root. The easiest way to forward them to a real address ist to create a .forward file.
Line 37: Line 38:
 </code> </code>
  
-==== Validate XML Against Template ====+===== Validate XML Against Template =====
  
 <code> <code>
Line 47: Line 48:
 </code> </code>
  
-==== Links ====+ 
 +===== fstrim ===== 
 + 
 +On major Linux distributions (Debian, Rocky, ...), there is a sytemd timer for fstrim prepared but not activated per default. If you are using SSDs or virtual machines and your filesystem supports it, you can enable the timer to discard unused blocks once per week. 
 + 
 +Check if the timer is already enabled. If 0 timers are listed, it means it's not activated. 
 +<code bash> 
 +systemctl list-timers fstrim.timer 
 +</code> 
 + 
 +Enable and immediately start the timer. 
 +<code bash> 
 +systemctl enable --now fstrim.timer 
 +</code> 
 + 
 +<code - Example> 
 +[root@server ~]# systemctl list-timers fstrim.timer 
 +NEXT LEFT LAST PASSED UNIT ACTIVATES 
 + 
 +0 timers listed. 
 +Pass --all to see loaded but inactive timers, too. 
 +[root@server ~]# systemctl enable --now fstrim.timer 
 +Created symlink /etc/systemd/system/timers.target.wants/fstrim.timer → /usr/lib/systemd/system/fstrim.timer. 
 +[root@server ~]# systemctl list-timers fstrim.timer 
 +NEXT                         LEFT        LAST PASSED UNIT         ACTIVATES 
 +Mon 2024-07-01 01:28:50 CEST 4 days left -    -      fstrim.timer fstrim.service 
 + 
 +1 timers listed. 
 +Pass --all to see loaded but inactive timers, too. 
 +</code> 
 + 
 +===== Ubuntu Desktop to Ubuntu Server ===== 
 + 
 +<code> 
 +apt-get purge libx11.* libqt.* 
 +apt-get autoremove 
 +</code> 
 + 
 +Source: [[https://askubuntu.com/a/484464|askubuntu.com]] 
 + 
 +===== Links =====
   * [[https://eklitzke.org/stdout-buffering|Stdout Buffering]]   * [[https://eklitzke.org/stdout-buffering|Stdout Buffering]]
   * [[https://eli.thegreenplace.net/2018/measuring-context-switching-and-memory-overheads-for-linux-threads/|Measuring context switching and memory overheads for Linux threads]]   * [[https://eli.thegreenplace.net/2018/measuring-context-switching-and-memory-overheads-for-linux-threads/|Measuring context switching and memory overheads for Linux threads]]
   * [[https://linoxide.com/how-to-check-disk-queue-length-in-linux/|How to Check Disk Queue Length in Linux]]   * [[https://linoxide.com/how-to-check-disk-queue-length-in-linux/|How to Check Disk Queue Length in Linux]]
  
os/linux/start.1709829542.txt.gz · Last modified: 2024-03-07 17:39 by Manuel Frei