Ubuntu – Logging out other users from the command line

command lineusers

Sometimes when there are too many users logged in it can cause my computer to become very slow and laggy due to low amount of available RAM. I would like to be able to quickly log out the other users from the command line instead of manually switching into each user and logging them out.

Is this possible?

Best Answer

this is one answer

who -u

that give you the PID

Then you can kill the user session.

kill "pid"