• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Colorful Bash on SSH with Syntax Highlighting (Ubuntu)

By Abhishek Ghosh January 22, 2015 3:57 pm Updated on January 22, 2015

Colorful Bash on SSH with Syntax Highlighting (Ubuntu)

Advertisement

Here is How To Get Custom Colorful Bash on SSH on Ubuntu and Other GNU Linux Along With Syntax Highlighting for Nano Text Editor. Quite Easy Steps. While iTerm2-Homebrew-Oh-My-ZSH gives hundreds of colors, it is quite pathetic to work with white colored texts with some color provided by iTerm2. No worries, you will get colorful Bash on SSH with Syntax Highlighting on your Ubuntu or other GNU Linux instances.

 

Colorful Bash on SSH with Syntax Highlighting : First Things First

 

We have discussed about how to get Nano Syntax Highlighted in our previous guide. Do not make Nano your default text editor. Do not change Bash to ZSH as default shell.

 

Colorful Bash on SSH with Syntax Highlighting : Methods

 

Understand this – if you login as ubuntu then run sudo su to become root, then you have to do the steps twice – one for ubuntu and one for root. We usually keep the /root directory clean. But, as root‘s $HOME is at /root, we will do the things here, so – do not delete the things recursively later.

Advertisement

---

When we are using iTerm2 to SSH to Ubuntu instance, iTerm2 and ZSH will force some color, but not much. There are two steps of the work. Remember what you have done by writing it somewhere. We might change or correct steps later to make all Linux distort working in the same method.

You can not see the dot file named .bashrc at /root. So, first :

Vim
1
cd ~ && nano .bashrc

Just look at it. Actually there is a commented out line with a comment indicating if you uncomment, you’ll get some color. It varies from distro to distro. But you will find it and it is very easy to guess from the comment. uncomment it and source the bash file :

Vim
1
source .bashrc

You will get some colors. We are talking about two steps. Possibly, we can say – two options. If you are satisfied with this, you need not to do the next step. The next step is using a ready to use Oh-My-ZSH Theme clones intended for Linux desktop. Take a manual backup of the .bashrc file. If you do not like the things, you can simply delete the modified .bashrc and make the backup active and run source ~/.bashrc.

Colorful Bash on SSH with Syntax Highlighting Ubuntu

 

Colorful Bash on SSH with Syntax Highlighting : Using Ported Theme

 

You are at /root. You have git installed, if not, run :

Vim
1
2
3
4
apt install git
#apt-get install git #on older Ubuntu
apt update
apt upgrade

apt command works fine now. After that, do these :

Vim
1
2
3
4
git clone https://github.com/AbhishekGhosh/bash-it.git ~/.bash_it
cd ~/.bash_it && ls
chmod +x install.sh
~/.bash_it/install.sh

This will ask you questions (your .bashrc will be backed up too). This will be the questions and you’ll answer in this way :

Vim
1
2
3
4
5
6
7
\. ~/.bash_it/install.sh
Your original .bashrc has been backed up to .bashrc.bak
Copied the template .bashrc into ~/.bashrc, edit this file to customize bash-it
Do you use Jekyll? (If you don't know what Jekyll is, answer 'n') [Y/N] [n]
Would you like to enable all, some, or no aliases? Some of these may make bash slower to start up (especially completion). (all/some/none) [none]
Would you like to enable all, some, or no plugins? Some of these may make bash slower to start up (especially completion). (all/some/none) [all]
Would you like to enable all, some, or no completion? Some of these may make bash slower to start up (especially completion). (all/some/none) [none]

All, None etc. are typed input by us. As we are not using a Desktop, we need to comment out certain stuffs. Open :

Vim
1
nano ~/.bashrc

The theme named sexy exactly matches the iTerm + our setup’s font size. Uncomment text editors, git editors, git etc. Then source it :

Vim
1
source ~/.bashrc

You’ll get the thing exactly we have shown in the screenshot. This Theme method is not exactly, which is comfortable for SSH. Actually, the .bashrc should be edited itself. That is third method, Arch Linux has excellent peoples who loves these odd stuff at 30-70 years of age :

Vim
1
https://wiki.archlinux.org/index.php/Color_Bash_Prompt

Whenever there is color related thing and searching our website or asking us does not give properly reply, go to Arch Linux Wiki. We are not color expert, but better to follow some website, which is running for few years and works around core stuffs.

Tagged With bash syntax highlighting , syntax highlighting bash , bashrc highlighting , bashrc for syntax highlight on bash , bash syntax highlighting color schemes , bash syntax highlight , bash how to highlight , bash highlight some text , bash color syntax , ubuntu text editor no bash hightlight
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Colorful Bash on SSH with Syntax Highlighting (Ubuntu)

  • Change Github’s Default Gist Style With jQuery Plugins

    Yes, There Are jQuery Plugins to Change Github’s Default Gist Style With jQuery Plugins! They can do lot of works than simple changing look.

  • Nano Syntax Highlighting : nanorc

    Nano Syntax Highlighting Can Be Forced With nanorc Files on All Linux Distro Like Ubuntu, CentOS, REHL, Arch Linux As Well As on OS X & BSD.

  • Run Bash Scripts on Windows 10 Via Git Bash To Launch Linux GUI App

    Run Bash Scripts on Windows 10 Via Git Bash. Git Bash Offers Integrity Options With Windows 10 Bash Making it Easy to Work on Both Windows & unix System.

  • OS X Nano Syntax Highlighting

    Here is How to Update OS X Nano and Enable OS X Nano Syntax Highlighting For Various Languages. Needed dot Files to Match With iTerm2 Has Been Supplied.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy