Category: Linux Terminal

Added: 16th of August 2020

Viewed: 144 times

Create a new folder and file using the mkdir and touch commands using the terminal in Linux

The first question you might is ask is why you would want to create a new directory and file using the terminal when you can already do this through your file manager on Linux. If you are logged in to a remote Linux machine and don't have access to a remote desktop you can then create this using the terminal.

To create a new directory in Linux using the terminal we can use the mkdir command

mkdir sample_directory


After this we need to CD in to that sample_directory we created
cd sample_directory


To create a new file in Linux using the terminal we can use the touch command
touch sample_file.txt


To list the file in the directory we can use the dir or ls commands
ls

Other Tips & Tutorials

Linux Terminal

Create a new folder and file using the mkdir and touch commands using the terminal in Linux

Posted: 16th of August 2020

Views: 144

Linux Terminal

Convert a PDF document to text or html using pdftotext, pdftohtml in Linux using the terminal

Posted: 3rd of August 2020

Views: 175

Linux Terminal

List files in a directory using the ls command

Posted: 22nd of July 2020

Views: 174

Linux Terminal

How to access HP Linux Imaging and Printing System set up on Ubuntu using the terminal

Posted: 13th of November 2019

Views: 499

Linux Terminal

Where are the log files located in Linux

Posted: 16th of October 2019

Views: 566

Linux Terminal

Oracle VirtualBox, Unable to insert virtual optical disk

Posted: 11th of October 2019

Views: 1920

Linux Terminal

Oracle VirtualBox only displaying 32-bit version(s), when setting up new Virtual Machine on Linux

Posted: 11th of October 2019

Views: 660

Linux Terminal

The Linux uptime command

Posted: 3rd of October 2019

Views: 701

Linux Terminal

Using GParted in Linux to format a hard drive, flash drive, SD Card

Posted: 17th of September 2019

Views: 1032

Linux Terminal

Copy .iso image to USB flash drive using dd command in Linux using the terminal

Posted: 3rd of September 2019

Views: 288