Search And Replace Text in VI editor Posted on April 13, 2011 by dpejic ok, on the example text file above, lets say i want to change all the 'wallpaper' to 'screensaver' well this is how you would do it.. lets assume that wallpaperama.txt is located on my home directory at: /home/me/wallpaperama.txt step 1. open the file with the vi editor: vi /home/me/wallpaperama.txt step 2. Enter – SHIFT + : (the Shift key and the colon key at the same time) on your keyboard, the screen will look like this: step 3. now enter this command and hit enter :%s/wallpaper/screensaver/g step 4. now you will see that all the text 'wallpaper' was changed to 'screensaver' step 5. save the change with this command: :qw DONE i hope this helps you