Below I have some useful commands to view/modify the shell in Mac or Linux. View all available shells View the current shell Change the current shell to zsh We should restart the terminal after executing the above command for the new shell to take effect. In the chsh -s we can pass any one of…
MAC
Follow the below steps to delete all the lines in a file (emptying file) using VI / VIM editor. Open the file vi <file-name> Press gg, this will move the cursor to the first line of the file. Now press dG, this deletes all the lines. Finally, type :wq to save the changes and exit from the…