[Linux] clean shell environment Linux
I faced an error when building yocto after source SDK yocto :
$ source setup-environment build-imx8qxpc0/
Error: The OE SDK/ADT was detected as already being present in this shell environment. Please use a clean shell when sourcing this environment script.
Sometimes you have some error with the current shell environment but you don’t want to exit and open a new shell.
To renew the shell environment in linux you should follow two steps below:
- Check which shell are you using by command:
~$ echo $0 | sed -r 's/-//' bash ==> you are using 'bash' shell
or
~$ echo $0 | sed -r 's/-//' sh ==> you are using 'sh' shell
- Reset current shell (check from step 1) environment by command:
~$ env -i bash
or
~$ env -i sh
Or one command:
~$ env -i `echo $0 | sed -r 's/-//'`
I hope it helps you 🙂
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but https://codehillacademy.com