← Back to list

The One File Every Linux User Should Customize but Almost Never Does

It’s been sitting in your home folder this whole time, doing the bare minimum

Sabit in Bash_DevOps_AI · 2026-06-23 07:01 · 61 claps · 2.8 min read paywalled
#devops #linux #bash #programming #coding
Open on Medium ↗
Wiki topics: 💻 · Programming ☁️ · DevOps & Cloud 🔓 · Open Source

The One File Every Linux User Should Customize but Almost Never Does

It’s been sitting in your home folder this whole time, doing the bare minimum

Photo by Oleksandr Chumak on Unsplash

Photo by Oleksandr Chumak on Unsplash

Every time you open a terminal, a file runs quietly in the background before you even see your first prompt. It sets up your environment. It decides what your terminal looks like, what shortcuts exist, what commands are available. Most people never open it. Most people don’t even know it’s there.

It’s called .bashrc, and it's already running your terminal life for you, on default settings, exactly as it came out of the box.

Find it first

It lives in your home folder, but it starts with a dot, so it’s hidden from a normal folder listing. Open it directly.

nano ~/.bashrc

If you’re on Mac or using a different shell, the file might be called .zshrc instead. Same idea. Same spot. Open it the same way.

nano ~/.zshrc

You’ll probably see a wall of text already in there. Some of it came from your system. Some might already be customized if a past version of you got curious once. Either way, this file has been shaping your terminal experience the entire time, whether you ever looked at it or not.

Make your prompt actually useful

The default prompt in most terminals is plain. Just a folder name and a dollar sign, sometimes not even the folder name. You can make it show real information instead.

PS1='\u@\h:\w\$ '

This shows your username, your computer’s name, and your current folder, every time you type. Want it shorter? Want color? Both are easy.

PS1='\[\033[01;32m\]\w\[\033[00m\]\$ '

This version shows just your current folder, in green, and nothing else. Small change. But you’ll look at this every single time you open a terminal, for years. Worth making it tell you something useful.

Add the shortcuts you actually use

This is the file where aliases live. Every command you’ve typed a hundred times can get a nickname here, permanently.

alias ll='ls -la'
alias gs='git status'
alias update='sudo apt update && sudo apt upgrade'

Add these once. They’re available forever, every time you open a new terminal, without you doing anything else.

Set defaults you’d otherwise type every time

Some flags you want on every single time you run a command. Instead of typing them manually forever, set them once here.

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

These add a confirmation prompt before deleting, copying, or moving files, every time, automatically. A small safety net, set once, working quietly in the background from then on.

Make your history actually worth something

By default, many systems only keep a modest number of past commands, and skip saving a command if it’s identical to the last one. Fix both.

HISTSIZE=10000
HISTFILESIZE=20000
HISTCONTROL=ignoredups

Now your history holds onto thousands of past commands instead of a few hundred, and it skips storing exact duplicates back to back. Search through your past commands later, and there’s actually something substantial there to search.

Add your own functions, not just shortcuts

Aliases are great for short replacements. For anything needing a few steps, a function works better.

mkcd() {
  mkdir -p "$1" && cd "$1"
}

Add this, and typing mkcd new-project creates a folder and moves you into it in one step, instead of two separate commands typed back to back every time.

Load it without restarting your terminal

After editing, you don’t need to close and reopen anything. One command applies your changes immediately.

source ~/.bashrc

Run this right after saving, and every change is live in your current session right away.

Why this file gets skipped

Nobody hands you this file on day one and says “customize this.” It just exists, quietly, doing exactly enough to keep things working, and most people never have a specific reason to go looking for it. The terminal works fine without touching it. That’s exactly why almost nobody does.

But this file is the actual difference between a terminal that feels like a chore and one that feels like it was built around how you specifically work. Five minutes of editing today. Every session afterward, just a little smoother, a little faster, a little more yours.


메타데이터
post_id
781d755b2c4a
slug
the-one-file-every-linux-user-should-customize-but-almost-never-does-781d755b2c4a
url
https://medium.com/my-lifes-mirrow/the-one-file-every-linux-user-should-customize-but-almost-never-does-781d755b2c4a
canonical_url
https://medium.com/my-lifes-mirrow/the-one-file-every-linux-user-should-customize-but-almost-never-does-781d755b2c4a
author_url
https://medium.com/@tibas
status
ok
fetched_at
2026-06-27 18:37:17