Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-02-2016, 10:37 AM
|
#1
|
LQ Newbie
Registered: Dec 2016
Location: India
Posts: 5
Rep:
|
How to logout [command] ?
I don't know the command , to logout . I am using RHEL 5 ,no GUI.
I would also like to know the command for logging out , for RHEL 5 , with GUI.
Thank You.
|
|
|
12-02-2016, 10:44 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
exit ?
ctrl-d ?
|
|
|
12-02-2016, 10:45 AM
|
#3
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
logout ?
Or do you mean a command that you can type in that will log you out of the gui?
|
|
|
12-02-2016, 11:43 AM
|
#4
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,370
|
When you are at the command line the command to logout is:
logout
When you are using a GUI you logout by clicking on a menu entry. Each GUI uses a different click sequence to logout. What GUI are you using?
--------------------
Steve Stites
|
|
|
12-02-2016, 11:49 AM
|
#5
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
RHEL uses gnome by default. If you are, in fact, asking for how to log out of the gui from the command line, you can type this:
Code:
DISPLAY=:0 gnome-session-quit --force
|
|
|
12-02-2016, 12:05 PM
|
#6
|
LQ Newbie
Registered: Dec 2016
Location: India
Posts: 5
Original Poster
Rep:
|
I am using RHEL 5 . I am using using GUI . I want to know a command . so that when i enter a command from shell/terminal then the system will logout.
|
|
|
12-02-2016, 12:09 PM
|
#7
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Quote:
Originally Posted by abbyking
I am using RHEL 5 ,no GUI.
|
Quote:
Originally Posted by abbyking
I am using RHEL 5 . I am using using GUI .
|
Which is it? Have you tried anything posted so far?
|
|
|
12-02-2016, 12:15 PM
|
#8
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Quote:
Originally Posted by abbyking
I am using RHEL 5 . I am using using GUI . I want to know a command . so that when i enter a command from shell/terminal then the system will logout.
|
I just answered you. Did you have success doing what I said?
|
|
|
12-02-2016, 12:21 PM
|
#9
|
LQ Newbie
Registered: Dec 2016
Location: India
Posts: 5
Original Poster
Rep:
|
[mac-lin@localhost ~]$ gnome-session-quit --force
bash: gnome-session-quit: command not found
|
|
|
12-02-2016, 12:24 PM
|
#10
|
LQ Newbie
Registered: Dec 2016
Location: India
Posts: 5
Original Poster
Rep:
|
hey! after a lot of time searching this forum ,i found that this
Quote:
gnome-session-save --kill
|
is working.
so when I type this in shell/terminal In rhel5(GUI), i get a gui message with options to logout restart shutdown.
|
|
|
12-02-2016, 12:26 PM
|
#11
|
LQ Newbie
Registered: Dec 2016
Location: India
Posts: 5
Original Poster
Rep:
|
But how to logout when using rhel5(NO GUI) only text user interface , what is the command
because iam sure that this
Quote:
gnome-session-save --kill
|
will not be useful there.
|
|
|
12-02-2016, 01:00 PM
|
#12
|
Moderator
Registered: Aug 2002
Posts: 26,469
|
See man pages for gnome-session-save.
Have you tried the --logout or --force-logout options?
As stated logout or exit will logout from a non GUI terminal.
|
|
|
12-02-2016, 08:08 PM
|
#13
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
Quote:
Originally Posted by abbyking
I don't know the command , to logout . I am using RHEL 5 ,no GUI.
I would also like to know the command for logging out , for RHEL 5 , with GUI.
Thank You.
|
Code:
sudo pkill -u "username"
Not sure if that will work for RHEL but I use it in a install of linux with fluxbox without a login manager in my term to logout of that and get me back to my login cli screen.
if you're just running the login screen then did you try logout?
Last edited by BW-userx; 12-02-2016 at 08:09 PM.
|
|
|
All times are GMT -5. The time now is 08:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|