Windows
Linux
Terminal & Shell Scripting
Terminal
Windows cmd /k (set title) equivalent in Linux
Creates short nicknames for long commands. Add them to ~/.bashrc to make them permanent.
Windows
→
cmd /k (set title)
Linux equivalents
alias
alias
alias
Overview
What this command does
Creates short nicknames for long commands. Add them to ~/.bashrc to make them permanent.
Migration tip: Aliases are one of the best ways to personalise Linux. Common examples:
alias ll='ls -la', alias update='sudo apt update && sudo apt upgrade -y'.Practical tasks
Common use cases
Create command shortcuts (aliases)
Creates short nicknames for long commands. Add them to ~/.bashrc to make them permanent.
alias
List all current aliases
alias name='command'
Create an alias for this session
unalias name
Remove an alias
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
alias ll='ls -la'
alias cls='clear'
alias update='sudo apt update && sudo apt upgrade -y'
alias myip='curl ifconfig.me'
echo "alias ll='ls -la'" >> ~/.bashrc
source ~/.bashrc
Walkthrough
Examples with explanations
# No direct Windows equivalent (doskey macros are similar)
# Create useful aliases:
alias ll='ls -la'
alias cls='clear' # feel at home!
alias update='sudo apt update && sudo apt upgrade -y'
alias myip='curl ifconfig.me'
# Make permanent — add to ~/.bashrc:
echo "alias ll='ls -la'" >> ~/.bashrc
source ~/.bashrc # reload without restarting terminal
Reference
Common options and variations
| Command or option | Use |
|---|---|
alias | List all current aliases |
alias name='command' | Create an alias for this session |
unalias name | Remove an alias |
~/.bashrc | Add aliases here to make them permanent |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | alias |
Same command on this distribution. |
| Fedora | same command | alias |
Same command on this distribution. |
| Arch | same command | alias |
Same command on this distribution. |
Keep learning