touch <filename>.<extension>
sudo nano <filename.extension>
Example:
cd /
cd /var/www/html
sudo nano Form.php
touch file1.txt #Create file1.txt
/* only create file */
touch myFile.html
/* create and open to edit */
nano myFile.html
vim myFile.html
#solution 1
touch filename
#solution 2
> filename # or >> filename
#solution 3
cat > filename
//will create test.txt
sudo touch test.txt
// To create a new file run the cat command followed by the redirection operator > and the name of the file you want to create.
// Press Enter type the text and once you are done press the CRTL+D to save the files.
cat > file1.txt