Two questions about bash commands / Linux -


i need answers questions:

  1. how , can change default app in user profile in linux?
  2. how can save changes in vi editor without exiting? guess it's w q q! i'm not sure.

how , can change default app in user profile in linux?

i guess refer editor. if so, use following:

export editor=vi #or whatever other editor 

to make permanent, add line .bashrc file in home of user, in ~/.bashrc.


how can save changes in vi editor without exiting? guess it's w q q! i'm not sure.

use :w save. have in command mode (go there pushing esc).


Comments