How to Add Printer in Linux !!
There are many ways to configure printer in Linux system , in this blog we are sharing most common method through which a printer can be installed . . . .
we can add a printer by entering a printer capability definition in the system printer capability database, printcap. This file is found under the /etc directory, and is a text file that can be changed only by the root operator.
The format, commands, and syntax to use when creating a printer entry in the /etc/printcap file are found in the printcap manual page. There are more than 40 different commands, but you can quickly create a printer with only the mx (maximum size of spooled files) and sd (spool directory) commands.
Configuring a simple printer
1. To create a printer called mylp for the /dev/lp1 device, open the /etc/printcap file with your preferred text editor. The sd option tells the Linux printing daemon, lpd, where to temporarily place printed (spooled) files. The mx command, used with a value of 0, places no limit on the size of spooled files. Type an entry such as this:
mylp:\
:sd=/var/spool/lpd/mylp:\
:mx#0:\
:lp=/dev/lp1:
2. Save the entry, and then create the printer's spool directory by using the mkdir command:
# mkdir /var/spool/lpd/mylp
3. Make sure the directory lp has the correct group ownership and permissions by using the chgrp and chmod commands, as follows:
# chgrp lp /var/spool/lpd/mylp
# chmod 755 /var/spool/lpd/mylp
4. Test the printer entry with the lpr (line printer command) using the -P option to specify your newly created printer:
# lpr -Pmylp test.txt
5. Your printer should activate and print the test document.
- vinod's blog
- Add new comment
- 7728 reads




















Recent comments
3 years 38 weeks ago
3 years 39 weeks ago
3 years 39 weeks ago
3 years 51 weeks ago
3 years 51 weeks ago
4 years 1 day ago
4 years 4 weeks ago