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. nanois the editor,lessthe pager.lsandgrepprint in color, and tab completion works forgitand other commands.- The clock is UTC.
npm install -gandpip install --userinstall into~/.local, and~/.local/binis on yourPATH.
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
.bashrcruns after it, so your settings win. ~/.bash_profileworks too, and runs after.bashrc.- You can set
PROMPT_COMMAND. The system keeps its own hook next to yours, so it is an array, andecho $PROMPT_COMMANDshows only your entry. Usedeclare -p PROMPT_COMMANDto see both. - If a typo breaks your terminal, fix or delete
.bashrcfrom the file explorer, then open a new tab.