terminal disappear

While working inside a teminal emulator (e.g. xterm), I issued the login command, trying to login using different user-id.  Press enter, my terminal disappears.  Why ???
Is the login command not working ??
Who is Participating?
jlevieConnect With a Mentor Commented:
No, the login process isn't inteded to be used in that way. If you want to become a different user you get there by executing "su some-user" and supply that users password. If you need to be that user with their login environment, use "su - some-user".
the above answer suggests how to use the login command.

some process probably triggered that incident. say your xterm lost connection to the Xserver.

the login command is not normally entered on the command line unless you want to initiate a session on the system for the user specified by the User parameter.

In order to preserve the integrity of the system, only one session
at a time is allowed to be logged in to a port. This means that the
login command entered from the shell prompt cannot succeed, as both
the original session and the new login session would be on the same
port. However, the exec login command succeeds because a new shell
replaces the current one. The login command is typically a built-in
shell command, causing the shell to replace itself.

Login is intended only for real logins. To switch to another user you go by the "switch user" command, su.
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.