Review your favorite Linux distribution.
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-21-2003, 10:53 AM   #1
LQ Newbie
Registered: Jul 2003
Location: Italy
Distribution: SuSE 10.1; Puppy Linux; Slax; Red Hat 9
Posts: 19

Rep: Reputation: 0
Question Run commands at logout/shutdown

Hi all !
I have been using Linux RH9 for a month and I'm already an addicted ! Reading this forum, I've found a lot of answers to my newbie questions, but now I have to ask something.
I know that you have to put your script in /etc/rc.d/rc.local if you want to run a command at startup, but what about running it at logout or shutdown? Where do I have to put it?
Thanks in advance

P.S.: My Linux system is now working almost perfectly, but in the next days I'll bore you with another pair of questions...
Old 08-21-2003, 11:26 AM   #2
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544

Rep: Reputation: 30
For logging out look at .bash_logout.

For shutdown or reboot read up about the inittab file, or the readme in /etc/init.d, or do a man init or man inittab for some clues.

Old 08-21-2003, 12:55 PM   #3
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232

Rep: Reputation: 30
or maybe /etc/rc.d/rc.6 if such a thing exists in redhat


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
Reboot,shutdown,logout issues in 10.1 Volt Slackware - Installation 3 08-13-2005 12:34 AM
Run some commands on system shutdown luizrolla Linux - Newbie 1 07-12-2004 08:42 PM
Logout twice to shutdown mhl Linux - Newbie 13 08-31-2003 06:02 PM
Logout/Shutdown problems in KDE Palarran Linux - General 3 08-05-2003 04:50 PM
Is there any shutdown/logout logs? Cray2 Linux - Software 21 07-28-2003 12:10 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:15 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