To edit the username in the linux console, add executables to the environment variable, we can go to the .bashrc
file which is in the /home/username directory and add the following in the shell
-
>>
must always be double to perform an append, because with only one>>
we would overwrite the whole file.
echo '#Java, Maven' >> ~/.bashrc
echo 'export JAVA_HOME=/ruta' >> ~/.bashrc
echo 'export MAVEN_HOME=/ruta/' >> ~/.bashrc
echo 'export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin' >> ~/.bashrc
echo '#Mongo' >> ~/.bashrc
echo 'export MONGO_HOME=/ruta/bin' >> ~/.bashrc
echo 'export PATH=$PATH:$MONGO_HOME' >> ~/.bashrc
echo '#IntelliJ IDEA' >> ~/.bashrc
echo 'export IDEA_HOME=/ruta/bin/' >> ~/.bashrc
echo 'export PATH=$PATH:$IDEA_HOME' >> ~/.bashrc
This way we will have the executables available in the console for easy access to these applications.
To customize our name in the console
echo "#console name red" >> ~/.bashrc
echo "export PS1='\[\e[31m\]rubn β²Ζ βΈ \[\e[m\]'" >> ~/.bashrc (1)
1 | Here my name is this "rubn β²Ζ βΈ " and with red color.'\[\e[31m\]rubn β²Ζ βΈ \[\e[m\]' |
Then when finished we apply the changes to the file without restarting
source ~/.bashrc