How to install and configure printers on Kali Linux
Supported Hardware’s
- Local Printers:
- HP Printer (HPLIP) — — All HP series
- Canon MP270 series (Canon MP270 series) — All Canon series
- HP Fax (HPLIP)
Network Printers:
- Internet Printing Protocol (http)
- Internet Printing Protocol (ipps)
- Internet Printing Protocol (ipp)
- AppSocket/HP JetDirect
- Internet Printing Protocol (https)
- LPD/LPR Host or Printer
- Windows Printer via SAMBA
Install required packages
Install cups, cups-client
apt-get install cups cups-client "foomatic-db"
Add user to lpadmin group
We add the “root” user (or name of your root user) to the lpadmin group which has printing rights.
/usr/sbin/adduser root lpadmin
Result:
Adding user `root' to group `lpadmin' ...
Adding user root to group lpadmin
Done.
To check if root user is added to lpadmin group, this lists all groups root is part of:
groups root
Restart cups/Restart kali
sudo service cups restart
or
reboot
If you get service command not found error, its probably because it is not added to the PATH variable, use this to do so:
PATH=/usr/sbin:$PATH
Enable cups
sudo systemctl enable cups
This is what you should see:
Synchronizing state of cups.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable cups
Then run the following command to start cups service:
sudo systemctl start cups
Configuring Printer
- Open browser and type:
http://127.0.0.1:631/ - Navigate to- CUPS for Administrators — Adding Printers and Classes — Add printer.
- Type your username(system account) and password(system password)
- Choose your printer
You can check if the printer is configured by navigating to the Printers tab:
You can also check printers in systems settings:
Add cups for printer to startup programs:
- Go to System Tools>Preferences>Start-up Programs
- Click on Add
- Type:
Name: Cups & printers
sudo /etc/init.d/cups start
or
sudo service cups start
comment: CUPS-standards-based, open source printing system