Posted: . At: 5:34 PM. This was 3 years ago. Post ID: 14864
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Alternative ways of using the bash shell on Linux.


There are many ways to use the bash shell on Linux. It has different key binding options and the ability to navigate to a directory by typing the name alone.

set -o vi
bind -m vi-insert "\C-l":clear-screen

This will enable VIM styled keybindings for the bash shell. Press ESC, then you may use the k and j keys to iterate back and forward through your command history.

Another nice trick is to use autocd functionality. This allows typing just the directory name at the prompt to switch directories.

┌──[jason@192.168.1.2][~/Documents]
└──╼  ╼ $ shopt -s autocd

Then, navigating to another directory is as easy as typing just the name, and the user will be taken to another directory.

──[jason@192.168.1.2][~]
└──╼  ╼ $ Documents/
cd -- Documents/
┌──[jason@192.168.1.2][~/Documents]
└──╼  ╼ $

This is very useful indeed. When you are using VIM mode, and you have pressed ESC to exit to normal mode, press I to go back to editing mode, just like in the VIM editor.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.