← All commands
Topic hub Terminal & Shell Scripting
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
Debian/Ubuntu same command
alias
Fedora same command
alias
Arch same command
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 optionUse
aliasList all current aliases
alias name='command'Create an alias for this session
unalias nameRemove an alias
~/.bashrcAdd 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.

DistributionPackage manager / baseEquivalent commandDifference 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

Related Terminal & Shell Scripting commands