In ubuntu linux, the path environment variable of the fish shell is slightly different from that of the default bourne shell (bash) environment variable. We know that export is used for the default bash environment variable settings. for example, if we want to add the directory/usr/matlab/bin and/home/aborn/scripts to environment variable 1) for bash modification ~ /. Add the following lines to the bashrc file: [plain] export PATH = "$ PATH:/usr/matlab/bin: /home/aborn/scripts "Finally, use the following command on the command line to make the preparation file take effect: [plain] source ~ /. Bashrc 2) for the fish shell, use the set-x command to modify the file (~ /. Config/fish/config. fish): [plain] sudo vi ~ /. Config/fish/config. add fish to the last line: note that the two directories are separated by spaces [html] set-x PATH/usr/matlab/bin/home/aborn/scripts. Then, you can re-enable the fish.