≡ Menu

bash shell

Do You Like to Perform Vi Style Editing in BASH Command Line ?

Question: I like Vi style of editing and I’m very comfortable with Vi commands. How do i use Vi style line editing in Unix command line? Answer: Execute set -o vi at your Unix shell to enable Vi style editing. Enable Vi Style Editing in BASH $ set -o vi By default the command line [...]

{ 1 comment }

Unix Shell Tips: Change Login Shell From Bash to Others

Question: How do I find out what Unix shell I’m currently running? Can you also explain how can I change my Unix shell both temporarily and permanently? (For example, from bash to tsh). Answer: You can achieve these using $0, exec, chsh -s. In this article, let us review how to do these in detail. [...]

{ 12 comments }

Vi and Vim Editor: 3 Steps To Enable Thesaurus Option

Photo courtesy of dantesz This is a guest post written by SathiyaMoorthy. Enabling thesaurus option for vi / vim will help you to choose alternate words from thesaurus. For example, while typing “important”, you may prefer to use a different word than “important”.  Wouldn’t be nice if vi can give you few alternative words such [...]

{ 13 comments }

This article is part of the ongoing Productivity Tips for Geeks series. cd is one of the most frequently used command during a Unix session. In this article, I’ve provided 6 cd command hacks, which will boost your productivity instantly and make it easier to navigate the directory structure from command line. Hack #1: Use [...]

{ 34 comments }

This article will explain the sequence in which the following files are executed: /etc/profile ~/.bash_profile ~/.bashrc ~/.bash_login ~/.profile ~/.bash_logout Execution sequence for interactive login shell Following pseudo code explains the sequence of execution of these files. execute /etc/profile IF ~/.bash_profile exists THEN execute ~/.bash_profile ELSE IF ~/.bash_login exist THEN execute ~/.bash_login ELSE IF ~/.profile exist [...]

{ 13 comments }

Photo courtesy of f1r3storm85 In the previous article, we discussed about Linux environment variables PS[1-4] and PROMPT_COMMAND. If used effectively, PS1 can provide valuable information right on the command prompt. In Tomb Raider, Angelina Jolie has all the gadgets and weapons at her finger tips to solve the mystery in style. While the gadget and [...]

{ 62 comments }

15 Examples To Master Linux Command Line History

When you are using Linux command line frequently, using the history effectively can be a major productivity boost. In fact, once you have mastered the 15 examples that I’ve provided here, you’ll find using command line more enjoyable and fun. 1. Display timestamp using HISTTIMEFORMAT Typically when you type history from command line, it displays [...]

{ 145 comments }