• Home
  • Archive
  • Tools
  • Contact Us
  • Forum

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
The Customize Windows > Computer and Internet > General > 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.

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.

Advertisement

---

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 ubuntu highlight bashrc , highlight html in bash , customizing bash for ubuntu on windows , color syntax bash , bashrc highlighting , bash syntax highlighting , bash syntax highlight , bash highlight some text , bash color syntax , bash code highlighting nano

This Article Has Been Shared 4374 Times!

Facebook Twitter Google+ Pinterest

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Google Plus - Abhishek Ghosh1 and 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)

  • Run Ubuntu Live Using External SATA Hard Disk

    Run Ubuntu Live Using External SATA Hard Disk. You need not to purchase an external hard disk, even a desktop SATA or PATA Hard Disk will work for this project.

  • FAQs on Ubuntu 12.04 after Upgrading from Windows

    FAQs on Ubuntu 12.04 after Upgrading from Windows are for the new users of Ubuntu who are not even aware of small tweaks like activating transparency effect.

  • Virtual Desktop Interface (VDI) and HTML5

    Virtual Desktop Interface as a term, may confuse with the usual mechanism for monitoring remote display. VDI currently does not support for every mobile device.

  • Installing Apache2 With PHP5 and MySQL Easy Guide

    Installing Apache2 With PHP5 and MySQL on Rackspace Cloud Server with Ubuntu Linux is written in easy language and as step by step guide for the newbies.

  • Select and Delete All Text of a File In SSH

    It is Quite Pathetic To Hold the Delete/Backspace Key of Any in Text Editor Like Nano or Vi in SSH Session. Here is a Practical Cheat Sheet.

Additionally, 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 Google+ or Twitter to join the conversation right now!

If you want to Advertise on our Article or want Business Partnership, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe 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

  • Google+ (13.7k Followers)
  • Pinterest (11.4K Followers)
  • Twitter (4.7k Followers)
  • Facebook (4.9k Followers)
  • LinkedIn (3.2k Followers)
  • YouTube (1.5k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Getting Started With IBM Cloud IoT (Watson IoT Platform) February 22, 2019
  • ESP WROOM 32 : How To Setup ESP32 NodeMCU With Arduino IDE February 21, 2019
  • Arduino, NodeMCU ECG : AD8232 Single Lead ECG Module February 21, 2019
  • WiFi With Arduino For IoT : ESP8266, ESP32, NodeMCU, Adafruit Feather February 20, 2019
  • Wearables and Internet of Things : Part II February 13, 2019

About This Article

Title: Colorful Bash on SSH with Syntax Highlighting (Ubuntu)
2015-01-22

Author: Abhishek Ghosh
Subjects: Computer and Internet

Is Part Of:


TheCustomizeWindows,

Thursday, January 22nd, 2015,
Vol.1(01),
p.1–43368 [IoT Ready Journal]


Source:The Customize Windows
ISSN: 0019-5847 ;
E-ISSN: 0019-5847 ;
Publisher:
jima.in

Cite this article as: Abhishek Ghosh, "Colorful Bash on SSH with Syntax Highlighting (Ubuntu)," in The Customize Windows, January 22, 2015, February 22, 2019, https://thecustomizewindows.com/2015/01/colorful-bash-ssh-syntax-highlighting-ubuntu/.

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.


PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

web analysis

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

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