← All commands
Topic hub Terminal & Shell Scripting
Windows Linux Terminal & Shell Scripting Expanded guide Terminal

Windows title equivalent in Linux

Changes the title text shown in the terminal emulator's title bar.

Windows title
→
Linux equivalents
Debian/Ubuntu same command
echo -ne "\033]0;My Title\007"
Fedora same command
echo -ne "\033]0;My Title\007"
Arch same command
echo -ne "\033]0;My Title\007"

Overview

What this command does

On Windows, "title" is used to set the terminal window title. On Linux, the closest practical mapping shown here is "echo -ne "\033]0;My Title\007"". Changes the title text shown in the terminal emulator's title bar. This reference is grouped under Terminal & Shell Scripting → Terminal.

Migration tip: Terminal title escape codes work in most emulators (GNOME Terminal, Konsole, xterm). Add the command to your PS1 prompt definition in <code>~/.bashrc</code> to update it automatically.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows title maps to echo -ne "\033]0;My Title\007" 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

Set the terminal window title

Changes the title text shown in the terminal emulator's title bar.

echo -ne "\033]0;Title\007"

Set title in most terminals

printf "\033]0;%s\007" "title"

printf version (more portable)

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

echo -ne "\033]0;My Terminal\007"
echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"

Walkthrough

Examples with explanations

# Windows: title My Application
echo -ne "\033]0;My Terminal\007"

# Dynamic title showing current dir:
echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"

# Auto-update in ~/.bashrc:
PROMPT_COMMAND='echo -ne "\033]0;${PWD}\007"'

Reference

Common options and variations

Command or optionUse
echo -ne "\033]0;Title\007"Set title in most terminals
printf "\033]0;%s\007" "title"printf version (more portable)

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "echo -ne "\033]0;My Title\007"" 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 echo -ne "\033]0;My Title\007" Same command on this distribution.
Fedora same command echo -ne "\033]0;My Title\007" Same command on this distribution.
Arch same command echo -ne "\033]0;My Title\007" Same command on this distribution.

Keep learning

Related Terminal & Shell Scripting commands