← All commands
Topic hub PowerShell Equivalents
Windows Linux PowerShell Equivalents Expanded guide 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
Debian/Ubuntu same command
touch filename.txt
Fedora same command
touch filename.txt
Arch same command
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.

Migration tip: <code>touch</code> creates an empty file when it does not exist. When it already exists, touch updates its access and modification times.

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.

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 optionUse
touch notes.txtCreate an empty file
touch file1.txt file2.txtCreate multiple files
touch -d "2026-01-01 12:00" notes.txtSet 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.

DistributionPackage manager / baseEquivalent commandDifference 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

Related PowerShell Equivalents commands