Skip to main content

Linux Print Server Setup

CUPS

For quite a period of time, I have no idea how to setup a print server, or add a print server, so that I can print something from my Linux machine. At that time, the only way to print was to re-boot our Linux system into Windows, and send print from there. Together with a friend of mine, we managed to figure out how to make it work.

First of all, I will list some of basic commands, that one should know prior to setup a print server.

  • Print 2 sides: lpr -o sides=two-sided-long-edige filename [ENTER]
  • Check print status: lpstat -o -p [ENTER]
  • Cancel a job: cancel/lprm job_id [ENTER]
  • Set default options for CUPS: lpoptions -o media=A4 -o sides=two-sided-long-edge [ENTER]
  • Add printer: lpadmin -p printer_Name -E -v socket://printerIPAddress -m laserjet.ppd [ENTER]
  • Remove printer: lpadmin -x printer_Name [ENTER]
  • Don't use other CUPS server:
    1. from /etc/cups/cupsd.conf {select Browsing Off}
  • Restarting CUPS server: /etc/init.d/cups restart [ENTER]

Other commands include:

  • Add a Samba user and password: smbpasswd user password
  • In smb.conf, select
    1. printing=cups
      printcap name=cups
  • Restarting samba: smbd restart

These are the few commands that are required to setup a simple print server. Some Linux distros have come with complete solution to allow users to set up the printer. If that's possible, then it will be preferred way than going around these commands.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options