ubuntu commands to write a string to a file with a new line code example Example: echo new line to file Click to copyecho $'username=user\npassword=pass' > ~/samba-credentials