How to Create File and Directory In Linux

How to create a file in a directory in linux terminal is the todays tutorial. in this example i will show you how to create a file in linux. How to create a directory and how to create a file in this directory.

Creating New Files

You can create file by invoking an editor on a new filename. Before you try this, there is an easier way to make a new empty file by using the touch command. Such as

 

command
mahedi@debian:~$ touch your_file_name

 

This command will make a new file named your_file_name that is empty file.

Creating New Directories

You can create directory by invoking an editor on a new directory name. Before you try this, there is an easier way to make a new empty directory by using the mkdir command. Such as

 

command
mahedi@debian:~$ mkdir your_directory_name

 

This command will make a new directory named your_directory_name that is empty directory.

 

Hope it can help you.

 

Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js