User Tools

Site Tools


linux:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:installation [2018/12/07 11:13]
mstraub [Mounting]
linux:installation [2019/10/21 14:09] (current)
mstraub [Debian (.deb)]
Line 68: Line 68:
 </​code>​ </​code>​
  
 +===== Hostname =====
 +
 +The host name is persisted in ''/​etc/​hostname''​ and can be shown with ''​hostname''​ or (using the systemd-way) with ''​hostnamectl''​.
 +
 +To change the host name
 +  - use ''​sudo hostname <​NAME>''​ to set the host name now (would not survive a reboot)
 +  - edit ''/​etc/​hostname''​ to set it permanently
 +  - edit ''/​etc/​hosts''​ to properly map the new host name to localhost
 +
 +Instead of the first two steps you can also use
 +<code bash>
 +hostnamectl set-hostname <​NAME>​
 +</​code>​
 ===== Date & Timezone ===== ===== Date & Timezone =====
  
Line 534: Line 547:
  
 ===== Debian (.deb) ===== ===== Debian (.deb) =====
-Quick overview of commands & config ​files involved in Debian:+Package management for debian is handled by the [[https://​debian-handbook.info/​browse/​stable/​sect.apt-get.html|Advanced Packaging Tool (APT)]]  
 + 
 +The configuration ​files specify (amongst others) which repositories are used for downloading packages:
 <code bash> <code bash>
-dpkg                        # simple utility to handle single packages +/​etc/​apt/​sources.list ​   # main config file 
-apt-get ​                    # install / remove / update packages (uses dpkg) +/​etc/​apt/​sources.list.d ​ # directory with more configs (mostly for repositories with their own config ​file)
-apt-mark ​                   # hold / unhold packages (aka apt pinning) +
-apt-cache ​                  # cache for searching packages +
-dselect ​                    # curses GUI for selecting and installing programs +
-aptitude ​                   # curses GUI and command line tool that unites apt-get, apt-cache and dselect +
-cat /​etc/​apt/​sources.list ​  ​# main config file containing addresses for package sources +
-ls /​etc/​apt/​sources.list.d ​ # directory with more config ​files containing addresses for package sources+
 </​code>​ </​code>​
  
-When not using ''​aptitude''​ the following commands are tpically used. Otherwise simply replace ​''​apt-get'' ​and ''​apt-cache'' ​with ''​aptitude''​.+Since ~2014 the standard CLI tool is ''​apt''​, which is a more modern version ​the older tools ''​apt-get''​''​apt-cache''​, etc. Most commands known from the older tools work in ''​apt''​, but most of the times with nicer or more verbose output. 
 <code bash> <code bash>
-apt-get update ​             # synchronize list of available packages with server +apt update ​       # synchronize list of available packages with server 
-apt-cache ​search ​           # search for a package (partial name is OK) +apt search ​       # search for a package (partial name is OK) 
-apt-get upgrade ​            ​# upgrade upgradable packages (not if new dependencies are requird+apt install ​      # install packages (exact name required) 
-apt-get dist-upgrade ​       # upgrade upgradable packages (and install new dependencies if required) +apt upgrade ​      ​# upgrade upgradable packages (not if new dependencies are required
-apt-get install ​            install ​packages ​(exact name required) +apt dist-upgrade ​ # upgrade upgradable packages (and install new dependencies if required) 
-apt-get remove ​             # remove packages (exact name required) but leave config files +apt list --installed ​list installed ​packages 
-apt-get purge               ​# remove packages (exact name required) and config files+apt remove ​       # remove packages (exact name required) but leave config files 
 +apt purge         ​# remove packages (exact name required) and config files 
 +</​code>​ 
 + 
 +However, if you still need the stable lower-level tools they are still available too. This is also relevant for writing scripts, as of 2019 apt tells you ''​WARNING:​ apt does not have a stable CLI interface. Use with caution in scripts.''​ 
 + 
 +<code bash> 
 +dpkg         # low-level tool to handle installations of single packages 
 +apt-get ​     # medium-level tool to install / remove / update packages and their dependencies (uses dpkg) 
 +apt-mark ​    # hold / unhold packages (aka apt pinning) 
 +apt-cache ​   # medium-level tool to query the package cache 
 +</​code>​ 
 + 
 +Finally there are also third party tools that provide similar functionality:​ 
 +<​code>​ 
 +dselect ​                    # curses GUI for selecting and installing programs 
 +aptitude ​                   # curses GUI and command line tool that unites apt-get, apt-cache and dselect
 </​code>​ </​code>​
  
linux/installation.1544177586.txt.gz · Last modified: 2018/12/07 11:13 by mstraub