All guides

Customizing your terminal

Add aliases, environment variables, and a custom prompt with a .bashrc in your workspace.

Your terminal runs bash, and your workspace folder is its home directory. Put a .bashrc at the top level of your workspace and each new terminal tab reads it. Tabs already open keep the shell they started with.

Defaults

  • History persists in ~/.bash_history, saved after every command.
  • nano is the editor, less the pager.
  • ls and grep print in color, and tab completion works for git and other commands.
  • The clock is UTC.
  • npm install -g and pip install --user install into ~/.local, and ~/.local/bin is on your PATH.

Create it

nano ~/.bashrc

Or create it in the file explorer. Turn on Show hidden files to see it.

Examples

alias ll="ls -la"
export TZ=America/Chicago
PS1="\w > "

Apply it

Open a new tab, or in an existing one:

source ~/.bashrc

Notes

  • The defaults come from a read-only system file. Your .bashrc runs after it, so your settings win.
  • ~/.bash_profile works too, and runs after .bashrc.
  • You can set PROMPT_COMMAND. The system keeps its own hook next to yours, so it is an array, and echo $PROMPT_COMMAND shows only your entry. Use declare -p PROMPT_COMMAND to see both.
  • If a typo breaks your terminal, fix or delete .bashrc from the file explorer, then open a new tab.