Kenno's openNOTE

My Programming Weblog

Archive for the ‘Tips’ Category

Kill all processes of a user

with 2 comments

The following command will kill all processes belong to a single user on Linux.

pkill -u username

Credit: Linux – Kill all processes for a user

Written by kenno

May 9, 2011 at 11:58 pm

Posted in Tips, Unix/Linux

Tagged with ,

Playing .ass subtitles with mplayer

leave a comment »

$ mplayer -ass -sub subtitle.ass file.avi

Written by kenno

August 29, 2010 at 11:57 am

Posted in HowTo, Tips

Tagged with

Change default editor in Debian

with one comment


# update-alternatives --config editor

There are 7 alternatives which provide `editor’.

Selection Alternative
———————————————–
1 /bin/ed
+ 2 /bin/nano
3 /usr/bin/vim.tiny
* 4 /usr/bin/vim.basic
5 /usr/bin/nedit
6 /usr/bin/emacs21
7 /usr/bin/xemacs21

Press enter to keep the default[*], or type selection number: 6

Written by kenno

April 19, 2010 at 2:29 am

Posted in HowTo, Tips

Tagged with ,

If someone comes and tells you “I can’t login to my Linux box” what would you do?

with 2 comments

You can do many things, but one of them has to be:

check the bloody log file.

Written by kenno

April 16, 2010 at 12:04 am

Posted in Tips

Enable sudo insults

leave a comment »

$ sudo visudo

Look for line begins with Defaults, and append insults to the end.

Defaults        env_reset,insults

Save it, and clear the sudo session (sudo -K), and try sudo with a wrong password. :)

Source: Enable sudo insults for some laughs

Written by kenno

April 15, 2010 at 2:42 pm

Posted in HowTo, Tips

Tagged with , , ,

Follow

Get every new post delivered to your Inbox.