create file with text linux code example Example 1: cat create file cat >"filename" Example 2: touch create file with content touch ~/Desktop/something.txt