User Tools

Site Tools


ubuntu_tips_tricks_and_notes

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
ubuntu_tips_tricks_and_notes [2026/04/27 12:19] mikeubuntu_tips_tricks_and_notes [2026/05/22 09:09] (current) mike
Line 1: Line 1:
 ====== Ubuntu Tips, Tricks and Notes ====== ====== Ubuntu Tips, Tricks and Notes ======
  
-==== Mirrors ====+===== Mirrors =====
 The default mirror is **%%http://us.archive.ubuntu.com/ubuntu/%%** The default mirror is **%%http://us.archive.ubuntu.com/ubuntu/%%**
  
 The preferred mirror is **%%http://mirrors.mit.edu/ubuntu/%%** The preferred mirror is **%%http://mirrors.mit.edu/ubuntu/%%**
  
-=== Determine the fastest mirror ===+==== Determine the fastest mirror ====
   snap install mirrorselect   snap install mirrorselect
   mirrorselect --country us   mirrorselect --country us
      
-==== Post-Installation ====+===== Post-Installation =====
 Make the output of the **df** command more friendly and less cluttered by creating a system-wide alias for it: Make the output of the **df** command more friendly and less cluttered by creating a system-wide alias for it:
   echo "alias df='df -h -x squashfs -x tmpfs -x devtmpfs'" >> /etc/profile.d/aliases.sh   echo "alias df='df -h -x squashfs -x tmpfs -x devtmpfs'" >> /etc/profile.d/aliases.sh
Line 16: Line 16:
 Make sure to set the "always_set_home" variable in the sudoers file (using **visudo**) Make sure to set the "always_set_home" variable in the sudoers file (using **visudo**)
  
-=== Disable IPv6 ===+==== Disable IPv6 ====
 To disable IPv6 on Ubuntu during boot time, open the /etc/default/grub file using your favorite text editor with root privileges and change/add: To disable IPv6 on Ubuntu during boot time, open the /etc/default/grub file using your favorite text editor with root privileges and change/add:
   FROM:   FROM:
Line 29: Line 29:
 Reboot the system afterwards. Reboot the system afterwards.
  
-=== Enable console screen blanking ===+==== Enable console screen blanking ====
 Edit the /etc/default/grub file using your favorite text editor with root privileges and add the string **consoleblank=600** to the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX lines for a 10-minute timeout.   Edit the /etc/default/grub file using your favorite text editor with root privileges and add the string **consoleblank=600** to the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX lines for a 10-minute timeout.  
  
Line 37: Line 37:
 Reboot the system afterwards. Reboot the system afterwards.
  
-=== To install Samba: ===+==== To install Samba: ====
  
   sudo apt-get install samba cifs-utils   sudo apt-get install samba cifs-utils
  
-=== To install NFS: ===+==== To install NFS: ====
  
   sudo apt-get install nfs-common nfs-kernel-server   sudo apt-get install nfs-common nfs-kernel-server
  
-=== To install mysql: ===+==== To install mysql: ====
  
   sudo apt install mysql-server   sudo apt install mysql-server
   sudo mysql_secure_installation   sudo mysql_secure_installation
  
-=== Customizing the MOTD ===+==== Customizing the MOTD ====
 Put any customization data into /etc/motd Put any customization data into /etc/motd
  
-=== Installing apache and php ===+==== Installing apache and php ====
   sudo apt update   sudo apt update
   sudo apt install apache2   sudo apt install apache2
Line 60: Line 60:
   sudo apt install phpmyadmin php-mbstring php-gettext   sudo apt install phpmyadmin php-mbstring php-gettext
  
-=== Install phpmyadmin ===+==== Install phpmyadmin ====
  
   sudo apt update   sudo apt update
Line 70: Line 70:
   mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';   mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
  
-=== Installing Portainer to manage Docker containers ===+==== Installing Portainer to manage Docker containers ====
  
   sudo docker run -d -p 9443:9443 -p 8000:8000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest   sudo docker run -d -p 9443:9443 -p 8000:8000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
  
-=== Disable interactive restart prompt while upgrading packages with apt ===+==== Disable interactive restart prompt while upgrading packages with apt ====
 The trouble in this case is with the ''needrestart'' command, which is part of the apt-get upgrade process in Ubuntu now. By default this is set to “interactive” mode which causes the interruption of scripts. The trouble in this case is with the ''needrestart'' command, which is part of the apt-get upgrade process in Ubuntu now. By default this is set to “interactive” mode which causes the interruption of scripts.
  
Line 85: Line 85:
 ''$nrconf{restart} = 'a';'' (if we want to restart the services automatically) or ''$nrconf{restart} = 'l';'' to simply list the services that need restart. ''$nrconf{restart} = 'a';'' (if we want to restart the services automatically) or ''$nrconf{restart} = 'l';'' to simply list the services that need restart.
  
-==== Ubuntu Desktop (Gnome/GUI) Stuff ====+===== Ubuntu Desktop (Gnome/GUI) Stuff =====
  
-=== Set login screen default resolution ===+==== Set login screen default resolution ====
   - Login and set the screen resolution as desired.   - Login and set the screen resolution as desired.
   - Once set, copy the file **~/.config/monitors.xml** to **/var/lib/gdm3/.config/monitors.xml**.   - Once set, copy the file **~/.config/monitors.xml** to **/var/lib/gdm3/.config/monitors.xml**.
Line 93: Line 93:
   - Reboot the system to apply the changes.   - Reboot the system to apply the changes.
  
-=== Eliminating the annoying repeated authentication dialogs when logging in via xrdp ===+==== Eliminating the annoying repeated authentication dialogs when logging in via xrdp ====
 Edit the file **/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla**; paste the following config into it and then save it: Edit the file **/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla**; paste the following config into it and then save it:
  
Line 105: Line 105:
 If the issue persists afterwards, a reboot of the system should resolve it. If the issue persists afterwards, a reboot of the system should resolve it.
  
-=== Fixing the Low Battery Alert ===+==== Fixing the Low Battery Alert ====
 Found on Reddit; will "clean it up" later... Found on Reddit; will "clean it up" later...
  
ubuntu_tips_tricks_and_notes.1777317563.txt.gz · Last modified: by mike

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki