LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-05-2012, 04:44 PM   #1
rtz
Member
 
Registered: Mar 2012
Posts: 40

Rep: Reputation: Disabled
reading configuration file


is there any command to ask all the running processes to re-read their configuration file.

Last edited by rtz; 04-05-2012 at 05:15 PM.
 
Old 04-06-2012, 03:36 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Greetingz!

Code:
kill -HUP <pid>
I would advise that you read the man page for 'kill' on your platform.
Also note that if you are trying to get a service to re-read it's configuration, there may be a way to 'refresh' (rather than 'restart') the service in question (like Samba, SSH, PureFTP, and so forth).
 
Old 04-06-2012, 03:47 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
A more detailed information would be helpful. Your post says nothing about the distribution, version or the service you want to run. RH based distros allow reloading the service without killing it reading and refreshing the configuration file for changes on the fly. You may want to elaborate on your issue.

For example:
Code:
service httpd reload
 
Old 04-06-2012, 04:52 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by rtz View Post
is there any command to ask all the running processes to re-read their configuration file.
No. Many running processes don't have a config file. Some automatically re-read their config files when they change. Some re-read their config files on receipt of a specific signal (but there is no universal standard for which signal). Some have to be restarted.
 
Old 04-06-2012, 06:16 AM   #5
rtz
Member
 
Registered: Mar 2012
Posts: 40

Original Poster
Rep: Reputation: Disabled
my linux distribution version is ubuntu 10.04 and i want the ssh service to re-read it's configuration file after making changes in the sshd_config file.
 
Old 04-06-2012, 06:42 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
AFAIK sshd has to be restarted to make it re-read its configuration
 
Old 04-06-2012, 06:42 AM   #7
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
Then you would need to issue a command such as
Code:
/etc/init.d/sshd restart
This will restart the sshd service, and re-read the config files. Be aware though, that your connection may get dropped as a result of this.
 
  


Reply


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
[SOLVED] Grub is not reading its configuration file MALDATA Linux - Software 7 02-09-2012 11:08 AM
[SOLVED] Reading configuration files in C soppy Programming 5 11-12-2010 01:14 PM
shell script for reading of configuration files nhydra Programming 2 06-13-2006 04:15 AM
Configuration files reading Artik Programming 2 06-28-2005 10:35 AM
Not reading kickstart configuration file from specified location.....PLEASE HELP!! deepika Linux - Software 4 08-02-2003 09:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:15 AM.

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