~/.bashrc

From LWP-Wiki
Jump to: navigation, search

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.