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

shell 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 tag last 
Shell :: pg_hba.conf location ubuntu 18.04 
Shell :: install pip 
Shell :: git undo last commit 
Shell :: how to delete installed library from react native project 
Shell :: snap install chrome 
Shell :: connect emulator to localhost 
Shell :: how to install quick.db 
Shell :: bash only print duplicated lines 
Shell :: bash concatenate gzipped files 
Shell :: gitignore for django project 
Shell :: git edit last commit message 
Shell :: see ssh key 
Shell :: delete remote git branch 
Shell :: what shell type 
Shell :: install vnc on ubuntu 
Shell :: check git connfig 
Shell :: install crate rust 
Shell :: bash command to open terminal 
Shell :: create group ubuntu 
Shell :: intellij goto line 
Shell :: ssh-keygen and ssh-copy-id 
Shell :: git command to switch from my current branch to another in android studio 
Shell :: git initial commit steps 
Shell :: python win32gui 
Shell :: how to install zlib 
Shell :: linux kustomize install 
Shell :: sqlmap post injection 
Shell :: how to assign a letter to a drive 
Shell :: kill all mongodb processes 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =