~/.bashrc: Difference between revisions

From LWP-Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 7: Line 7:
     echo "#!/bin/bash" > ~/.bashrc
     echo "#!/bin/bash" > ~/.bashrc


Fill it with whatever you want and to add your new settings to the active terminal:
Fill it with whatever you want. To enable your new settings in the active terminal:
     source .bashrc
     source .bashrc


The "sourcing" happens automatically when you open a new terminal.
The "sourcing" happens automatically when you open a new terminal.

Latest revision as of 14:41, 31 March 2015

New .bashrc

Every user can create their own .bashrc file in their home directory. By adding your personal settings to the .bashrc they will get set whenever you open a terminal. You can add extra aliases for commands or give your command prompt a different look, etc... any settings you want by default, but don't want to set every time you log in.

If the file doesn't already exist, you can create it any number of ways, here's one:

   echo "#!/bin/bash" > ~/.bashrc

Fill it with whatever you want. To enable your new settings in the active terminal:

   source .bashrc

The "sourcing" happens automatically when you open a new terminal.