System Administration tips for Ubuntu
If you've enabled full disk encryption, you will need to enter a password to unlock the disk during boot-up. If you are sitting in front of your desktop, no problem. But if you want to be able to unlock the disk remotely via ssh, and let the system complete boot-up even if you are not in front of the video console, then here are the steps
Host unlock
Hostname 192.168.56.101
User root
IdentityFile /Users/ksa/.ssh/id_rsa_ubuntu_unlock
StrictHostKeyChecking no
If you have a group of 10 or fewer Ubuntu hosts you administer, you can install "Landscape On Premises Edition" in a VM to manage those hosts for free.
In addition to Landscape (or an alternative) is Cockpit which you can use to centrally manage CentOS, RedHat, Fedora, and Ubuntu hosts:
https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials
https://help.ubuntu.com/lts/serverguide/package-management.html
https://help.ubuntu.com/lts/serverguide/automatic-updates.html
Command | Relevent Pathname | Package Name | Purpose / Notes |
---|---|---|---|
apt update | update repository metadata | ||
apt upgrade | install all pending updates | ||
apt-cache policy | /etc/apt/sources.list /etc/apt/sources.list.d/ | list repository sources | |
/var/log/apt/ /var/log/dpkg.log /var/log/aptitude /var/log/unattended-upgrades/ | log file locations relevent to software management | ||
dpkg-query --list | list all installed packages | ||
dpkg-query --listfiles <package-name> | list all files owned by <package-name> | ||
dpkg-query --search <filename-pattern> | find out which installed package owns a filename | ||
apt-file search <filename-pattern> | apt-file | find out which package would install <filename-pattern>. package does not need to be installed already | |
aptitude install <package-name> apt install <package-name> apt-get install <package-name> | aptitude | install <package-name{ tip: use tab completion for actions and package names | |
apt show <package-name> aptitude show <package-name> | show details about <package-name>, including repository | ||
debconf-show <package-name> | /var/cache/debconf | show configuration options and current values of <package-name> | |
dpkg-reconfigure <package-name> | reconfigures packages after they have already been installed. | ||
aptitude changelog <package-name> | displays the changelog for <package-name> | ||
aptitude search <package-name-pattern> | search for packages which match <package-name-pattern> | ||
aptitude download <package-name> | downloads the .deb file for the given package to the current directory | ||
aptitude --simulate <action> | print the actions that would normally be performed, but don't | ||
man deb | man page describing deb package format | ||
dpkg-deb --raw-extract <package.deb> <directory> | extracts contents of <package-deb> to <directory>, including the control information files into a DEBIAN subdirectory | ||
apt-cache search meta package | list of all meta packages (a package name that installs a group of other packages) |
You may also want to use visual panels to communicate related information, tips or things users need to be aware of. |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|