Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 3
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
5. Tuning the user environment
  


Exporting to change command behavior page 12 of 13


Often, the behavior of commands can be altered by setting environment variables. Just as with new bash sessions, other programs that are started from your bash prompt will only be able to see variables that are marked for export. For example, the command man checks the variable PAGER to see what program to use to step through the text one page at a time.


$ PAGER=less
$ export PAGER
$ man man

With PAGER set to less, you will see one page at a time, and pressing the space bar moves on to the next page. If you change PAGER to cat, the text will be displayed all at once, without stopping.


$ PAGER=cat
$ man man

Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact