Appending text to a file in linux $ echo NEW_USER=santosh >> .bashrc Overriding all text inside a file This command will override everything from .bashrc with newtextblahblah $ echo newtextblahblah > .bashrc