Search This Blog

Thursday, 29 March 2018

Rename printer from command line in ubuntu.

Rename printer name from backend without GUI.

1. rename the printer name into /etc/cups/printers.conf
for E.g.


Stop cups service first
service cups stop  > /dev/null 2>&1

Replace the old name with new printer name
sed -i 's/'$OldName'/'$NewName'/g' /etc/cups/printers.conf

Restart cups service
service cups restart  > /dev/null 2>&1

2. Also need to rename the ppd of the old printer which is located at /etc/cups/ppd

rename the old printer ppd name 

mv /etc/cups/ppd/"$OldName".ppd  /etc/cups/ppd/"$NewName".ppd

Restart cups service

service cups restart

No comments:

Post a Comment

Switch between multiple PHP version in Ubuntu

If you have two php versions (e.g. PHP7.2 and PHP 5.6 ) installed in your ubuntu system. Switch from PHP 5.6 to PHP 7.2 =====> Apac...