User Tools

Site Tools


helpful_ubuntu_commands

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
helpful_ubuntu_commands [2025/07/20 10:04] – [Helpful Ubuntu/Linux Commands and Procedures] mikehelpful_ubuntu_commands [2026/02/07 09:29] (current) mike
Line 24: Line 24:
 === Changing default editor for visudo === === Changing default editor for visudo ===
   sudo update-alternatives --config editor   sudo update-alternatives --config editor
 +
 +If visudo complains about a missing defaults.vim file, it can be fixed thusly:
 +  sudo touch ~root/.exrc
      
 === Disable GUI screen lock === === Disable GUI screen lock ===
Line 45: Line 48:
 === Find the oldest file in a directory (and it's subdirectories) === === Find the oldest file in a directory (and it's subdirectories) ===
   find . -type f -printf '%T+ %p\n' | sort | head -n 1   find . -type f -printf '%T+ %p\n' | sort | head -n 1
 +  
 +=== Finding files by file name (or file name portion) ===
 +  find . -iname <filename to search for>  
      
 === Disable colors in the vi editor by default === === Disable colors in the vi editor by default ===
Line 99: Line 105:
 Then proceed to format the new drive, i.e. **mkfs -t ext4 /dev/sdb1** Then proceed to format the new drive, i.e. **mkfs -t ext4 /dev/sdb1**
  
-==== Changing the server's IP address ====+==== Updating Network Settings ==== 
 + 
 +=== Changing the server's IP address ===
   sudo vi /etc/netplan/00-installer-config.yaml   sudo vi /etc/netplan/00-installer-config.yaml
   find the existing IP and change it to the desired IP; 'wq' out of the file   find the existing IP and change it to the desired IP; 'wq' out of the file
   sudo netplan apply   sudo netplan apply
      
-==== Changing the server's host name ====+=== Changing the server's host name ===
   hostnamectl set-hostname [new host name]   hostnamectl set-hostname [new host name]
      
 +=== Changing the server's DNS settings === 
 +Edit the **/etc/netplan/50-cloud-init.yaml** file appropriately (file name may vary)\\ 
 +Apply the changes with the **sudo netplan apply** command
helpful_ubuntu_commands.1753031087.txt.gz · Last modified: by mike

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki