Debian Linux Administration

Debian Linux is a very stable, easily upgraded, free version of Linux. It is worth checking out.

This section discusses some common Debian tasks.


Networking files on Debian Linux

Networking configuration and eth0 is configured in the file /etc/network/interfaces

If the system is set up to use dhcp, then the /etc/network/interfaces would contain:

iface eth0 inet dhcp

To change the system to use a static IP address, change the /etc/network/interfaces file to:

iface eth0 inet static
    address 192.168.12.2
    netmask 255.255.255.0
    gateway 192.168.12.254

Packages: adding, removing, searching, etc.

Let's say you wanted to remove your current xserver and upgrade to a newer xserver:
apt-cache search xserver
dpkg -r xserver-s3v
dpkg-reconfigure xserver-xfree86

The rest of this section lists various commands you might want to use with packages.

To find out which packages are available to install on a topic, such as xserver:

apt-cache search xserver
To download and install a package:
apt-get install xserver-xfree86
To see information about a package:
apt-cache show package name
Gives dependency information for a package:
apt-cache showpkg package-name
List all packages installed:
dpkg --list
List some packages that have *foo in them:
dpkg --list '*foo'
To get more information on a package:
dpkg --status packagename
To search:
dpkg --search filename
To check the state of all packages on your system:
dpkg -l | more
dpkg --get-selections > ~/currrent-pkgs.txt
To remove a package:
dpkg -r xserver-s3v
To configure a package:
dpkg-reconfigure xserver-xfree86S

Upgrading Debian

To upgrade, change references in /etc/apt/sources.list from stable to unstable:
deb http://debian.crosslink.net/debian/ unstable main non-free contrib
deb-src http://debian.crosslink.net/debian/ unstable main non-free contrib
Then run:
# apt-get update
Get:1 http://debian.crosslink.net unstable/main Packages [1931kB]
Get:2 http://debian.crosslink.net unstable/main Release [82B]
....
Then you can upgrade:
apt-get -u dist-upgrade

Debian tips

Debian packages you can delete after you're done with if you want to:
/var/cache/apt/archives

To clean out the cache:

apt-get clean

Where to get more information

Linux Quick Reference Home
Linux Migration Home