User Tools

Site Tools


systems:media_server:install_ubuntu_server

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
systems:media_server:install_ubuntu_server [2025/05/13 16:42] petersystems:media_server:install_ubuntu_server [2025/05/31 09:48] (current) peter
Line 10: Line 10:
   * Write the ISO image for Ubuntu Server to a USB drive.   * Write the ISO image for Ubuntu Server to a USB drive.
   * Boot from USB drive.   * Boot from USB drive.
-  * Select **Ubuntu Server (minimized)** and **Search for third-party drivers**.+  * Select **Ubuntu Server** and **Search for third-party drivers**.
   * Set a static IP.   * Set a static IP.
 +  * Guided Storage Configuration - Select to Use the entire disk, and unselect "Set up this disk as an LVM group".
   * SSH Config - Select to Install OpenSSH Server.   * SSH Config - Select to Install OpenSSH Server.
   * Reboot.   * Reboot.
   * Update.   * Update.
 +  * Clean up.
   * Reboot again.   * Reboot again.
 +
  
  
Line 23: Line 26:
 **ALERT**:  To prevent accidentally installing Ubuntu on the wrong drive and overwriting data it is recommended to disconnect data drives during installation. **ALERT**:  To prevent accidentally installing Ubuntu on the wrong drive and overwriting data it is recommended to disconnect data drives during installation.
 </WRAP> </WRAP>
 +
 +----
 +
 +===== Set a static IP =====
 +
 +<code>
 +Subnet:          192.168.1.0/24
 +Address:         192.168.1.85
 +Gateway:         192.168.1.1
 +Name Servers:    192.168.1.1, 192.168.1.50
 +Search Domains:  <blank>
 +</code>
  
 ---- ----
Line 32: Line 47:
 </code> </code>
  
 +----
 +
 +===== Clean up =====
 +
 +<code bash>
 +sudo apt autoremove
 +sudo apt clean
 +sudo reboot
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This removes any unnecessary packages and cleans up the apt cache.
 +</WRAP>
  
 ---- ----
  
-===== Set static IP =====+===== Change the default shell to bash ===== 
 + 
 +By default, Ubuntu has Dash as the default shell. 
 + 
 +  * Bash is preferred. 
 +  * The reason that dash was set as the default is that dash provides faster boot times. 
 +  * It does not however have the full feature set offered by bash. 
 +  * On modern server this speed difference in booting is negligible; and not too important as servers usually are not booted very often.  
 + 
 + 
 +===Check what /bin/sh links to ==== 
 + 
 +<code bash> 
 +ls -al /bin/sh 
 +</code> 
 + 
 +returns:
  
 <code> <code>
-Subnet:          192.168.1.0/24 +lrwxrwxrwx root root 4 Mar 31  2024 /bin/sh -dash
-Address:         192.168.1.85 +
-Gateway:         192.168.1.1 +
-Name Servers:    192.168.1.1, 192.168.1.50 +
-Search Domains:  <blank>+
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  This shows that /bin/sh links to dash.
 +</WRAP>
 +
 +----
 +
 +==== Change the Link for /bin/sh to bash ====
 +
 +<code bash>
 +sudo ln -sf bash /bin/sh
 +</code>
 +
 +----
 +
 +==== Recheck what /bin/sh links to ====
 +
 +<code bash>
 +ls -al /bin/sh
 +</code>
 +
 +returns:
 +
 +<code>
 +lrwxrwxrwx 1 root root 4 May 30 15:15 /bin/sh -> bash
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This shows that /bin/sh now links to bash.
 +
 +  * On older Ubuntu systems the following could be used, but this no longer works on new versions: <code bash>
 +sudo dpkg-reconfigure dash
 +</code>
 +
 +  * When asked **Install dash as /bin/sh?** specify **No**. 
 +
 +</WRAP>
 +
 +
 +----
 +
 +===== Update inputrc =====
 +
 +Update **/etc/inputrc** to support being able to use arrow keys for history searches.
 +
 +Add the following lines to the bottom of the file.
 +
 +<file bash /etc/inputrc>
 +...
 +# Peter added these
 +"\e0A": history-search-backward
 +"\e0B": history-search-forward
 +"\e0C": forward-char
 +"\e0D": backward-char
 +"\e[A": history-search-backward
 +"\e[B": history-search-forward
 +"\e[C": forward-char
 +"\e[D": backward-char
 +</file>
 +
 +
 +<WRAP info>
 +**NOTE:**  This allows one to type the first letter of a previous command, and then by using the arrow up key for example, will only show previous commands also starting with that letter.
 +</WRAP>
 +
 +----
 +
 +===== Remove snap if installed =====
 +
 +==== List all installed Snap packages ====
 +
 +<code bash>
 +snap list
 +</code>
 +
 +----
 +
 +==== Remove all the Snap packages ====
 +
 +<code bash>
 +sudo snap remove <package_name>
 +</code>
 +
 +----
 +
 +==== Purge snapd ====
 +
 +<code bash>
 +sudo apt purge snapd
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  Clean up any remaining directories.
 +</WRAP>
 +
 +----
 +
 +==== Set the timezone ====
 +
 +<code bash>
 +sudo dpkg-reconfigure tzdata
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  Select the appropriate location.
 +</WRAP>
 +
  
 ---- ----
systems/media_server/install_ubuntu_server.1747154562.txt.gz · Last modified: 2025/05/13 16:42 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki