Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how to To set your Squid server to listen on TCP port 8888 instead of the default TCP port 3128, change the http_port directive as such:

http_port 8888

When I write http_port 8888 i get command error.

share|improve this question
Please post the exact error message – mbs Jun 28 '12 at 9:23

You can read the detailed documentation regarding installation/configuration of Squid.

Prior to editing the configuration file, you should make a copy of the original file and protect it from writing so you will have the original settings as a reference to re-use as necessary.

sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original
sudo chmod a-w /etc/squid/squid.conf.original

You should now edit (ex. sudo nano /etc/squid/squid.conf) the file /etc/squid/squid.conf and change the http_port directive to http_port 8888

share|improve this answer
i installed gedit by sudo apt-get install gedit but after i wrote sudo gedit /etc/squid3/squid.conf i got cannot open display run gedit --help thxs in advance – abedalmawlaitani Jun 28 '12 at 13:39
@abedalmawlaitani You could try nano. I have update my answer. – pl1nk Jun 28 '12 at 14:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.