Today, I have a problem. The parameters behind git are tab-key, such as Git c_
Search the internet for half a day to find the answer as follows
Today in Linux with Useradd new users, found that the use of new users when landing, in the shell can not use the TAB key to complete the command, press the up and down keys can not switch historical commands, garbled phenomenon. The root user is OK.
Later found that in/etc/passwd, the new user shell and the root user is not the same.
Root uses/bin/bash.
New user By default is/bin/sh
Found with Ls-l/bin/sh
/bin/sh-/bin/dash
Dash and bash are not the same, after changing the/bin/sh to/bin/bash,
Run sudo on my Ubuntu gedit/etc/passwd results The following can also be viewed with the env command shell=/bin/bash/
Hailongzhou:x:1000:1000:hailongzhou,,,:/home/hailongzhou:/bin/bash
The user's shell is really bash but/bin/sh-/bin/dash
Modify the default connection for Ubuntu/bin/sh: terminal input: [email protected]:~# cd/bin[email protected]:/bin# ls-l/bin/shlrwxrwxrwx 1 root root 4 2008- 04-28 19:59/bin/sh, Dash//default bit dash[email protected]:/bin# ln-sf bash/bin/sh//Soft link-f means force [email protected]:/ bin# ls-l/bin/sh
lrwxrwxrwx 1 root root 4 2008-05-01 22:51/bin/sh bash//Now Bash
The parameters behind git can be filled with the TAB key.
The difference between bash and dash
Bash-gnu Bourne-again SHell
Dash-debian Almquist Shell
You can look at the man Bash/man Dash separately.
So how do you change sh to point to bash?
The most violent approach, of course, is to change/bin/sh's soft links directly into bash,
such as: Ln-s/bin/bash/bin/sh
However, there are some elegant methods,
sudo dpkg-reconfigure Dash
When the menu asks you if you want to dash, you can choose No.
To check again, Ls/bin/sh-al found that the soft link points to/bin/bash.
The Linux Shell cannot be complete by pressing the TAB key