Terminal only shows $?

11,476

Your new user's login shell has been set to /bin/sh, which on Ubuntu is dash. This is a shell intended to be small and fast, to run scripts efficiently. It doesn't have any interactive features. Change your shell to zsh (better) or bash (more common):

chsh -s /bin/bash

If you want to change adduser's default shell, edit /etc/adduser.conf:

DSHELL=/bin/bash
Share:
11,476

Related videos on Youtube

dreq
Author by

dreq

Updated on September 18, 2022

Comments

  • dreq
    dreq almost 2 years

    I recently set up a new user using "adduser username" on my server and noticed that when I login I get:

    $
    

    Also, with my new user there is no folder highlighting, or tab completion.

    However when I login as root I get a full terminal prompt plus highlighting, completion etc.

    root@lin01:~#
    

    Anyone have any idea what I did wrong?

    Edit: Solution was to type

    chsh -s /bin/bash
    

    While logged in with the $.

    • Admin
      Admin about 9 years
      For me a password was requested on execution of the command. (the user-pw). As well to mention: you need to re-login to enable the new settings (debian-jessie)
  • Zoredache
    Zoredache about 13 years
    -1 This doesn't answer the question, and doesn't fit the tone of the site, which is for professional system administration. I probably would have not downvoted if this question/answer had been on superuser or ubuntu.se.
  • cidermonkey
    cidermonkey about 13 years
    Dude didn't understand the prompt, wanted a nice one. I gave him an example prompt to work with and encouraged changing it to fit his needs.
  • Zoredache
    Zoredache about 13 years
    But if you read deeper into the question, you will see that it was about the a newly created complete lack of the standard environment. Please remember this site is not a forum, it is a Q&A site. If you post an answer it is supposed to be an answer to the question.
  • Ben Pilbrow
    Ben Pilbrow about 13 years
    I think the point Zoredache is making (and I am inclined to agree) is that you didn't answer the ultimate question of Anyone have any idea what I did wrong?.
  • dreq
    dreq about 13 years
    I tride typing chsh bash and it says "bash is not a user". So i typed "chsh username --shell bash" and it said "bash is an invalid shell". but I can type "bash" and it switches to the one i want. Any thoughts?
  • dreq
    dreq about 13 years
    ok well, it turns out the correct command for me was: chsh -s /bin/bash .. thanks for pointing me in the right direction
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' about 13 years
    @kidcapital: Yes, chsh -s /bin/bash was right, I indicated the right command but messed up its syntax. Sorry.