how to change the printer que through command line
To the best of my knowledge there is no way. You need to remove the queue and re-add it.
If you're using the lp spooler:
/usr/sbin/lpadmin -xQUEUENAME
/usr/sbin/lpadmin -pNEWQUEUENAME (any other options as needed)
or if you're using hppi
/opt/hpnpl/bin/removequeue -f -q QUEUENAME
/opt/hpnpl/bin/addqueue -h IPADDRESS -q NEWQUEUENAME (any other options as needed)