Skip to main content
Replaced the oneliner script by a oneliner function that can be put inside ~/.bashrc
Source Link
Kevin Bowen
  • 19.8k
  • 57
  • 80
  • 83

Ward's answer is great if you want to set your title based on what host you're on etc every time you open a terminal. If you just want to quickly set a title though, you can just run echo by itself:

echo -ne "\033]0;SOME TITLE HERE\007"

or make a simple function (inside your ~/.bashrc), say termtitle

termtitle() { printf "\033]0;$*\007"; }

which you can run with termtitle some title here.

Ward's answer is great if you want to set your title based on what host you're on etc every time you open a terminal. If you just want to quickly set a title though, you can just run echo by itself:

echo -ne "\033]0;SOME TITLE HERE\007"

or make a simple function (inside your ~/.bashrc), say termtitle

termtitle() { printf "\033]0;$*\007"; }

which you can run with termtitle some title here

Ward's answer is great if you want to set your title based on what host you're on etc every time you open a terminal. If you just want to quickly set a title though, you can just run echo by itself:

echo -ne "\033]0;SOME TITLE HERE\007"

or make a simple function (inside your ~/.bashrc), say termtitle

termtitle() { printf "\033]0;$*\007"; }

which you can run with termtitle some title here.

Replaced the oneliner script by a oneliner function that can be put inside ~/.bashrc
Source Link

Ward's answer is great if you want to set your title based on what host you're on etc every time you open a terminal. If you just want to quickly set a title though, you can just run echo by itself:

echo -ne "\033]0;SOME TITLE HERE\007"

or make a simple bash scriptfunction (inside your ~/.bashrc), say termtitle

#!/bin/bash

echo -netermtitle() "\033]0;${1 printf "\033]0;$*\007"; }\007"

which you can run with termtitle "somesome title here"here

Ward's answer is great if you want to set your title based on what host you're on etc every time you open a terminal. If you just want to quickly set a title though, you can just run echo by itself:

echo -ne "\033]0;SOME TITLE HERE\007"

or make a simple bash script, say termtitle

#!/bin/bash

echo -ne "\033]0;${1}\007"

which you can run with termtitle "some title here"

Ward's answer is great if you want to set your title based on what host you're on etc every time you open a terminal. If you just want to quickly set a title though, you can just run echo by itself:

echo -ne "\033]0;SOME TITLE HERE\007"

or make a simple function (inside your ~/.bashrc), say termtitle

termtitle() { printf "\033]0;$*\007"; }

which you can run with termtitle some title here

Source Link
naught101
  • 1.6k
  • 1
  • 17
  • 22

Ward's answer is great if you want to set your title based on what host you're on etc every time you open a terminal. If you just want to quickly set a title though, you can just run echo by itself:

echo -ne "\033]0;SOME TITLE HERE\007"

or make a simple bash script, say termtitle

#!/bin/bash

echo -ne "\033]0;${1}\007"

which you can run with termtitle "some title here"