I discovered the -L switch on dpkg recently.
It is used to view what files were installed as a result of installing a particular package.
jmccrohan@lambda:~$ dpkg -L lsb-base
/.
/lib
/lib/lsb
/lib/lsb/init-functions
/etc
/etc/lsb-base
/etc/lsb-base-logging.sh
/usr
/usr/share
/usr/share/doc
/usr/share/doc/lsb-base
/usr/share/doc/lsb-base/copyright
/usr/share/doc/lsb-base/README.Debian.gz
/usr/share/doc/lsb-base/changelog.Debian.gz
Read more →
I discovered sysv-rc-conf today. sysv-rc-conf is a nice ncurses interface to view the runlevels of services in the /etc/init.d/ directory.
sysv-rc-conf is available in the Debian and Ubuntu repos:
apt-get install sysv-rc-conf Here, I’ve used stopped mysql from starting when I boot my machine:
Read more →
I lock my screen when I know I’m popping away from the computer for a few minutes. It therefore makes sense to place the screen(s) in sleep mode while I’m away.
On Linux, I use this handy script from a fellow called Marco. I’ve packaged it up for Debian and Ubuntu users to make it easier to install, and can be downloaded from here.
On Windows, I use this little program from a fellow called Kevin.
Read more →
Below is a grep one-liner to look through the logs and find out what was recently installed. Comes in handy if you can’t remember what the exact name of that package you installed earlier was.
grep "install\ " /var/log/dpkg.log This should give you a helpful output in the form below:
root@lambda:~# grep "install\ " /var/log/dpkg.log 2011-07-05 09:17:07 install libpam-modules-bin <none 1.1.3-2 2011-07-05 09:17:13 install libsane-common <none 1.0.22-4 2011-07-05 09:17:52 install libqzeitgeist0 <none 0.
Read more →
When sysadmining a number Debian machines, you start to get sick of the default login message very quickly (and they all start to look the same too!):
Linux alpha 2.6.32-5-amd64 #1 SMP Wed May 18 23:13:22 UTC 2011 x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Read more →
kexec is a handy tool which allows you to perform faster reboots. kexec works by using the existing kernel that is already in memory to boot again. The result is that you do not have to see the BIOS screen again, the new kernel will execute immediately after the system has halted.
To install kexec on a Debian/Ubuntu system, use the following commands:
apt-get install kexec-tools dpkg-reconfigure kexec-tools This will make kexec your default handler for reboots.
Read more →
By default, standard users are not allowed to access the serial ports on a Debian machine. A workaround is to run that program as root, but this is inherently unsafe. A better solution is to add your unprivileged user account to the dialout group.
usermod -a -G dialout username This allows an unprivileged account to access the system’s serial ports. This is handy with programs such as the Arduino IDE, which require serial port access to program the microprocessors.
Read more →
Wine is a compatibility layer to allow you to run Windows programs on Linux with near native efficiency. I use Wine to run foobar2000 on Linux. On Windows, foobar2000 supports upmixing stereo tracks into 5.1 surround sound. This was the first thing I missed when I moved my Desktop to Linux full time.
After a good bit of googling, it turns out that it is actually possible to pass 5.1 surround sound from a Wine application to the native Linux sound driver.
Read more →
Officially, Skype is not supported on 64-bit Debian. In reality, it works perfectly.
If you try to install the official .deb package, dpkg will give you an error:
root@lambda:~# dpkg -i skype-debian_2.1.0.81-1_i386.deb dpkg: error processing skype-debian_2.1.0.81-1_i386.deb (--install): package architecture (i386) does not match system (amd64) Errors were encountered while processing: skype-debian_2.1.0.81-1_i386.deb This package works fine if the architecture check is overridden.
wget http://www.skype.com/go/getskype-linux-deb root@lambda:~# dpkg -i --force-architecture getskype-linux-deb
Read more →