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

Cups printing issue

CUPS: Adding printer fails with “Unable to get list of printer drivers: Success” When installing a new printer using the CUPS web inter...