Back to Previous Page
spacer

Set default printer in your shell

First, know what shell you are running. See Change login shell from csh to bash or tcsh.

  • If you are in bash, add following line in your ~/.bashrc file (create this file if you don't have it)
    PRINTER=physics_hp8100; export PRINTER 
    
    This will set your default printer to physics_hp8100. (See Print on the Physics Department printers.)
  • If you are in csh or tcsh, add following line in your ~/.cshrc file (create this file if you don't have it)
    setenv PRINTER physics_hp8100
    
    This will set your default printer to physics_hp8100. (See Print on the Physics Department printers.)

After setting your default printer, you can use lpq, lpr and lprm without the printer options. (See Print on the Physics Department printers.)

Relogin your account, and run a small test print such as

ls |lpr
to see if it works.