sodcalculator

10 Tech How-To

Add a Printer by IP Address on Ubuntu

Guide 10-30570 · Updated · Step by step

This guide shows you how to add a network printer to Ubuntu using its IP address. This is useful for printers that are not automatically discovered, or when you need to connect to a printer on a different subnet. You will need the printer’s IP address and, ideally, its driver or a compatible driver.

What You’ll Need

  • Ubuntu desktop (20.04 or later recommended)
  • The printer’s IP address (find it on the printer’s display or in its network settings)
  • Printer driver (many are included; you may need to download a .ppd file from the manufacturer’s website)
  • Administrative (sudo) access to install drivers

Step-by-Step

  1. Open Settings. Click the system menu (top-right corner) and select the gear icon, or search for “Settings” in the Activities overview.
  2. Go to Printers. In the Settings window, click “Printers” in the left sidebar. If you don’t see it, look under “Devices” or “Hardware”.
  3. Add a Printer. Click the “Add Printer” button. Ubuntu will scan for available printers. Wait a few seconds.
  4. Choose “Add Printer by IP”. If your printer isn’t listed, scroll down and click “Add Printer by IP” (or “Network Printer” and then select “Find Network Printer” with the IP).
  5. Enter the IP address. In the “Address” field, type the printer’s IP address (e.g., 192.168.1.50). The “Port” field will usually auto-fill with 9100 (the standard raw printing port). Leave it unless you know otherwise.
  6. Select the driver. Ubuntu will try to detect the printer model. If it finds a match, select it. If not, click “Find” or “Provide PPD file” to browse for a driver file you downloaded.
  7. Name and add. Give the printer a descriptive name (e.g., “Office HP LaserJet”). Click “Add”.
  8. Test print. After adding, click the printer in the list, then click “Print Test Page” to confirm it works.

Common Mistakes

  • Wrong IP address: Double-check the IP. A single digit error will fail to connect.
  • Using the wrong port: Most network printers use 9100 for raw printing. Some use 631 (IPP) or 515 (LPR). If 9100 fails, try 631.
  • Choosing the wrong driver: A generic driver may not use all features. Use the manufacturer’s PPD for full functionality.
  • Printer not powered on or connected: Ensure the printer is on and connected to the same network as your computer.
  • Firewall blocking: Your Ubuntu firewall may block the connection. Temporarily disable it to test, or allow port 9100.

Tips

  • Set a static IP on your printer (via its own settings) so the address doesn’t change.
  • If you have a USB connection, you can still add it by IP if the printer supports network printing.
  • Use the “Find” button in the driver selection to search online for a suitable driver.
  • For HP printers, install the hplip package via terminal: sudo apt install hplip – it includes many drivers.
  • If you have multiple computers, consider using a print server (like CUPS) to share the printer.

Troubleshooting

Printer not found after entering IP: Check that the IP is correct and the printer is reachable. Use the terminal: ping 192.168.1.50 (replace with your IP). If ping fails, the printer is off or on a different network.

“Unable to locate printer driver”: Download the correct PPD from the manufacturer’s website. Look for Linux drivers or a generic PostScript PPD. Alternatively, try a similar model from the list.

Print jobs stuck in queue: Open the print queue (click the printer in Settings, then “Print Queue”). Cancel all jobs, then try again. Check the printer’s display for errors like “offline”.

Connection refused: Try a different port (631 for IPP, 515 for LPR). Some printers require enabling network printing in their own settings.

Firewall issues: If you use a firewall like UFW, allow the printer port: sudo ufw allow 9100/tcp. Test again.

Printer works but only prints blank pages: This is often a driver issue. Try a different driver, or check if the printer needs a specific PPD for your model.

Frequently Asked Questions

Q: Can I add a printer by IP without a driver?
A: Yes, but you may lose features. Ubuntu has generic drivers (like “Generic PostScript”) that can sometimes work, but it’s best to use a specific driver.

Q: What is the default port for IP printing?
A: The default is 9100 (raw). Some printers also support 631 (IPP) and 515 (LPR). Try 9100 first, then 631.

Q: How do I find my printer’s IP address?
A: Print a network configuration page from the printer’s menu, or check the printer’s display under “Network” or “Wi-Fi”. You can also log into your router’s admin page and look at connected devices.

Q: Why does my printer show as “idle” but won’t print?
A: Check the print queue for errors. The printer might be offline or have a paper jam. Also verify the IP hasn’t changed – if it has, update the printer settings in Ubuntu.

Q: Can I add a printer by hostname instead of IP?
A: Yes, in the “Address” field you can type the hostname (e.g., printer.local) if your network supports mDNS (Bonjour). This is more reliable if the IP changes.

Q: Do I need to install CUPS separately?
A: No, CUPS is preinstalled on Ubuntu. The Settings app uses it in the background.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →