I wrote a simple script to switch my locale.If I write each line in the console and execute it, it works without any problem or if I put it in .bashrc.However when I execute the script either with sudo or without it has absolutely no noticeable effect. ( locale remains the same )The question is why is that?Is my script wrong or am I missing something different.Source:#!/bin/bashset -xLANG=en_US.utf8LANGUAGE=en_US.utf8LC_ALL=en_US.utf8export LANGexport LANGUAGEexport LC_ALLecho Language set!I'm receiving the execution steps and the Language set echo but that's about it.I also tried #!/bin/sh.OS Info:DISTRIB_ID=UbuntuDISTRIB_RELEASE=14.04DISTRIB_CODENAME=trustyDISTRIB_DESCRIPTION=Ubuntu 14.04.3 LTSKernel:    3.13.0-042stab103.6
Shell Script to change locale has no effect
bash;shell script;ubuntu
To apply the changes to your current shell you need to source it and not to execute your script.  So, if your script is called script.sh then instead of executing it as ./script.sh, source it with . ./script.sh and your changes will be applied to the current session.