Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

change default editor linux

### METHOD 1 - Via Command line ###
# If you have never set it before
echo "export EDITOR='new_program'" >> ~/.bashrc
echo "export VISUAL='new_program'" >> ~/.bashrc
source ~/.bashrc

### METHOD 2 - Via Command line ###
# If you are changing an existing setting
sed -i 's/export EDITOR='old_program'/export EDITOR='new_program'/' ~/.bashrc
sed -i 's/export VISUAL='old_program'/export VISUAL='new_program'/' ~/.bashrc
source ~/.bashrc

### METHOD 3 - Via Text Editor ###
# You can also change the setting by opening ~/.bashrc in
# your favourite text editor then add/update the lines
export EDITOR='new_program'
export VISUAL='new_program'
# Exit & Save File then run below command
source ~/.bashrc
Comment

linux change default editor

# Short answer:
# In Ubuntu, run select-editor which will create a ~/.selected_editor file
# with your preferred editor
select-editor
Comment

PREVIOUS NEXT
Code Example
Shell :: git commit disable hooks 
Shell :: intellij ultimate install ubuntu 
Shell :: ubuntu desktop file folder 
Shell :: nohup & 2 &1 
Shell :: find command also return directory names? 
Shell :: git log with numbers 
Shell :: git change origin url 
Shell :: osx copy output to clipboard terminal 
Shell :: how to uninstall apps without admin password 
Shell :: kubectl exec 
Shell :: update linux zsh history editor 
Shell :: gcloud change project 
Shell :: uninstall snap package ubuntu 
Shell :: suspend command for linux 
Shell :: ssh tunel map 
Shell :: increase upload size apache 
Shell :: bash substring after character 
Shell :: npm_config_node_gyp 
Shell :: youtube dl download playlist by index 
Shell :: get only figures of string bash 
Shell :: install bunjs 
Shell :: shell find string in directory 
Shell :: linux check ip address command 
Shell :: bash loop 
Shell :: ssh timeout option 
Shell :: lsb release command centos 
Shell :: install virtualbox ubuntu 20 wsl command line 
Shell :: View the List of Installed Programs cmd 
Shell :: install vnc on ubuntu 
Shell :: install gnome software 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =