X

Select Your Country

Turkey (Türkçe)Turkey (Türkçe) Worldwide (English)Worldwide (English)
X

Select Your Currency

Türk Lirası $ US Dollar

How to add date and color to Ubuntu terminal

How to add date and color to Ubuntu terminal
HomepageKnowledge BaseUbuntuHow to add date and color to Ubuntu...
How to add date and color to Ubuntu terminal

To add date and color to your terminal in your Linux Ubuntu operating system, follow the commands below in order.

nano ~/.profile

We add the following code to the bottom of the file.

export PS1="\e[0;31m[\d \t] \e[m \e[0;33m[\u@\h:\w ] \e[m$ "

We enter the following command to validate the change in the .profile file we logged into.

source ~/.profile

If your settings are not saved when you close and reopen the terminal, you can change the ~/.bashrc folder instead of ~/.profile.

Can't find the information you're looking for?

You have examined the knowledge base in detail, but if you cannot find the information you need,

Create a Support Ticket
Did you find it useful?
(755 times viewed. / 2 people found helpful.)