Skip to content
www.mytechnote.ru
Menu
  • Administration
    • Scripts
  • Equipment
    • Reviews
    • Instructions
  • Other
  • English
    • English
    • Русский
Menu

How to Efficiently Rename Your Linux Terminal Windows: A Simple Guide for Ubuntu & CentOS Users

Managing multiple terminal windows in Linux, especially when you have numerous tasks running simultaneously, can quickly become confusing. Have you ever found yourself in a situation where you have ten windows open and they all look identical? If you’re like most Linux users, distinguishing between them can be a challenge.

In this guide, we will specifically discuss an easy method to rename your terminal windows. This will not only make your workflow more organized but also reduce the chance of making errors due to working in the wrong window. We’ll be using the gnome-terminal as an example, particularly focusing on Ubuntu 16.04. But if you’re a CentOS user, don’t worry! We have something for you too.

Step-by-Step: Setting a Custom Terminal Window Title

  1. Editing the bashrc File:

    Use the following command to edit the file:

    • For individual users: Open ~/.bashrc
    • For all system users: If you’re on Ubuntu, navigate to /etc/bash.bashrc. For CentOS users, the path is /etc/bashrc.
nano /etc/bash.bashrc

 

  1. Adding the Custom Function:

Append this function to the end of the file:

function set-title(){
  if [[ -z "$ORIG" ]]; then
    ORIG=$PS1
  fi
  TITLE="\[\e]2;$*\a\]"
  PS1=${ORIG}${TITLE}
}
  1. Activating the Change:

Restart your terminal or if you’re working remotely via ssh, reconnect to see the changes.

  1. Renaming Your Terminal Window:

Simply type:

set-title your title

And just like that, your terminal window will have a new, easily distinguishable name! Remember, if you’re using ssh, ensure to execute this on your remote server.

Conclusion

Mastering little efficiency tricks like renaming your terminal windows can drastically improve your productivity when working with Linux. Looking for more Linux tips and tricks? Stay tuned to our blog for more insights and step-by-step guides!

 

Posted on 01.11.201730.05.2024 by sanglyb

Post navigation

← How to Easily Set Up an IPIP Tunnel on Ubuntu 16.04 and CentOS 7
How to Set Up Email Signatures with Postfix on Ubuntu Server 16.04 →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Подписывайтесь

Youtube
vk
telegram
github
twitter
rss
  • Форум
  • Об авторе
  • Поддержать автора

Популярные записи

Новые записи

  • How to Extend an LVM Partition in Linux
  • SCCM Reporting Errors After Migrating from SQL Server 2016 to 2019
  • Problem Using PassFiltEx on Older CPUs
  • How to remove attachments from old calendar events in Exchange using a script
  • How to download and install Office 2024 LTSC

Архивы

  • 2026 (3)
  • 2025 (5)
  • 2024 (7)
  • 2023 (30)
  • 2022 (4)
  • 2020 (17)
  • 2017 (82)
  • 2016 (5)
© 2015-2026 www.mytechnote.ru
Использование материалов сайта возможно только с разрешения владельца или обязательна индексируемая, прямая, передающая вес ссылка на материал.