TAB doesn't show available commands

When I log into this HP UNIX machine with the root account, everything works fine, but then i switch user to my own user account it doesn't work.

When I am root, the promt looks like this
[root@testserver] /systems >

When i use my own account, the promt looks like this

Anyone know how to fix this? so i can TAB my way through commands on my own account??
Who is Participating?
your defaul login shell is sh, if you want to change your default login shell, modify /etc/passwd file, or run "sam" to change the login shell.

How the promt looks like, it depends on the setting of PS1 in your login script.
From the shell prompt it looks like the root has the default shell as 'bash'. If you want to make bash your default shell, use the method that yuzh suggests.

If you want to make changes to the /etc/passwd file, you should know the path of the bash shell command. You can do a 'which bash' or 'whereis bash' to get the path of bash. It will mostly be /usr/bin/bash or /usr/local/bin/bash.

To change the prompt, refer
For e.g. The "[root@testserver] /systems >" prompt can be created by doing the following
PS1="[\u@\h] \w>"
only bash completes commands and filenames

use chsh to chenge your shell
/etc/shells hints you with valid shells.

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Hi dreamer81,

I am going to give an answer to your questions and some explanation to you:

1. To use TAB, you are going to need the shell called "bash", it usually comes with Linux and not with HP-UX, so if you don't have it in your HP-UX, you can download it from
If you don't have how to "install" bash, there is a command you can use, it is similar to TAB, but it will be used for files in the current directory and commands you have already executed.
In the shell, type "set -o vi" and your shell will be similar to bash: you can start to write a filename that is in the current directory, press: "ESC + ESC", and it will finish to write the filename, also you can use it to check the commands you have already executed: press -> "Ctrl + k" -> Backward - "Ctrl + j" -> Forward. Be careful, k and j are lowercase.

2. About the prompt you want to change, you have to change and export the environment variable called: PS1
Try: echo ${PS1}

You can do a lot of things with this variable, I am going to show you some of them:
export PS1="[`/usr/bin/whoami`@`/usr/bin/uname -n`]:\$PWD# "

In the above, you will have something similar to:
[<Current User>@<Hostname>]:<Current Path>#

The good thing above is the <Current Path>, because it will always show the current directory with path to it.
[utest@Test]:/opt/java1.4# pwd
[utest@Test]:/opt/java1.4# cd ..
[utest@Test]:/opt# pwd

You can put the export in your profile:
cd $HOME
vi .profile

Just for further information, if you check in all unix environments, you will always have 4 PS variables: PS1, PS2, PS3, PS4
[utest@Test]:/opt# set | grep PS
If you want to know what they are used for, check the link:

I hope it helps. =0)
Ops... I made a mistake above: when I say "press -> "Ctrl + k" -> Backward - "Ctrl + j" -> Forward", change the "Ctrl" to "ESC".

How I could do that? hahah

root_start, did you miss to tell us that your "set -o vi" is for ksh?

>  only bash completes commands and filenames
tcsh can do it also
csh completes directories and filenames too, but not commands
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

split between yuzh http:#16368394 and root_start http:#16651153

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.