I have a server that does not show standard bash prompt, after I log out from the machine.

If I ssh to this server, I can do all operation there (e.g. ls, cwd, etc) Tried to reinstall bash (sudo apt-get install --reinstall bash) also did not help, as well as source the bashrc.

This is the output that I currently have after ssh:

Linux mymachine 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
source ~/.bashrc
cd /tmp/

(no prompt shown there, but I can type any linux command there and directly shown ).

how can i have the bash prompt shown again?

Edit: With this command, my bash prompt comes back again

bash -i
bash: cannot set terminal process group (4896): Inappropriate ioctl for device
bash: no job control in this shell
mymachine@myuser2:~$ ls

now I am trying to figure out the error above, and why it returns me the prompt despite error.

  • 2
    Most probably your environment variable PS1 is set to an empty string. Check your sourced files where this is set. – Gerald Schneider Jan 28 '19 at 9:45
  • Please post your solution as an answer and accept it, don't just edit your question. This will mark your question as "solved" in the system. – Gerald Schneider Jan 28 '19 at 14:40

Ok i found the issue, the /dev/pts is missing for some reason. After mounting everything, it works as expected:

mount -t devtmpfs -o mode=0755 udev /dev
mount: udev is already mounted or /dev busy
       udev is already mounted on /dev
       udev is already mounted on /opt/axess_310_TICKET/dev
       udev is already mounted on /opt/grafana_test/dev
       udev is already mounted on /opt/axess_39/dev
       udev is already mounted on /opt/axess_39_TICKET/dev
       udev is already mounted on /opt/ACS_DUMP_TEST/dev

mount -t devpts devpts /dev/pts
udevadm trigger
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.