#write to file and delete previous text cat > file #write to file and connect to the end of the text cat >> file
sudo apt-get update sudo apt install nano nano <filename>