Linux Create File

To create a file in Linux file system, you can use mkdir command with the Terminal, or > with file name next to it. And there are many ways in which you can create a file in Linux via Terminal.

In this tutorial, we shall learn how to create a file in two processes. In the first process, we shall use touch command. And in the second process, we shall use >.

Linux – Create File using touch command

Following is a step by step process to create a file in Linux using touch command.

Step 1: Open a Terminal. You may use the keyboard and type Ctrl+Alt+T, or open Applications, and search for Terminal.

And navigate to the directory in which you would like to create the file. In this example, we shall create a file named mynotes.txt in workspace directory.