Posts Tagged ‘linux’

How to find the Debian version

Sometimes it’s good to know which kind of Debian version you are running on your system. This small article shows you how to check for the version.

(more…)

GNU nano shortcuts

The GNU Nano is one of the most used editors on Linux and has also a shinier UI compared to vi/vim. This article contains some shortcuts which simplify life.

(more…)

Kill processes by their name

Sometimes you have lots of processes running on your Linux system and you want to kill them all. But you don’t want to spend too much time on killing each process by their process id. A good way to handle with this problem is to combine ps, with grep and awk:

ps -lax | grep "MY SEARCH PATTERN"| awk '{print $3}' | xargs kill -9

In this case I am getting the whole process list, then I search for processes which contain MY SEARCH PATTERN. After this I am getting the 3rd column, because there is the process ID. After that we kill ‘em all!

The Story of Linux: Commemorating 20 Years of the Linux Operating System

Enable crontab logging in Debian Linux

By default the logging for the cron demon is not active in Debian Linux. To activate it, please open the file /etc/rsyslog.conf via

vi /etc/rsyslog.conf

and uncomment the line

# cron.*                          /var/log/cron.log

After that you need to restart rsyslog via

/etc/init.d/rsyslog restart

and you will find the cron logs in /var/log/cron.log

Cannot set LC_* to default locale

I got the following errors when I ran

locale

on my Debian installation:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory

To fix this I executed

localedef -i en_US -c -f UTF-8 en_US.UTF-8

to redefine my locale-settings.