← All commands
Topic hub Terminal & Shell Scripting
Windows Linux Terminal & Shell Scripting Expanded guide 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

On Windows, "cmd /k (set title)" is used to create command shortcuts (aliases). On Linux, the closest practical mapping shown here is "alias". Creates short nicknames for long commands. Add them to ~/.bashrc to make them permanent. This reference is grouped under Terminal & Shell Scripting → Terminal.

Migration tip: Aliases are one of the <strong>best ways to personalise Linux</strong>. Common examples: <code>alias ll='ls -la'</code>, <code>alias update='sudo apt update && sudo apt upgrade -y'</code>.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows cmd /k (set title) maps to alias for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

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

Debian/Ubuntu, Fedora and Arch all use "alias" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

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