ad5f96fccdbf36f1110b0750217bfdbd8a48c46b
[wiki.git] / ubuntu.mdwn
1 [[!toc levels=99]]
2
3 ## Package management
4
5 https://help.ubuntu.com/community/AptGet/Howto
6
7 [Ubuntu comparison of apt-get vs. yum commands](https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora)
8
9     # show installed packages
10     dpkg --list
11
12     # show info for a package
13     dpkg --status package_name
14
15     # show files owned by a package
16     dpkg --listfiles package_name
17
18     # resynchronize the package index files from their sources
19     apt-get update
20
21     # install the newest versions installed packages
22     apt-get upgrade
23
24     # install packages that are "kept back"
25     apt-get dist-upgrade
26
27     # for clearing out unused linux-headers, for example
28     apt-get autoremove
29
30     # search for packages with a given string (i.e. json)
31     apt-cache search json
32
33 ### `apt-get dist-upgrade`
34
35 "-y  Assume Yes to all queries and do not prompt" is not recommended for `apt-get dist-upgrade`
36
37 http://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it
38
39 http://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade
40
41 ## User management
42
43     useradd -m myuser -s /bin/bash
44
45 https://help.ubuntu.com/community/AddUsersHowto