Skip to content

Instantly share code, notes, and snippets.

@giordanocardillo
Last active April 25, 2024 15:16
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giordanocardillo/e937cfa95395016d4ade1489d71125d9 to your computer and use it in GitHub Desktop.
Save giordanocardillo/e937cfa95395016d4ade1489d71125d9 to your computer and use it in GitHub Desktop.
Setting nano as default editor

How to

Automatically

cat <<EOF >>~/.bash_profile
export VISUAL="nano"
export EDITOR="nano"
EOF

Done! Exit then login again or run

source ~/.bash_profile

Manually

  1. Go to current user home directory ~

  2. Create file .bash_profile or open it, if it's already there

  3. Add lines

    export VISUAL="nano"
    export EDITOR="nano"
  4. Done! Exit then login again or run

    source ~/.bash_profile
@mjamesd
Copy link

mjamesd commented May 16, 2023

Instead of exiting and logging in again, you can run source ~/.bashrc.

@giordanocardillo
Copy link
Author

Instead of exiting and logging in again, you can run source ~/.bashrc.

Updated it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment