Feb 142011

Took me some time to find this out digging the Net, hence creating a note here.

Example with a Ricoh printer (but Ubuntu includes tons of drivers), network connected and listening on IP

lpadmin -E -p<my printer name> -v socket://<my printer address> -P
-u allow:all
Then let’s make it default with command:
lpadmin -d <my printer name>
Enable it in CUPS with command:
cupsenable <my printer name>
And make it accepting print jobs with command:
accept <my printer name>
Once you’re done, you can test by echoing some text like:
echo "I am a Genius" | lpr -d
or printing files like:
lpr -d mytextfile.txt
Here a lot of additional cool settings.