Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-20-2003, 08:19 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
How to check amount of users logged in

Hey guys,

I work at a help desk and whenever I log onto one of our servers and wish to restart the server or software or something I need to make sure no one else is on. So right now I go around the office asking people to make sure, slow eh? ya. So is there a command I can run which will tell me if there is anyone currently logged on to the same server as me? and also is there a command I can do to broadcast a message to everyone logged on like "I'm restarting the software now."

If anyone knows that would be great, thanks!

Old 08-20-2003, 08:43 PM   #2
Senior Member
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 46
who shows you who is logged in

shutdown has options to restart the server in a certain amount of time and append a warning message.
Old 08-20-2003, 09:19 PM   #3
Registered: Jul 2003
Distribution: Slackware
Posts: 390

Rep: Reputation: 53
In addition to who(1) there's w(1); it's a bit shorter to type and gives more information. last(1) also comes to mind.

You can use write(1) to write a message to another person's terminal. Maybe you could write a script that takes the first column of who(1) and uses write(1) to broadcast a message?


Last edited by lyle_s; 08-20-2003 at 09:25 PM.
Old 08-20-2003, 09:41 PM   #4
LQ Newbie
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks darthtux!

That helps alot
Old 08-20-2003, 10:46 PM   #5
LQ Newbie
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
and Thanks lyle thats sweet as well :P


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
check amount of memory naijaguy Linux - General 4 10-15-2008 03:11 PM
Make most amount of Linux users in least amount of time studpenguin General 24 02-02-2007 04:42 PM
Control amount of time a user may be logged in. (Parental Control) darrensnospam Mandriva 13 02-18-2006 06:01 PM
What do you think about linux' users amount: increasing or not? Nad0xFF General 2 04-17-2005 10:52 PM
why so many logged in users? alagenchev Linux - Security 2 03-24-2005 07:19 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration