Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-09-2003, 11:03 AM   #1
Registered: Aug 2003
Location: Bulgaria
Distribution: OpenSuse 10.3, Debian 4.0r3 "Etch", FreeBSD 7.1, Ubuntu
Posts: 210

Rep: Reputation: 30
Exclamation Show Uptime On Shell Login~

Where and what must i write to show uptime stats when someone user login into shell....

login as: skate
Sent username "skate"
skate@'s password:
Last login: Mon Sep 8 21:56:56 2003 from
Machine Uptime Is:
7:03pm up 6 days, 8:48, 1 user, load average: 0.00, 0.00, 0.00
[skate@kapi2000 skate]$

Something like that ?!??! ;] did i must write something in /etc/motd ??!?
Old 09-09-2003, 11:52 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Probably best to just add it to their .bashrc file in their home directory. I wouldn't necessarily add it to the motd since its not an executable type file, its just read from, etc.
Old 09-09-2003, 12:48 PM   #3
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you want it for all users then stick:
echo Machine Uptime Is:

At the end of:


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between normal shell and login shell Manish Linux - General 7 11-14-2012 08:30 AM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
show last users login wisdom Programming 3 11-17-2005 02:56 AM
show motd on login pirozzi Debian 11 12-15-2004 10:40 AM
Shell script - how to show a specific line of a text file davi_cabral Linux - Software 3 09-28-2004 01:39 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:57 AM.

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
Open Source Consulting | Domain Registration