--- format: rst toc: no ... =========================== Debian Linux =========================== See also `freebsd `_ and `unix `_ tricks. Some gotchas from installing debian a few times: * To enable sshd in ubuntu install ``openssh-server`` * Massive ``ssh`` headache issues from around 2007-2008; make sure to check on these. * ``git`` is not what you want; you want ``git-core`` * Python transition should be better, but I couldn't find a way. To get to python 2.5 on etch, do something like:: Edit /usr/share/python/debian_defaults to this Code: # the default python version default-version = python2.5 # all supported python versions supported-versions = python2.4, python2.5 # formerly supported python versions old-versions = python2.3 # unsupported versions, including older versions unsupported-versions = python2.3 Then sudo pycentral updatedefault python2.4 python2.5 And change the symlink /usr/bin/python to point to python2.5 * Make sure to install things like bzip2, unzip, less, etc * ``bash`` by default takes a very long time to initialize because the auto-completion scripts are loaded multiple times; disable this in ``~/.bashrc``? See also [bash]. * For building stuff you want ``build-essential`` * For the usual system man pages ("Linux Programmer's Manual"), you may need to install 'manpages-dev' * To install emacs without an X environment, use ``emacs23-nox`` (or a more recent version). * To change time zone: ``sudo dpkg-reconfigure tzdata`` * Might want oss-comapt for, eg, baudline? Debian Package Tools ------------------------------ ``dkpg -S somefile`` shows what packages a given file were installed by. ``dpkg -L somepackage`` lists all the files installed by that package. ``apt-rdepends -r somepackage`` shows all packages depending on a given package, recursively. You probably just want the first group, not the full recursive tree. To *not* install "recommended" or "suggested" packages, pass ``-R`` as an argument to ``aptitute``. To find out *why* a package has been installed (or guess why it might be?) use the ``aptitude why `` command. To extract the contents of a .deb file, use the ``ar`` command, then extract data.tar.gz: ar vx somepackage.deb tar xvf data.tar.gz Debian Packaging ------------------- sudo aptitude install gcc-4.4-arm-linux-gnueabi Wheezy to Jessie Migration ----------------------------- Had trouble doing dist-upgrade. Ran `sudo apt-get install init` to fix init and then continued with dist-upgrade. Permissions problem with changing wifi settings ("(32) Not authorized to control networking"). Tried: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749778` Add a Launchpad PPA ---------------------- First, deps: sudo apt-get install software-properties-common python-software-properties Then: sudo add-apt-repository ppa:some/ppa If it's an Ubuntu-only PPA, you'll need to edit the `/etc/apt/sources.list.d/blah.list` and substitute the best Debian alternative. Eg, for wheezy, 'trusty' is probably the closest.