Creating a file in a specific directory in the Linux terminal is simple. To this, use the Touch
command in the directory of your choice.
Command: touch "filename"
Below is an example of this on CentOS minimal:
The “touch” command is universal across all Linux systems and will work with popular distros such as Ubuntu, Debian, etc.