How Do I Add a File in Linux Terminal?
Contents

How do I add a file in Linux?

You need to use the >> to append text to end of file. It is also useful to redirect and append/add line to end of file on Linux or Unix-like system.

How do you create a new file in Terminal?

Create Files with Touch

Creating a file with Terminal is super easy. All you have to do is type “touch” followed by the name of the file that you wish to create. This will create an “index. html” file in your currently active directory.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest