Kali Linux Printer Setup: Difference between revisions
From WikiMLT
mNo edit summary |
|||
Line 1: | Line 1: | ||
<noinclude><!--[[Category:Linux_Desktop|?]]-->{{ContentArticleHeader/Linux_Desktop}}</noinclude> | <noinclude><!--[[Category:Linux_Desktop|?]]-->{{ContentArticleHeader/Linux_Desktop}}</noinclude> | ||
In my case I was in need to setup my [https://support.hp.com/us-en/document/c00310427 HP 1022 printer] to work with Kali Linux. After the following setup it works great. | In my case I was in need to setup my [https://support.hp.com/us-en/document/c00310427 HP 1022 printer] to work with Kali Linux. After the following setup it works great. In this guide are used the tools <code>cups</code>, <code>cups-client</code> and <code>foomatic-db</code>, which are not installed and enabled by default in Kali Linux. | ||
== Install the required Packages and Deal with the Permissions == | |||
Install the requited packages<syntaxhighlight lang="shell" line="1"> | |||
sudo apt update | |||
sudo apt install cups cups-client "foomatic-db" | |||
</syntaxhighlight>The users will be added to the <code>lpadmin</code> group automatically after installing the above packages, but we will do that manually just in case.<syntaxhighlight lang="shell" line="1"> | |||
sudo adduser root lpadmin | |||
sudo adduser $USER lpadmin | |||
</syntaxhighlight>Enable and start Cups service.<syntaxhighlight lang="shell" line="1"> | |||
sudo systemctl enable --now cups.socket | |||
sudo systemctl enable --now cups.service | |||
</syntaxhighlight>Restart Cups and Samba services.<syntaxhighlight lang="shell" line="1"> | |||
sudo systemctl restart cups.service | |||
sudo systemctl restart smbd.service | |||
</syntaxhighlight> | |||
== Find USB Printer == | |||
<syntaxhighlight lang="shell" line="1"> | |||
lsusb | grep 'HP' | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="shell-session" class="mlw-continue"> | |||
Bus 001 Device 003: ID 03f0:2c17 HP, Inc LaserJet 1022 | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="shell" line="1"> | |||
sudo netstat -pnat | grep 631 | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="shell-session"> | |||
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1217/cupsd | |||
tcp6 0 0 ::1:631 :::* LISTEN 1217/cupsd | |||
</syntaxhighlight> | |||
== References == | == References == |
Revision as of 11:58, 19 August 2022
In my case I was in need to setup my HP 1022 printer to work with Kali Linux. After the following setup it works great. In this guide are used the tools cups
, cups-client
and foomatic-db
, which are not installed and enabled by default in Kali Linux.
Install the required Packages and Deal with the Permissions
Install the requited packages
sudo apt update
sudo apt install cups cups-client "foomatic-db"
The users will be added to the lpadmin
group automatically after installing the above packages, but we will do that manually just in case.
sudo adduser root lpadmin
sudo adduser $USER lpadmin
Enable and start Cups service.
sudo systemctl enable --now cups.socket
sudo systemctl enable --now cups.service
Restart Cups and Samba services.
sudo systemctl restart cups.service
sudo systemctl restart smbd.service
Find USB Printer
lsusb | grep 'HP'
Bus 001 Device 003: ID 03f0:2c17 HP, Inc LaserJet 1022
sudo netstat -pnat | grep 631
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1217/cupsd
tcp6 0 0 ::1:631 :::* LISTEN 1217/cupsd
References
- BlackMoreOps.com: How to install and configure printers on Linux (cups and foomatic-db)?
- Local copy of the above resource: How to install and configure printers on Linux (cups and foomatic-db).pdf