VI/VIM shortcuts

R    Overwrite text, press <Esc> to end
 :set nu    Display line numbers
G    Go to last line of the file
    :n   Go to line with this number (:10 goes to line 10)

%         Move to matching bracket:  ( { [ ] } )

/pattern/   forward to pattern

  /text   Search forward (down) for text (text can include spaces
                      and characters with special meanings.)
  ?text   Search backward (up) for text
  n       Repeat last search in the same direction
  N       Repeat last search in the opposite direction

Editing grub2 for Ubuntu 10.2 to get over ctrl-alt-f1 (or ctrl alt f2-f6) issues in Ubuntu

This turns out to be much more painful than grub (v1) which had a simple menu.lst file. The new grub2 autoupdates based on kernel updates, which is great, but makes it a pain to edit basic configuration.

In my case I was attempting to change the default splash in an attempt to correct a framebuffer problem causing my ctrl-alt-f1 to not work. I went and updated the grub.cnf (equal to menu.lst file in grub1) file, but soon realized that it will be overwritten.

Reading further revealed that the trick is to update the /etc/default/grub file instead. Thereafter one has to run the update-grub command

So much to get ctrl-alt-f1 to get me a terminal!

(this applies to 10.2 atleast)

Amplify’d from

  • No /boot/grub/menu.lst. It has been replaced by /boot/grub/grub.cfg.


  • The primary configuration file for changing menu display settings is /etc/default/grub.

  • No changes made in the configuration files will take effect until the update-grub command is also run.