Ubuntu | Cookbook

Inhaltsverzeichnis

User and Groups

Change users name

exec sudo -i
killall -u [oldname]
id [oldname]
usermod -l [newname] [oldname]
groupmod -n [newname] [oldname]
usermod -d /home/[newname] -m [newname]
usermod -c "[full name (new)]" [newname]
id [newname]

Change Runlevel

The systemctl isolate is temporary way. To make it permanent you have to use systemctl set-default as shown below:

sudo systemctl set-default multi-user.target

and reboot.

To revert graphical session use

sudo systemctl set-default graphical.target

Package management

apt-get updaterefresh available updates
apt-get upgradeupgrade with package replacements; 
apt-get dist-upgradeupgrade Ubuntu version
apt-get install pkginstall pkg
apt-get purge pkguninstall pkg
apt-get autoremoveRemove obsolete packages
apt-get -f install
try to fix broken packages
dpkg -i pkg.debinstall file pkg.deb (file)
dpkg --configure -a
try to fix broken packages

Info about the system

ls_release -a
 Find out used version