Super User is a question and answer site for computer enthusiasts and power users. 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

I want to open port using command sudo ufw allow 3306/tcp but it gives the following error:

sudo: ufw: command not found

please help me

share|improve this question

migrated from Feb 17 '10 at 11:38

This question came from our site for professional and enthusiast programmers.

retagged it, but newby questions are never false. May I hint you at Ubuntu community for questions like this? – BeowulfOF Feb 17 '10 at 11:22
Hello, welcome to Super User. Your question has been migrated here, where it is more adapted. To regain ownership over your question, you should create an account here, and associate it with your Stack Overflow account in user options. – Gnoupi Feb 17 '10 at 14:32

an open port helps you nothing, if you don't have a server listening on this port.

if you install mysql it will automatically open port 3306

share|improve this answer
Ihave to agree with knittle. At the moment it's sounding like you don't have ufw installed, so you may have misunderstood the purpose fo that line in the guide you're following? – jonathanserafini Feb 17 '10 at 13:09

If the command ufw returns:

sudo: ufw: command not found

Than I'm almost sure that ufw is not installed yet.

Use apt-get to install ufw on you machine. Like Matthew Flaschen typed above type:

sudo apt-get install ufw
share|improve this answer
sudo apt-get install ufw

You'll find searching the web helpful on these types of questions.

share|improve this answer
Who needs to search the web when you can search the trilogy sites? – Gnoupi Feb 17 '10 at 14:35

Type whereis ufw. If you get back something like this:

ufw: /usr/sbin/ufw /usr/share/man/man1/ufw.1.gz ...

(I'm making up the details, I don't have ufw installed.) If you get back something like that, it tells you that the ufw binary is at /usr/sbin/ufw. Perhaps your $PATH doesn't recognize /usr/sbin. In that case you should call ufw with a full path: sudo /usr/sbin/ufw allow 3306/tcp.

ufw may well be somewhere inside /etc (or inside /etc/init.d), rather than in any .../bin directory.

If whereis ufw returns:


then you probably don't have it installed, and will need to do:

sudo apt-get install ufw

as Matthew Flaschen says.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .