On one of my servers, the prompt is [user@host path]...and I can actually push "tab" to auto-fill the path.
But on my new Ubuntu server, it is just a dollar sign?
migrated from stackoverflow.com Nov 10 '09 at 9:48
This question came from our site for professional and enthusiast programmers.
Since you are asking two questions, I'll answer both.
Why doesn't tab autocomplete file paths?
Because you shell either doesn't support it, or tab completion isn't turned on.
To resolve this, you first need to discover what your shell is. On the machine whose shell you enjoy, run
You may see the common
Now, you can change your shell on Ubuntu machine. On that machine, first make sure that the shell you want exists. Since the shell might not be in the same location on the Ubuntu machine as on the other, check the location by typing
This will give you the path of the shell you want, something like
If you don't see a path, but instead see
With the path of your chosen shell, you can finally change your shell by running
Why is the prompt a dollar sign instead of [user@host path]?
Because of your prompt environment variables
You need to set a variable called PS1 on one of your login script, for example /etc/profile or ~/.bashrc. It will depend on your distribution.
i guess, you are not using bash, but sh and your prompt is not set properly (if this is even possible with sh).
you can get your current shell by typing:
if you want to start bash, just type
Bash is not the only shell.
Your issue could be a simple matter of not having a .profile or .bashrc that sets PS1, or it could be that your login shell is not bash at all.