Tuesday, March 22, 2011

Bash history autocomplete galore

Add the following lines to the end of .bashrc

# make bash autocomplete with up/down arrow
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'

# make tab cycle through commands instead of listing
bind '"\t":menu-complete'

Now by pressing arrow up/down bash will autocomplete based on your command line history, while pressing TAB will cycle through commands, directories and files names.

Monday, March 14, 2011

rsyslog and grsecurity (Ubuntu 10.04)

Selecting grsecurity's "Proc restrictions" might possibly break few things. One of these things is rsyslog kernel logging capability. Upon booting this message would show up in my kern.log:

kernel: imklog: Cannot read proc file system, 1.

One way to solve this problem is to assign rsyslog to a special group (defined during the kernel configuration phase) which members are able to view all processes, network-related information, and kernel and symbol information.

Wednesday, March 9, 2011

Prepping a fresh Ubuntu install

Very short and sweet TODO list after a fresh install. I have taken some of this from various guides on the net.

Disable dash:

# dpkg-reconfigure dash
-> no

Friday, March 4, 2011

Get that package!

Another quick 'howto' in order to pull the latest packages from the Ubuntu repositories. This is because chances are you want a fairly recent release of some package but the one for your release is like 200 years old (and there's nothing in backports.)

My problem is that I do not want to upgrade to the latest Ubuntu release. I am running Lucid servers and I want to stay with a LTS release on them (I will make the jump when 12.04 LTS will come out). So if I need something new/recent/updated I have two choices:
  1. Compile it myself.
  2. See if Maverick or Natty have a more recent release (maybe the one I am after.)