5 https://help.ubuntu.com/community/AptGet/Howto
7 [Ubuntu comparison of apt-get vs. yum commands](https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora)
9 # show installed packages
12 # show info for a package
13 dpkg --status package_name
15 # show files owned by a package
16 dpkg --listfiles package_name
18 # resynchronize the package index files from their sources
21 # install the newest versions installed packages
24 # install packages that are "kept back"
27 # for clearing out unused linux-headers, for example
30 # search for packages with a given string (i.e. json)
33 ### `apt-get dist-upgrade`
35 "-y Assume Yes to all queries and do not prompt" is not recommended for `apt-get dist-upgrade`
37 http://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it
39 http://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade
43 useradd -m myuser -s /bin/bash
45 https://help.ubuntu.com/community/AddUsersHowto
47 ## Shutdown and restart
53 ## Change default $EDITOR from nano to vim
55 update-alternatives --config editor
59 ## Give user sudo access
61 newuser ALL=(ALL:ALL) ALL
65 newuser ALL=NOPASSWD: ALL
67 https://www.digitalocean.com/community/tutorials/how-to-add-delete-and-grant-sudo-privileges-to-users-on-a-debian-vps
71 # so that firewall rules load at boot
72 apt-get install iptables-persistent
74 vim /etc/iptables/rules.v4
76 iptables-restore < /etc/iptables/rules.v4
78 invoke-rc.d iptables-persistent save
80 ### Sample iptables firewall rules
82 root@server2:~# cat /etc/iptables/rules.v4
83 # Generated by iptables-save v1.4.21 on Wed Oct 14 22:17:08 2015
87 :OUTPUT ACCEPT [72:34181]
88 -A INPUT -i lo -j ACCEPT
89 -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
90 -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
91 -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
94 # Completed on Wed Oct 14 22:17:08 2015
97 https://help.ubuntu.com/community/IptablesHowTo
99 https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04
105 sudo apt-get install apache2
107 https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
111 systemctl reload apache2
115 a2ensite data.greptilian.com
123 sudo apt-get install mysql-server
125 https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial
129 sudo timedatectl set-timezone America/New_York
131 https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-18-04