There are many ways to create text files on Linux. One of the simpler examples is using echo and the operator to write to a file:
echo "Sample text here." > sample.txt
The magic part is the redirect operator,
> which will add (redirect) the text displayed by
echo to a file in the same directory named
There are also editors available on the command line,
nano are two popular ones:
You’d add your text then hit
ctrl+x to save and exit. More handy shortcuts at the bottom of the
Finally, you can edit text files locally on your computer then upload them using programs like
rsync - anything that utilizes your Linux user and SSH authentication.
rsync -a sample.txt user@dropletip:/home/username
Hope this helps - if you need additional help please tell us a little more about what you are trying to do so we can give more specific advice!