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
  


Export and set -x page 9 of 13


Because of this behavior, variables can be set in ~/.bash_profile or /etc/profile and marked for export, and then never need to be set again. There are some options that cannot be exported, however, and so they must be put in put in your ~/.bashrc and your profile in order to be set consistently. These options are adjusted with the set built-in:


$ set -x

The -x option causes bash to print out each command it is about to run:


$ echo $FOO
+ echo foo
foo

This can be very useful for understanding unexpected quoting behavior or similar strangeness. To turn off the -x option, do set +x. See the bash man page for all of the options to the set built-in.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact