how to make a txt file command line code example Example: make text file command line cat > sample.txt # Write some text, press Ctrl+D when you are done