From the course: Linux Bash Shells and Scripts: Streamlining Tasks and Enhancing Workflows with Automation
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
Bash startup - Linux Tutorial
From the course: Linux Bash Shells and Scripts: Streamlining Tasks and Enhancing Workflows with Automation
Bash startup
- [Instructor] When you first log in, you get your first Bash shell. Your shell will interpret .bash_profile or .profile from your home directory. It depends on how your Bash is configured, your system's configured which one you get. In that file, you often will add directories to your path, maybe you'll set umask to customize what permission modes are set when you create files, maybe protect yourself a little bit. And generally in your profile, you're setting things like environment variables that are to be inherited by shells and processes that come later. In your .bashrc in your home directory, you set things that you want set every time you run a shell. So new shells, like if you do the Bash command or you run a shell script within your shell, what's in .bashrc will be done. You normally don't add things to a variable like path in your .bashrc because as your shells nested, that variable will just keep growing. So variables not in .bashrc, things like aliases and functions that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Exploring the Bash documentation2m 27s
-
(Locked)
Setting the script interpreter and permissions5m 49s
-
(Locked)
Date and time commands5m 36s
-
(Locked)
Shell variables4m 28s
-
(Locked)
Bash startup2m 52s
-
(Locked)
Sourcing and aliasing with Bash3m 31s
-
(Locked)
Displaying text with the echo command4m 12s
-
(Locked)
Challenge: Exported variables, sourcing, and echo2m 17s
-
(Locked)
Solution: Exported variables, sourcing, and echo4m 7s
-
-
-
-
-