At the end of this post, you’ll learn how to increase your lifespan… as a software engineer.

Because right now, you’re probably wasting it.

Typing the same commands over and over like some sort of highly educated robot with a keyboard addiction.

The Junior vs. Senior Revelation

The difference between a junior and a senior sysadmin is simple:

A senior automates boring, repetitive tasks.

A junior becomes the boring, repetitive task.

And according to absolutely no verified research whatsoever, the average sysadmin spends about 300 hours a day running commands.

Which is impressive… considering time is a constraint.

But we can fix that—using the ancient mystical art of… aliases.

What Is an Alias? (Or: How to Be Productively Lazy)

An alias is just a shortcut for your commands.

Revolutionary, I know.

For example, instead of typing:

sudo apt update

Every… single… time… like you’re paying rent on those keystrokes…

You can reduce it to something simple like:

update

Same result. Less suffering.

Your carpal tunnel syndrome will thank you. Your therapist will be confused. Win-win.

How to Actually Do This (The Part Where You Learn Something)

Step 1: Open Your .bashrc File

Open your .bashrc file in your home directory—using Vim, Nano, or whatever editor you use to feel superior to other developers.

nano ~/.bashrc

Or if you’re a Vim person:

vim ~/.bashrc

(Congratulations on choosing a text editor that requires a PhD to exit.)

Step 2: Add Your Alias

Add this line somewhere in the file (preferably not in the middle of something important):

alias update="sudo apt update"

Step 3: Save the File

Save and close the file.

And now… nothing happens.

Because Linux enjoys watching you struggle.

Step 4: Actually Make It Work

To apply the changes, run:

source ~/.bashrc

This reloads the file into your current shell session—instead of forcing you to close and reopen the terminal like it’s 2005.

Now run:

update

And just like that… you’ve saved yourself 3 seconds.

Which doesn’t sound like much… until you multiply it by the number of the life choices that led you to becoming a sysadmin in the first place 😏.

Real-World Example (Where It Actually Matters)

Personally, I use aliases a lot—especially when working with Kubernetes.

Because Kubernetes is a beautiful, elegant system designed by people who clearly hate typing and sanity.

Instead of typing:

kubectl get pods

100 times a day…

I just type:

pods

Clean. Fast. Slightly lazier—in a productive way.

Here are some other aliases I use to preserve my mental health:

# Kubernetes shortcuts (because kubectl is 7 characters too long)
alias k="kubectl"
alias pods="kubectl get pods"
alias services="kubectl get services"
alias deployments="kubectl get deployments"
alias nodes="kubectl get nodes"
alias contexts="kubectl config get-contexts"

# Docker shortcuts (because typing is overrated)
alias dps="docker ps"
alias di="docker images"
alias dstop="docker stop"
alias drm="docker rm"

# Git shortcuts (for when you're in a hurry to break production)
alias gs="git status"
alias ga="git add"
alias gc="git commit -m"
alias gp="git push"
alias gl="git log --oneline"
alias gd="git diff"

# System shortcuts (because efficiency)
alias update="sudo apt update"
alias upgrade="sudo apt upgrade -y"
alias install="sudo apt install"
alias please="sudo"
alias fucking="sudo"  # For when you're frustrated

# Navigation shortcuts (for the truly lazy)
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias home="cd ~"
alias projects="cd ~/projects"

# List variations (because ls is boring)
alias ll="ls -lah"
alias la="ls -A"
alias l="ls -CF"

# Safety aliases (because we've all done it)
alias rm="rm -i"  # Confirm before deleting
alias cp="cp -i"  # Confirm before overwriting
alias mv="mv -i"  # Confirm before overwriting

# Lazy clipboard (if you have xclip installed)
alias copy="xclip -selection clipboard"
alias paste="xclip -selection clipboard -o"

# Show my IP address (because googling it is too mainstream)
alias myip="curl ifconfig.me"

# Clear screen the fast way
alias c="clear"

# Find that process eating all your CPU
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"

# Reload bash config (for when you add more aliases)
alias reload="source ~/.bashrc"

The Results

If done right, you can reduce your 300-hour workday to about… 250 hours.

Massive productivity gains. Truly groundbreaking.

You might even get promoted. Or at least not fired for inefficiency.

Advanced Level: Make Aliases Permanent

Here’s the thing—if you just add aliases directly to .bashrc, it can get messy fast.

Professional tip: Create a separate aliases file.

# Create aliases file
touch ~/.bash_aliases

# Add this to your .bashrc if it's not already there:
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

Now put all your aliases in ~/.bash_aliases and your .bashrc stays clean.

You’re welcome.

The Dark Side of Aliases

Warning: Aliases can be dangerous.

Not physically dangerous (unless you alias rm to rm -rf / which… please don’t).

But dangerous in the sense that you’ll become completely dependent on them.

You’ll SSH into a random server without your aliases and suddenly forget how to do basic tasks.

# You, on a fresh server:
$ pods
-bash: pods: command not found

# Your brain:
Error 404: Competence not found

Solution: Keep your aliases in a git repo and have a setup script.

# Clone your dotfiles
git clone https://github.com/yourusername/dotfiles.git ~/dotfiles

# Symlink your aliases
ln -s ~/dotfiles/.bash_aliases ~/.bash_aliases

# Reload
source ~/.bashrc

Now you can be lazy anywhere.

Bonus: Alias Functions (For When Regular Aliases Aren’t Enough)

Sometimes you need more than a simple shortcut. You need… functions.

Add these to your .bash_aliases:

# Make a directory and immediately cd into it
mkcd() {
    mkdir -p "$1" && cd "$1"
}

# Extract any archive type
extract() {
    if [ -f $1 ]; then
        case $1 in
            *.tar.bz2)   tar xjf $1     ;;
            *.tar.gz)    tar xzf $1     ;;
            *.bz2)       bunzip2 $1     ;;
            *.rar)       unrar e $1     ;;
            *.gz)        gunzip $1      ;;
            *.tar)       tar xf $1      ;;
            *.tbz2)      tar xjf $1     ;;
            *.tgz)       tar xzf $1     ;;
            *.zip)       unzip $1       ;;
            *.Z)         uncompress $1  ;;
            *.7z)        7z x $1        ;;
            *)           echo "'$1' cannot be extracted via extract()" ;;
        esac
    else
        echo "'$1' is not a valid file"
    fi
}

# Find a file by name
ff() {
    find . -type f -iname "*$1*"
}

# Kill process by name
killport() {
    lsof -ti:$1 | xargs kill -9
}

# Git commit and push in one command
gcp() {
    git add .
    git commit -m "$1"
    git push
}

Now you can do things like:

# Create and enter directory in one command
mkcd new-project

# Extract any archive without remembering tar flags
extract mystery-file.tar.gz

# Find files quickly
ff config

# Kill that process on port 3000
killport 3000

# Commit and push
gcp "Fixed the thing that broke the other thing"

The Philosophical Question

And maybe—just maybe—you can use that extra time to do something meaningful with your life…

Like:

  • Touching grass (I’ve heard it’s outside)
  • Hiking (willingly going uphill for fun… Who does that ??? 😏 )
  • Learning a new programming language (just kidding, you have enough languages to regret)
  • Actually reading documentation
  • Sleeping (remember that?)

But Probably Not

Let’s be honest.

You’ll use those saved 50 hours to:

  • Write more scripts
  • Optimize things that don’t need optimizing
  • Create aliases for your aliases
  • Debate tabs vs spaces on Reddit
  • Convince yourself you’ll start that side project “next weekend”

And that’s okay.

Because you’re a sysadmin.

This is what you do.

The Bottom Line

Aliases won’t make you a better engineer.

They won’t solve your architectural problems.

They won’t fix that bug in production.

But they will make you type less.

And sometimes, that’s enough.

So go forth and alias.

Automate the boring stuff.

Save those precious seconds.

And spend them doing what sysadmins do best:

Arguing about which shell is superior while secretly using bash because it’s what came pre-installed.


Quick Start Alias Collection

Want to get started immediately? Copy this entire block into your ~/.bash_aliases:

# System updates
alias update="sudo apt update"
alias upgrade="sudo apt upgrade -y"
alias install="sudo apt install"

# Navigation
alias ..="cd .."
alias ...="cd ../.."
alias home="cd ~"

# Listing files
alias ll="ls -lah"
alias la="ls -A"

# Git shortcuts
alias gs="git status"
alias ga="git add"
alias gc="git commit -m"
alias gp="git push"
alias gl="git log --oneline"

# Kubernetes
alias k="kubectl"
alias pods="kubectl get pods"
alias services="kubectl get services"

# Docker
alias dps="docker ps"
alias di="docker images"

# Utilities
alias c="clear"
alias reload="source ~/.bashrc"
alias myip="curl ifconfig.me"

# Safety
alias rm="rm -i"
alias cp="cp -i"
alias mv="mv -i"

Then run:

source ~/.bashrc

Congratulations. You’re now 3% more productive.

The other 97% is still meetings.


Anyway… I’ll see you in the Discord.

Where we’ll continue to discuss important things like:

  • Whether Vim is better than Emacs
  • Why your coworker’s code is terrible
  • How Kubernetes is simultaneously the best and worst thing ever (it is)

Stay lazy. Stay efficient. Stay sarcastic.


P.S. If you’re wondering why I spent 2,000 words explaining a feature that could be explained in 30 seconds…

Welcome to tech blogging.

Where we take simple concepts and make them unnecessarily complicated so you feel like you learned something.

You’re welcome.


Related Posts You Might Actually Read:


About the Author: A sysadmin who has typed kubectl get pods so many times that it now appears in their dreams. Send help. Or more aliases.

Leave a Reply

Your email address will not be published. Required fields are marked *