Changer l’éditeur pour nano

Linux

On Linux (Ubuntu, for example), typically the default command-line EDITOR is Vim. If so, no further action is needed to use the kubectl edit command. If you want to use a different editor, create an environment variable named KUBE_EDITOR with the value set to the path of your preferred text editor.

JAVA_HOME

1.1 Edit /etc/environment file with a text editor like vim or nano, need root or sudo.

Add JAVA_HOME at the next line, and points to a specified JDK folder directly.

PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games” JAVA_HOME=/usr/lib/jvm/adoptopenjdk-11-hotspot-amd64

source /etc/environment

echo $JAVA_HOME

Note
The new changes will disappear if we close the current session or reopen a new terminal because a new shell does not trigger the /etc/environment. Try to restart the Ubuntu or login again; the new changes in /etc/environment will apply automatically.

whereis nano
nano: /usr/bin/nano /usr/share/nano /usr/share/man/man1/nano.1.gz

sudo nano /etc/environment
KUBE_EDITOR="/usr/bin/nano"

Leave a Comment