helpful_ubuntu_commands
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| helpful_ubuntu_commands [2025/07/20 10:04] – [Helpful Ubuntu/Linux Commands and Procedures] mike | helpful_ubuntu_commands [2026/04/08 08:26] (current) – mike | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Helpful Ubuntu/ | ====== Helpful Ubuntu/ | ||
| - | ---- | + | |
| === Disable Ubuntu Pro " | === Disable Ubuntu Pro " | ||
| <color red> | <color red> | ||
| 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 < | ||
| | | ||
| === Disable colors in the vi editor by default === | === Disable colors in the vi editor by default === | ||
| Line 70: | Line 76: | ||
| === Generate password hashes (useful for Ansible playbooks amongst other things) === | === Generate password hashes (useful for Ansible playbooks amongst other things) === | ||
| mkpasswd --method=sha-512 | mkpasswd --method=sha-512 | ||
| + | | ||
| + | ==== Extracting encrypted/ | ||
| + | .zip files that have been encrypted with AES-256 cannot be extracted via the default ' | ||
| + | apt update | ||
| + | apt install 7zip | ||
| + | Once installed, use the **7zz** command to extract the file (you will be prompted for the password used to initially encrypt the archive if one was used): | ||
| + | 7zz x < | ||
| + | |||
| ==== Cookbook for passing client IP address to systems behind a reverse proxy ==== | ==== Cookbook for passing client IP address to systems behind a reverse proxy ==== | ||
| === On the reverse proxy: === | === On the reverse proxy: === | ||
| Line 99: | Line 113: | ||
| 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' | + | ==== Updating Network Settings ==== |
| + | |||
| + | === Changing the server' | ||
| sudo vi / | sudo vi / | ||
| find the existing IP and change it to the desired IP; ' | find the existing IP and change it to the desired IP; ' | ||
| sudo netplan apply | sudo netplan apply | ||
| | | ||
| - | ==== Changing the server' | + | === Changing the server' |
| hostnamectl set-hostname [new host name] | hostnamectl set-hostname [new host name] | ||
| | | ||
| + | === Changing the server' | ||
| + | Edit the **/ | ||
| + | Apply the changes with the **sudo netplan apply** command | ||
helpful_ubuntu_commands.1753031087.txt.gz · Last modified: by mike
