Reload Squid Proxy Server Without Restarting Squid Daemon

I made some changes to the /etc/squid/squid.conf file and issued the command /sbin/service squid restart. However, this command takes way too much time to restart the server. How do I tell squid to just reread the config file and apply new changes under Linux operating systems?

You can use any one of the following commands to reload the squid after making changes to squid.conf file. Open a command-line terminal (select Applications > Accessories > Terminal) OR login using ssh, and then type the following commands: How To Reload Squid.conf after change

# /usr/sbin/squid -k reconfigure
OR, use startup script from /etc/init.d/ directory on Linux as follows:
# /etc/init.d/squid reload
Another option is to send HUP single to squid process using the kill command:
# kill -HUP `cat /var/run/squid.pid`
OR
# kill -HUP $(cat /var/run/squid.pid)
OR if you are using Linux systemd based system:
# systemctl reload squid

A note about FreeBSD

Use the following command:
# /usr/local/sbin/squid -k reconfigure


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 6 comments so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
6 comments… add one
  • Rajiv Singh Jan 26, 2012 @ 17:36

    just run the following command
    /sbin/service squid reload

  • Rajiv Singh Jan 26, 2012 @ 17:38

    hope the command /sbin/service squid reload
    will solve ur problem

  • Mehdi May 15, 2012 @ 5:40

    Thank you, helped me not to wait ten seconds for squid3 to restart

  • markus Jul 28, 2013 @ 6:26

    thanks !!

  • Asep Saepuloh Dec 28, 2015 @ 6:27

    Thank’s for your info

    • kali shandy Mar 30, 2017 @ 18:44

      Helped me a lot. it worked

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum