Windows
Linux
PowerShell Equivalents
File System
Windows PowerShell New-Item -ItemType File equivalent in Linux
Creates a new empty file or updates an existing file timestamp.
Windows
→
PowerShell New-Item -ItemType File
Linux equivalents
touch filename.txt
touch filename.txt
touch filename.txt
Overview
What this command does
Creates a new empty file or updates an existing file timestamp.
Migration tip:
touch creates an empty file when it does not exist. When it already exists, touch updates its access and modification times.Practical tasks
Common use cases
Create an empty file
Creates a new empty file or updates an existing file timestamp.
touch notes.txt
Create an empty file
touch file1.txt file2.txt
Create multiple files
touch -d "2026-01-01 12:00" notes.txt
Set a specific timestamp
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
touch notes.txt
touch file1.txt file2.txt
touch -d "2026-01-01 12:00" notes.txt
Walkthrough
Examples with explanations
touch notes.txt # create one empty file
touch file1.txt file2.txt # create multiple files
touch -d "2026-01-01 12:00" notes.txt # set a chosen timestamp
Reference
Common options and variations
| Command or option | Use |
|---|---|
touch notes.txt | Create an empty file |
touch file1.txt file2.txt | Create multiple files |
touch -d "2026-01-01 12:00" notes.txt | Set a specific timestamp |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | touch filename.txt |
Same command on this distribution. |
| Fedora | same command | touch filename.txt |
Same command on this distribution. |
| Arch | same command | touch filename.txt |
Same command on this distribution. |
Keep learning