Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the difference between “set” and “setenv” ?

difference setenv
0
Posted

What is the difference between “set” and “setenv” ?

0

The command “set” sets shell variables, whereas the command “setenv” sets environment variables. A typical tcsh “set” command is ‘set history=25’. This would save the last 25 commands on the history list. Another similar command could be ‘set history=25 savehist=20’ which does the same as the previous command as well as saving the last 20 commands between logins. A typical tcsh “setenv” command is ‘setenv TERM=xterm’. This would set the environment variable TERM to xterm, thus telling the shell how to handle the terminal. Thus “set” sets variables specific to the shell, whereas “setenv” sets environment (global) variables usable by any programs.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123