[[!toc levels=99]] ## Package management https://help.ubuntu.com/community/AptGet/Howto [Ubuntu comparison of apt-get vs. yum commands](https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora) # show installed packages dpkg --list # show info for a package dpkg --status package_name # show files owned by a package dpkg --listfiles package_name # resynchronize the package index files from their sources apt-get update # install the newest versions installed packages apt-get upgrade # install packages that are "kept back" apt-get dist-upgrade # for clearing out unused linux-headers, for example apt-get autoremove # search for packages with a given string (i.e. json) apt-cache search json ### `apt-get dist-upgrade` "-y Assume Yes to all queries and do not prompt" is not recommended for `apt-get dist-upgrade` http://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it http://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade ## User management useradd -m myuser -s /bin/bash https://help.ubuntu.com/community/AddUsersHowto ## Shutdown and restart poweroff reboot ## Change default $EDITOR from nano to vim update-alternatives --config editor Choose "vim.basic". ## Give user sudo access newuser ALL=(ALL:ALL) ALL or newuser ALL=NOPASSWD: ALL https://www.digitalocean.com/community/tutorials/how-to-add-delete-and-grant-sudo-privileges-to-users-on-a-debian-vps ## iptables https://help.ubuntu.com/community/IptablesHowTo https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04 ## Apache httpd sudo apt-get install apache2 https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts ## MySQL sudo apt-get install mysql-server https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial