Sunday, September 18, 2011

Auto complete by hitting TAB does not work in Terminal

May 10, 2011 by  
Filed under General

Leave a Comment

There may be situations when you are trying to autocomplete the file and/or directory name by hitting TAB button from keyboard but it is not working as expected. You may wondering why rather than autocompleting (or giving suggestions on multiple matches) the insertion point is just going far and far !

Probably the solution is very simple. The reason for this problem is that you are not on bash. Try to solve using the following methods.

First try to check which shell you are on.

$ echo $SHELL

It should show which shell you are running on. However, if you are privileged user and want to check shell for other users, you may use finger command

$ finger eng

Replace eng with appropriate username. It will show the shell for the user along with other information. finger command is available by default on RedHat like systems but may not available on debian (and its derivatives). Try to install by running the following command:

$ apt-get install finger

Don’t forget to add sudo where necessary.

 

Now, lets assume the eng is not assigned bash shell and we want to assign it to that user. Find the path of bash by running the following command:

$ which bash

Usually it is in /bin/bash. So assign this shell to the user using the following command. Please note, you must have privilege to do that.

$ sudo usermod eng -s /bin/bash

Don’t forget to replace eng to your actual username and /bin/bash to the real path you found using the `which bash` command.

 

That’s all. Next time the user ‘eng’ logs in, s/he will see that auto completes are working fine as expected

GD Star Rating
a WordPress rating system
Auto complete by hitting TAB does not work in Terminal, 9.0 out of 10 based on 1 rating
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Related posts:

  1. Full site backup and restore in Shell
  2. Secure your Linux Servers
  3. Removing a directory using XML-API
  4. cPanel JailShell, Unmount and Clean Virtfs
  5. Apache configuration (httpd.conf) checking

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!
Click here to cancel reply.