Showing posts with label terminal. Show all posts
Showing posts with label terminal. Show all posts

03 May, 2014

Colors and more... in the Terminal

Screenshot of a sample Bash session, taken on ...
Screenshot of a sample Bash session, taken on an old release of Gentoo Linux. (Photo credit: Wikipedia)
03-May-2014


I am one who is comfortable using the Terminal, having used the computer since the DOS days, and while Windows with all its graphical interfaces is very much welcome, as it brings with its GUI tons of changes, I would find myself still at ease doing command lines.

And I would consider sprucing up the Terminal the pinnacle of a die hard's declaration... finding comfort in typing text and cryptic commands, also find comfort at least in seeing different colors in the texts and backgrounds. That's it!

So, I am one like that. I have worked on PROMIS since 1996, and DOS since time immemorial, all command-line systems, and I was very much satisfied just seeing the colors come alive on prompts and errors(!) and all.

And now that I am doing Linux, I craved for the same thing, and fortunately, there was help - from the Community.

I would just put a reference to the article, so I don't duplicate anything.

Here's the link: Customizing Bash Prompt

I hope you enjoy tweaking your prompt, to your own liking, etc., etc.

Till then!

Enhanced by Zemanta

02 May, 2014

And... shortening my command line bash prompt

English: Sample of Bash in GNOME Terminal. Scr...
English: Sample of Bash in GNOME Terminal. Screenshot taken in Fedora Linux. Results of ping, pwd, cd, yum and ls command. فارسی: نمونه‌ای از محیط متنی لینوکس (بش) در نرم‌افزار گنوم ترمینال، توزیع فدورا. خروجی دستورهای ping، pwd، cd، ls، و yum. (Photo credit: Wikipedia)
02-May-2014


This may be considered insignificant, but if you are one who sticks to the terminal, or the command line, it would be one sensible action.

Originally, the prompt would show the username and the box manufacturer and model, etc., etc. And this is what I consider 'unsightly'... ugh!

Well, no offense to others, I am just speaking for myself.

But I needed to shorten it, as it tend to fill up the line, without even typing anything.

I just followed what is indicated here, and it worked like a charm. So again, I am keeping a record, so I can go back to it when the need arises.

Edit .bashrc file and make some changes:
1. gedit/vi ~/.bashrc
2. Remove @\h
3. Replace \w with \W (lower case w to capital W)
4. Save and exit terminal.

Upon opening a new terminal window, the change should be effected already.

Reference is here: How can I shorten my command line (bash) prompt?

Till then!

Enhanced by Zemanta