Key Takeaways

- The ls command defaults to terse output designed for 80x25 character displays from the 1970s
- Adding -i to rm creates a confirmation prompt that can save you from accidental deletions
- Shell aliases let you change defaults for interactive use while keeping original behavior available
Why Linux Defaults Feel Stuck in 1970
Almost every Linux command accepts options to change its behavior. When you don't specify any, the command uses defaults. The problem: those defaults were chosen decades ago for hardware that no longer exists and use cases that don't match how most people work today.
The original ls output, for example, was optimized for 80x25 character terminal displays. Some defaults go back even further, to when terminal output was printed on paper. Modern displays offer at least four times that space, yet the defaults remain unchanged.
Many defaults also prioritize scripting over interactive use. That's sensible for automation, but frustrating when you're typing commands yourself. The fix is simple: shell aliases that override defaults for your interactive sessions while leaving the original behavior available when you need it.
The ls Command: Actually Useful File Listings
The ls command is one of the first that every Linux beginner learns. Its default output shows just file names in a cramped multi-column layout. That made sense for paper printouts. It makes less sense on a 4K display.

A better default uses four flags: -FGhl. Here's what each does:
- -F adds symbols to indicate file types (executables, directories, etc.)
- -G enables color coding for different file types
- -h shows human-readable file sizes (4.8M instead of 4997740)
- -l displays files in a list with permissions, owners, and dates
alias ls='ls -FGhl'
Some people prefer creating a new command name like ll instead of overriding ls. The advantage of overriding: muscle memory works in your favor. The alias ll='ls -la' approach is also common if you want both options.
One note: GNU ls (used on most Linux distributions) uses --color=auto instead of -G. Check your system's man page if the flags don't work as expected.
If you need the original multi-column output, pass -C to override the -l flag. Or use \ls or command ls to run the non-aliased version.
The rm Command: A Safety Net for Deletions
Windows has the Recycle Bin. macOS has the Trash. The Linux command line has rm, which deletes files immediately and permanently. For users coming from graphical environments, this can be anxiety-inducing.
You probably won't destroy your entire system with a mistyped rm command. But removing the wrong file is easy, especially when using wildcards. The -i flag adds a confirmation prompt before each deletion.
alias rm='rm -i'
This is particularly useful if your backup strategy is, let's say, optimistic. The confirmation adds friction, but that friction exists precisely where you want it: between intention and irreversible action.
The mkdir Command: Creating Parent Directories
By default, mkdir fails if the parent directory doesn't exist. Want to create projects/2024/reports? You'll get an error unless projects/2024 already exists.

The -p flag tells mkdir to create parent directories as needed. It also suppresses errors if the directory already exists, which is useful in scripts.
alias mkdir='mkdir -p'How to Set These Aliases Permanently
Aliases typed at the command line disappear when you close the terminal. To make them permanent, add them to your shell's configuration file.
For Bash, that's ~/.bashrc. For Zsh (the default on macOS), it's ~/.zshrc. Add your alias commands at the end of the file, save, and either restart your terminal or run source ~/.bashrc (or the equivalent for your shell).
Some distributions have separate files for aliases, like ~/.bash_aliases. Check if your .bashrc sources this file before creating a new one.
When Defaults Matter: Scripts vs Interactive Use
One reason these defaults persist: changing them would break countless scripts. Shell scripts often rely on the exact output format of commands like ls. Adding colors or changing column layouts would break parsing.
Aliases only apply to interactive shells, not scripts. When you run a bash script, it doesn't load your .bashrc aliases by default. This means you can safely change interactive defaults without worrying about breaking automation.
If you do need the original behavior interactively, prefix the command with a backslash. \ls runs the actual ls command, ignoring any alias.


Logicity's Take
Frequently Asked Questions
Will changing these aliases break my shell scripts?
No. Aliases only apply to interactive shells. Scripts run in non-interactive shells that don't load your .bashrc or .zshrc aliases by default.
How do I run the original command without the alias?
Prefix the command with a backslash (\ls) or use the command builtin (command ls). Both bypass aliases and run the actual executable.
Do these aliases work on macOS?
Mostly. macOS uses BSD versions of these commands, which have slightly different flags. For ls, use -G for colors on macOS, or install GNU coreutils via Homebrew for consistency with Linux.
Where do I put aliases to make them permanent?
Add them to ~/.bashrc for Bash or ~/.zshrc for Zsh. Some systems use a separate ~/.bash_aliases file. After editing, run 'source ~/.bashrc' or restart your terminal.
Need Help Implementing This?
Source: How-To Geek
Huma Shazia
Senior AI & Tech Writer
Produced with AI assistance and reviewed by the Logicity editorial team. Learn more in our Editorial Policy.
Related Articles
Browse all
Netflix Oscar Films 2026: Weekend Streaming for Busy Leaders
Oscar-winning content on Netflix offers business leaders more than entertainment. These award-winning documentaries and films provide strategic insights into social innovation, brand storytelling, and impact-driven business models that resonate with today's conscious consumers.

Samsung OLED TV Deals 2025: Executive Home Office Upgrades
Samsung's flagship S95F OLED TV just hit its lowest price ever at $600 off. For executives building premium home offices or conference rooms, this represents a rare opportunity to get top-tier display technology at mid-range prices. Here's the business case for upgrading now.

Corporate Drama Shows: Leadership Lessons from TV Finance
HBO's Industry and similar workplace dramas offer more than entertainment. They provide surprisingly accurate portrayals of high-stakes corporate culture, toxic work environments, and the psychological pressures facing today's workforce. Business leaders watching these shows gain unexpected insights into employee motivation, retention challenges, and the real costs of cutthroat competition.

Samsung SmartThings AI Brief: Smart Home Monitoring for Business Leaders
Samsung's SmartThings platform now delivers AI-powered home security, elder care, and pet monitoring updates directly to TVs and refrigerators. For business leaders managing remote work, caring for aging parents, or overseeing multiple properties, this update transforms passive smart home devices into proactive information hubs that reduce cognitive load and improve response times.



