• 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

This Article Has Been Shared 956 Times!

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)

  • 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 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

  • What Online Casinos Have No Deposit Bonus in Australia March 30, 2023
  • Four Foolproof Tips To Never Run Out Of Blog Ideas For Your Website March 28, 2023
  • The Interactive Entertainment Serving as a Tech Proving Ground March 28, 2023
  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023

About This Article

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

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT