How to Create a File on Any Device or Operating System

Creating a file sounds simple — and often it is. But the how varies significantly depending on your operating system, the type of file you need, and the application you're using. Whether you're on Windows, macOS, Linux, Android, or iOS, the process has its own quirks worth understanding.

What Actually Happens When You Create a File

When you create a file, your operating system allocates space in the file system and registers a new entry in the directory. This entry stores the file's name, extension, creation timestamp, and a pointer to where the data lives on your storage device.

Even an empty file takes up a small amount of space — not for content, but for the metadata the OS needs to track it. The file extension (like .txt, .docx, or .png) tells both the OS and applications what kind of data to expect inside.

Creating Files on Windows

Windows gives you several ways to create a file depending on your workflow:

Using File Explorer:

  1. Open File Explorer and navigate to the folder where you want the file.
  2. Right-click on empty space in the folder.
  3. Hover over New, then select a file type from the list (Text Document, Microsoft Word Document, etc.).
  4. Type a name and press Enter.

Using an Application: Most apps let you create a new file via File → New or the keyboard shortcut Ctrl + N. You then save it with Ctrl + S, choosing a location and file name.

Using the Command Prompt: You can create an empty file quickly with:

echo. > filename.txt 

Or use type nul > filename.txt for a completely empty file with no hidden characters.

Creating Files on macOS

Using Finder: Finder doesn't offer a right-click "New File" option by default — this is a common point of confusion for Windows switchers. Instead, you typically create files from within an application.

Using an Application: Open any app (TextEdit, Pages, Numbers), use File → New, and then File → Save to choose where the file lands.

Using Terminal: macOS Terminal is powerful for file creation:

touch filename.txt 

The touch command creates an empty file instantly. If the file already exists, it simply updates the timestamp without changing the content.

Using Automator or Third-Party Tools: Apps like Finder extensions (such as "New File Menu" from the Mac App Store) restore the right-click file creation behavior many users expect.

Creating Files on Linux 🐧

Linux users have more flexibility than most:

  • touch filename.txt — creates an empty file
  • nano filename.txt or vim filename.txt — opens a terminal text editor and creates the file on save
  • echo "content" > filename.txt — creates a file and writes content in one step
  • cat > filename.txt — creates a file and lets you type content, ending with Ctrl+D

Most desktop Linux environments (GNOME, KDE) also support right-click file creation through the file manager, though the exact menu options vary by distribution.

Creating Files on Mobile Devices

Android

Android's approach depends heavily on which app you're using:

  • Google Docs, Sheets, Drive: Tap the + button in Google Drive to create a new document, spreadsheet, or presentation.
  • Files by Google: Primarily a file manager, not a file creator — better for organizing existing files.
  • Code editors and note apps: Apps like Acode, Obsidian, or Markor let you create plain text or markdown files locally.

iOS and iPadOS

Apple's Files app allows limited file creation. For most document types, you'll create files from within apps:

  • Pages, Numbers, Keynote: Tap + to start a new document, then save to iCloud Drive or On My iPhone.
  • Files app: Supports creating folders, but not standalone files directly — an app must generate the file first.

File Types and Extensions: What to Choose

The file type matters for compatibility and intended use:

File TypeExtensionCommon Use
Plain text.txtNotes, logs, simple data
Rich text.rtfFormatted text, cross-platform
Word document.docxOffice productivity
Spreadsheet.xlsxData and calculations
PDF.pdfShareable, print-ready docs
Markdown.mdDocumentation, notes
CSV.csvData exchange, databases
Image.jpg, .pngPhotos, graphics

Choosing the wrong extension doesn't break anything immediately, but it can cause applications to misread the file or refuse to open it.

Variables That Affect Your Approach 🖥️

Several factors shape which method works best in practice:

  • Operating system — Windows, macOS, Linux, Android, and iOS each have different default behaviors and UI patterns.
  • File type needed — a plain text file requires almost no setup; a formatted document may need a specific application installed.
  • Technical comfort level — command-line methods are faster for experienced users but unnecessary for most everyday tasks.
  • Where the file needs to live — local storage, a network drive, or cloud storage (iCloud, Google Drive, OneDrive) each have different creation workflows.
  • Application ecosystem — if you're working within Microsoft 365, Adobe Creative Cloud, or Google Workspace, file creation happens inside those environments by design.

Cloud vs. Local File Creation

Creating a file locally means it exists on your device's storage until you move or share it. Creating a file in a cloud-synced folder (like your OneDrive or Google Drive folder on desktop) automatically uploads it and makes it accessible from other devices.

Some cloud services — Google Docs in particular — store files natively in the cloud with no true local copy unless you enable offline mode. This is meaningfully different from a .docx file saved inside a synced folder, which has a real local copy that syncs to the cloud.

That distinction matters when you're working offline, switching devices, or thinking about long-term file access and ownership.


The right approach to creating a file ultimately comes down to your device, your workflow, and what you intend to do with the file once it exists — and those are pieces only your own setup can answer.