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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.