Category Archives: nano

Using vi, or nano – Terminal Text Editors

Vi was the original terminal based text editor created for Unix. It is as small and as simple as it gets. The binary resides within the Unix and Linux bins, and can easily be placed on a removable media for ultimate emergency portability. There are three modes to vi:

1. command mode
2. ex mode
3. insert mode

First open a file. Open your grub configuration file. Sudo vi “/boot/grub/menu.lst”. Use up, down, left, and right to navigate eh terminal. Press escape and it will return the mode you are in. Press R to enter replacement mode. Use i or a to insert text rather than replace it. To exit vi use :wq or ZZ. To save without exiting use :w. Or to quit without saving use :q.

Or you can use nano. Type:

sudo nano /boot/grub/menu.lst

Nano is always in edit mode. Move the cursor to the position you want to edit, and backspace to remove text, or type to add. Then press control-o to save, and control-x to quit. After looking into vi, its easy to realize both have the same functionality, and ultimately have various commands to do things. The commands are quirky, especially for us who grew up with graphical editors. But once you know the commands to save and exit you can corrolate functionality with any graphical text editor.

Elevators are Cool – Expecially Ones to Space

Start with a picture:

Now, 30 years after “2001” author Arthur C. Clarke wrote about an elevator that rises into outer space, serious research is happening all over the world in an effort to make the far-fetched-sounding idea a reality.[Source]

NASA has put of some nice money for reasearch into a scaled down model of an elevator. The projected elevator will carry material, stuff, humans, crafts theoretically into space. The science is sound, the technology is reasonable, making it is another story. The length of the elevator cable, some 22,000 miles long is the primary challenge. The material is the question, and most likely will need to be some form of the carbon nano tube structure. How to make 22,000 miles of carbon nano tubes is the technological question. Ultimately the 22,000 miles of cable will lift an elevator 13 miles above the Earth’s surface. From there getting further into space is substantially easier than leaving directly from the ground.

The net goal is to lift material to 13 miles above the surface using a quantity of energy that is less than the chemical energy currently required for rockets. I think the elevator will use some sort of laser technology to beam energy to the platform as it rises upwards. It could use electricity through the cable itself. Maybe at lower altitudes lasers can be used to heat air under the platform, and air pressure itself can be used to assist the ascent.

Overall quite interesting.

Vi or Nano- New or Old

I recently took the LPI 101 exam. I got nailed with VI questions. I have little to no experience with VI as a terminal text editor. I have always used nano. Nano is an intuitive applications. Move the cursor directly to the location you want, press the delete button, or start typing. If you want to find something use cntrl-w. If you want to save press cntrl-o. If you want to quit use cntrl-x. Or kill it with cntrl-z. Frankly I can’t think of anything else I would want to do in a terminal based text editor. Considering this I was nailed on the exam with vi questions. yes I said this twice in the same post. I know I can check out the man page for vi and probably get it pat down in no time, but why was vi so important on the test and nano was not even questioned. I know that vi was the original UNIX terminal based text editor, but times have changed; nano is easier. Why would a new age test focus so hard in such an old app, specifically when a new app exists in all major Linux distributions that is clearly easier to use productively. The commands and means of navigation are intuitive; vi needs to be studied and figured out. Not fair.

Ndiswrapper – Ubuntu WiFi in 4 Easy Steps

First download Ndiswrapper:


Then install your kernel headers and compilation packages:

2) sudo apt-get install build-essential

Unzip the ndiswrapper package. Navigate to the folder and issue:

3) make

Then issue:

4) sudo make install

Your done. Add Ndiswrapper to autostart on boot:

sudo nano /etc/modules

Add ndiswrapper to the bottom of the list. And blacklist any conflicting drivers (my conflict was bcm43xx) to prevent conflict:

sudo nano /etc/modprobe.d/blacklist

Add “blacklist bcm43xx” in my case, to the bottom of the list.

Now add your windows module to ndiswrapper. Windows drivers are .inf files. A typical Windows driver is bcmwl5.inf:

sudo ndiswrapper -i bcmwl5.inf

You can extract drivers from exe files using “cabextract”. Install cabextract using apt-get then issue:

cabextract drivers.exe

This will unzip the exe to the current directory of the terminal window. You may want to place the exe file in a new folder to prevent making a mess.

Just type ndiswrapper at a terminal prompt to see other options the binary allows. Also for a graphical frontend use ndisgtk.

Instantly load the ndiswrapper module to get your WiFi working without rebooting:

sudo rmmod ndiswrapper && sudo modprobe ndiswrapper

Now, could this be any easier 🙂 Send a comment if your having trouble 🙁

Reblog this post [with Zemanta]

Debian – Dovecot IMAP Installation

When installing dovecot on Debian you have to include the appropriate mail transport agent. For instance to install dovecot with imap support use: sudo apt-get install dovecot-common dovecot-imapd Then configure the /etc/dovecot/dovecot.conf file: sudo nano /etc/dovecot/dovecot.conf Adjust the listen section by uncommenting the pound signs. Configure the listen address to be *:143. Use the 1’st mbox default mail location; search for the line using control “w” in nano. Contract the search term to “mbox” and you will most likely be moved to the appropriate location. Simply uncomment the pound sign and your dovecot should be ready to go after a restart: sudo /etc/init.d/dovecot restart