which command is used to save and exit from vi editor code example Example: vi save and exit //Save :w //Exit :q