Tag Info

Hot answers tagged

2

cd isn't making any changes to its parent process, because cd isn't a process. It is a shell builtin - a construct that most (every?) shell has to change its directory context. cd on bash will change your cwd on bash. cdon zsh will do the same on zsh. It is bash/zsh that are doing that. And they are changing their own context. This being said, I don't ...


1

I think you're looking for "set". Type "set >> file.txt" into a command window and regard the file it produces.


1

One thing you need to be careful of with setting variables in batch is not to use spaces unnecessarily. (I don't see this in your question, but wanted to call it out since I caught myself doing it while troubleshooting your issue.) For example: set x=123 is not the same as set x = 123 The former will set %x% to 123, while the latter will set %x % to ...


1

It really depends on how your environment variables were set. If, for example, you used the "SET" command in the command line, it only effects the current instance. On the other hand, commands such as "SETX" will permanently adjust the value of the environment variable. SETX will ensure that all future instances of cmd will see the update. It will not ...


1

If you add the '-' switch it will load myuser's profile. In other words you can have profile environment variables loaded while headless. su - myuser -c "cmd_to_execute"


1

you've sent this to the sudo mailing list also, didn't you? Environment variables Well, in sudoers you can configure which environment variables it should keep. Take a loop at Defaults env_reset and env_keep. These can also be set per user or group. Just add REMOTEHOST and DISPLAY and hey, presto. Prompt Why are you using functions in your prompt? ++ It ...



Only top voted, non community-wiki answers of a minimum length are eligible