When I connect to my server:

ssh user@ip.address

I login with a password, and then do:


I get this message "-sh: 2: logout: not found".

  1. Why can't I log out ?

  2. What does this message mean ? I mean Linux, how dare you.

  3. Is this some kind of a logger ? Where does it keep messages ? I feel as an aspiring sys admin, I need to learn more about logger, for troubleshooting right ? Where can I learn some BASIC junior level things, any suggestions would be tremendously highly appreciated.

  • Commands can be viewed with history; you can also enter commands (when local) without them being stored in the history (unless it's setup to record all commands; which is the default for remote/ssh/etc logins) - but much of this is shell specific. You haven't specified your OS/release (we support Ubuntu where BASH is the default)
    – guiverc
    Dec 7, 2019 at 4:21
  • Ubuntu 18.04 Server
    – Tomas.R
    Dec 7, 2019 at 8:32

1 Answer 1

  1. your login shell appears to be set to /bin/sh - which doesn't have a logout builtin command (you can use exit instead - which will have the same effect in this context)

  2. see (1)

  3. no, it's just a message from the shell. There is a logger command however - you can learn about it by typing man logger

If you want to use the bash shell's logout command, then you can change your user's login shell using the chsh command ex.

chsh -s /bin/bash
  • Thank you steeldriver
    – Tomas.R
    Dec 7, 2019 at 10:57

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.