02 May, 2014

Making terminal(s) remember commands

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


Here is another trick that I did, and now I had to re-do, so I am recording it, so I can go back to it anytime.

Edit bashrc: gedit/vi ~/.bashrc
Add at last line: export PROMPT_COMMAND="history -a; history -n; $PROMPT_COMMAND"

-a switch is to make terminal record the commands
-n is to record the command history from all terminals (so this is an option)

Save and exit, and voila!

To look at command history, just type history and press [Enter]
To run (again) a command, type !number (on the left of the command) and press [Enter]

Here's the reference: [SOLVED] Terminal doesn't remember last commands

Till then!
Enhanced by Zemanta

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

Fixing BCM4352 driver in Ubuntu Linux

Broadcom
Broadcom (Photo credit: Wikipedia)
02-May-2014

I needed to reinstall Ubuntu Linux 14.04 Trusty Tahr in my laptop, as the program that I needed to use doesn't run. I believe I messed it up - part of my learning, I would say.

As in my previous installation, the Wireless  Network Adapter wasn't working, and that is the one I had to fix first and foremost.

I searched again, and I don't think I found the same article that I used before, but now, I used one which I followed to the letter, and after reboot, I find that the Wi-Fi connection is still not working.

Since I had to go and send my K1 girl off to school, I shut down the computer. And my wife and I had to go to the grocery to grab some things. A couple of hours, we were back.

Computer Home Business

So now I am on my second time to start the laptop after installation. I tinkled with the system settings, specifically on the profile photo, date and time settings, battery life indicator, etc. When I came to the 'Software & Updates section, I did my usual tinkering, checked the boxes on the Other Software and Updates tabs, and surprisingly, coming to the Additional Drivers tab, there was a choice to use the proprietary driver for the Broadcom wireless network card. That means what I installed was recognized by the system!

So, I have to take note of it now, lest I can't find it again should the need arise - to reinstall once again, or do another box.

Here's the link: Fixing Broadcom BCM43xx cards Ubuntu 10.04 and later

Hope this helps others who would run into the same problem: my machine is HP Envy-15 TS.

Till then!

Enhanced by Zemanta