Bash Beginner guide when starting with DevOps
1️⃣ You logged into a Bash shell
[ec2-user@ip-172-31-64-123 ~]$
It tells you:
User:
ec2-userMachine: your EC2 instance
Location:
~(your home directory)$means normal user (safe)
2 Where am I?
pwd
Meaning:
- Shows your current directory
Example output:
/home/ec2-user
This is your home directory — your safe workspace.
3️⃣ how to see files
Commands:
ls
ls -la
ls→ lists files-l→ detailed view-a→ shows hidden files
Files starting with . are hidden config files
4️⃣ Identified important hidden files
In your home directory:
.bashrc→ runs every time Bash starts.bash_profile→ runs when you log in.bash_logout→ runs when you log out.ssh/→ SSH keys (very important, don’t touch yet)
5️⃣ reading a config file safely
cat .bashrc
6️⃣ learnt what PATH is
A list of directories Bash searches for commands
Order matters
Your personal directories come first
This is why you can type
lsinstead of/usr/bin/ls
🎯 Where am I now
I can confidently:
Understand the shell prompt
Navigate the filesystem
Read configuration files
Explore Linux without breaking anything
This is exactly the right foundation.
Top comments (0)