Customizing Your Shell Session

When you open a new Bash shell session, your shell executes a series of configuration scripts. You can modify these scripts to customize your environment to your liking. You can set your default terminal editor, create shortcuts for commands, change the information displayed in your prompt, set environment variables, and more.

Shells are of two types: login shells and non-login shells. The type of shell determines which files you use to define the settings. If you put the settings in the wrong place, they won’t apply. This can be a massive source of frustration when you’re trying to set things like environment variables for certain processes, so let’s walk through how each shell works.

When you connect to a machine ...

Get Small, Sharp Software Tools now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.