Windows PowerShell New-Item -ItemType File equivalent in Linux
Creates a new empty file or updates an existing file timestamp.
PowerShell New-Item -ItemType File
touch filename.txt
touch filename.txt
touch filename.txt
Overview
What this command does
On Windows, "PowerShell New-Item -ItemType File" is used to create an empty file. On Linux, the closest practical mapping shown here is "touch filename.txt". Creates a new empty file or updates an existing file timestamp. This reference is grouped under PowerShell Equivalents → File System.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows PowerShell New-Item -ItemType File maps to touch filename.txt for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read PowerShell vs Bash.
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
Debian/Ubuntu, Fedora and Arch all use "touch filename.txt" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| 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