{"id":4740,"date":"2026-04-14T23:01:48","date_gmt":"2026-04-14T23:01:48","guid":{"rendered":"https:\/\/www.betmok.com\/blog\/?p=4740"},"modified":"2026-04-14T23:03:00","modified_gmt":"2026-04-14T23:03:00","slug":"how-to-create-a-file-in-vs-code-from-the-linux-terminal","status":"publish","type":"post","link":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/","title":{"rendered":"How to Create a File in VS Code From the Linux Terminal"},"content":{"rendered":"<p>Creating and managing files efficiently is a core skill for anyone working in a Linux environment. Developers, system administrators, and students alike often rely on the terminal for speed and precision. When combined with <strong>Visual Studio Code (VS Code)<\/strong>, one of the most popular code editors available today, the Linux terminal becomes a powerful gateway to seamless development workflows. Understanding how to create a file in VS Code directly from the Linux terminal can significantly improve productivity and streamline project management.<\/p>\n<p><strong>TL;DR:<\/strong> To create a file in VS Code from the Linux terminal, first ensure VS Code is installed and accessible through the <em>code<\/em> command. Navigate to the desired directory using <em>cd<\/em>, create a file using commands like <em>touch<\/em>, and open it with <em>code filename<\/em>. Alternatively, create and open the file in one step by running <em>code filename<\/em> directly. This method enhances speed, organization, and workflow efficiency.<\/p>\n<p>This guide explains multiple methods for creating files in VS Code using the Linux terminal. It also explores setup requirements, helpful command variations, and troubleshooting tips for common issues.<\/p>\n<h2>Understanding the Basics<\/h2>\n<p>The Linux terminal is a command-line interface that allows users to interact with the operating system through text commands. VS Code, on the other hand, is a graphical code editor with rich features like syntax highlighting, debugging tools, and extensions.<\/p>\n<p>By connecting the terminal with VS Code via the <strong><em>code<\/em><\/strong> command, users can open files and directories directly from the command line. This eliminates the need to manually navigate through file explorers.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"720\" src=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-laptop-computer-sitting-on-top-of-a-desk-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-laptop-computer-sitting-on-top-of-a-desk-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg 1080w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-laptop-computer-sitting-on-top-of-a-desk-linux-terminal-window-vscode-editor-interface-developer-workspace-300x200.jpg 300w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-laptop-computer-sitting-on-top-of-a-desk-linux-terminal-window-vscode-editor-interface-developer-workspace-1024x683.jpg 1024w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-laptop-computer-sitting-on-top-of-a-desk-linux-terminal-window-vscode-editor-interface-developer-workspace-768x512.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Step 1: Install and Configure VS Code<\/h2>\n<p>Before creating files from the terminal, VS Code must be properly installed. Most Linux distributions allow installation using package managers such as:<\/p>\n<ul>\n<li><strong>Debian\/Ubuntu:<\/strong> <em>sudo apt install code<\/em><\/li>\n<li><strong>Fedora:<\/strong> <em>sudo dnf install code<\/em><\/li>\n<li><strong>Arch Linux:<\/strong> <em>sudo pacman -S code<\/em><\/li>\n<\/ul>\n<p>After installation, the <strong><em>code<\/em><\/strong> command may need to be enabled in the system PATH. In many cases, this happens automatically. If not, users can open VS Code, press <em>Ctrl + Shift + P<\/em>, and select:<\/p>\n<p><em>Shell Command: Install &#8216;code&#8217; command in PATH<\/em><\/p>\n<p>This ensures the terminal recognizes the <em>code<\/em> command globally.<\/p>\n<h2>Step 2: Navigate to the Target Directory<\/h2>\n<p>Before creating a file, one must move to the appropriate directory. The <strong><em>cd<\/em><\/strong> (change directory) command is used for this purpose.<\/p>\n<pre><code>cd \/path\/to\/your\/project<\/code><\/pre>\n<p>To check the current directory, the following command is helpful:<\/p>\n<pre><code>pwd<\/code><\/pre>\n<p>To list the files inside a directory:<\/p>\n<pre><code>ls<\/code><\/pre>\n<p>This step ensures the new file is created exactly where it is needed.<\/p>\n<h2>Step 3: Create a File Using Terminal Commands<\/h2>\n<p>There are several ways to create a file in Linux before opening it in VS Code.<\/p>\n<h3>Method 1: Using the touch Command<\/h3>\n<p>The simplest way to create an empty file is with <strong><em>touch<\/em><\/strong>:<\/p>\n<pre><code>touch example.js<\/code><\/pre>\n<p>This command instantly creates an empty file named <em>example.js<\/em> in the current directory.<\/p>\n<h3>Method 2: Using echo<\/h3>\n<p>If the user wants to create a file and insert initial content:<\/p>\n<pre><code>echo \"console.log('Hello World');\" &gt; example.js<\/code><\/pre>\n<p>This command creates the file and writes a line of code into it.<\/p>\n<h3>Method 3: Using nano or vim<\/h3>\n<p>Terminal-based editors such as <em>nano<\/em> or <em>vim<\/em> can also create files:<\/p>\n<pre><code>nano example.js<\/code><\/pre>\n<p>After saving and exiting, the file becomes available in the directory.<\/p>\n<h2>Step 4: Open the File in VS Code<\/h2>\n<p>Once the file exists, opening it in VS Code is straightforward:<\/p>\n<pre><code>code example.js<\/code><\/pre>\n<p>This command launches VS Code and loads the specified file.<\/p>\n<p>If VS Code is already open, the file will open in a new tab within the existing window.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"626\" src=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-close-up-of-a-laptop-computer-keyboard-terminal-command-code-filename-vscode-open-file-programming-laptop-screen.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-close-up-of-a-laptop-computer-keyboard-terminal-command-code-filename-vscode-open-file-programming-laptop-screen.jpg 1080w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-close-up-of-a-laptop-computer-keyboard-terminal-command-code-filename-vscode-open-file-programming-laptop-screen-300x174.jpg 300w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-close-up-of-a-laptop-computer-keyboard-terminal-command-code-filename-vscode-open-file-programming-laptop-screen-1024x594.jpg 1024w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-close-up-of-a-laptop-computer-keyboard-terminal-command-code-filename-vscode-open-file-programming-laptop-screen-768x445.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Creating and Opening a File in One Step<\/h2>\n<p>An efficient alternative skips the separate file creation step. Simply typing:<\/p>\n<pre><code>code newfile.py<\/code><\/pre>\n<p>If <em>newfile.py<\/em> does not already exist, VS Code automatically creates it when it opens. Once saved, the file will be permanently stored in the directory.<\/p>\n<p>This approach is ideal for rapid development workflows.<\/p>\n<h2>Opening an Entire Directory<\/h2>\n<p>Often, developers prefer opening an entire project folder rather than a single file.<\/p>\n<pre><code>code .<\/code><\/pre>\n<p>The period represents the current directory. This command launches VS Code with the full folder structure visible in the sidebar.<\/p>\n<p>To open a specific folder:<\/p>\n<pre><code>code \/path\/to\/project<\/code><\/pre>\n<p>This method is especially helpful for larger projects containing multiple files.<\/p>\n<h2>Useful Variations of the Code Command<\/h2>\n<p>The <strong><em>code<\/em><\/strong> command provides additional options:<\/p>\n<ul>\n<li><strong><em>code -n filename<\/em><\/strong> \u2013 Opens the file in a new window.<\/li>\n<li><strong><em>code -r filename<\/em><\/strong> \u2013 Reuses the current window.<\/li>\n<li><strong><em>code &#8211;verbose<\/em><\/strong> \u2013 Displays debugging information.<\/li>\n<\/ul>\n<p>These options provide flexibility depending on the user\u2019s workflow preferences.<\/p>\n<h2>Troubleshooting Common Issues<\/h2>\n<h3>Command Not Found Error<\/h3>\n<p>If the terminal displays <em>code: command not found<\/em>, it usually means the command is not in the system PATH. Reinstalling the shell command from within VS Code typically resolves this problem.<\/p>\n<h3>Permission Errors<\/h3>\n<p>If the user lacks permission to create files in a certain directory, the terminal may return a denied message. In such cases:<\/p>\n<ul>\n<li>Switch to a permitted directory such as the home folder.<\/li>\n<li>Use <em>sudo<\/em> cautiously for administrative directories.<\/li>\n<\/ul>\n<h3>File Not Appearing<\/h3>\n<p>If a created file does not appear in VS Code:<\/p>\n<ul>\n<li>Refresh the file explorer.<\/li>\n<li>Confirm the correct directory using <em>pwd<\/em>.<\/li>\n<li>Check hidden files with <em>ls -a<\/em>.<\/li>\n<\/ul>\n<h2>Why Use the Terminal Instead of the GUI?<\/h2>\n<p>Some may wonder why creating files via the terminal is beneficial when VS Code offers a graphical interface. There are several compelling reasons:<\/p>\n<ul>\n<li><strong>Speed:<\/strong> Commands execute faster than navigating menus.<\/li>\n<li><strong>Automation:<\/strong> Scripts can generate multiple files instantly.<\/li>\n<li><strong>Remote Work:<\/strong> Terminal access is essential when working on remote servers via SSH.<\/li>\n<li><strong>Precision:<\/strong> Commands reduce accidental misplacement of files.<\/li>\n<\/ul>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"720\" src=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/09\/a-computer-screen-with-a-dark-background-developer-typing-terminal-linux-command-line-screen-coding-environment.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/09\/a-computer-screen-with-a-dark-background-developer-typing-terminal-linux-command-line-screen-coding-environment.jpg 1080w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/09\/a-computer-screen-with-a-dark-background-developer-typing-terminal-linux-command-line-screen-coding-environment-300x200.jpg 300w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/09\/a-computer-screen-with-a-dark-background-developer-typing-terminal-linux-command-line-screen-coding-environment-1024x683.jpg 1024w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/09\/a-computer-screen-with-a-dark-background-developer-typing-terminal-linux-command-line-screen-coding-environment-768x512.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<p>For developers working in cloud environments or headless servers, mastering this workflow is particularly valuable.<\/p>\n<h2>Best Practices for Efficient File Creation<\/h2>\n<ul>\n<li>Use clear and descriptive file names.<\/li>\n<li>Organize files within structured directories.<\/li>\n<li>Open entire projects rather than isolated files when possible.<\/li>\n<li>Combine terminal commands for batch creation (e.g., loops).<\/li>\n<li>Regularly verify the current directory to avoid misplaced files.<\/li>\n<\/ul>\n<p>These habits contribute to cleaner project management and fewer errors.<\/p>\n<h2>Conclusion<\/h2>\n<p>Creating a file in VS Code from the Linux terminal is a simple yet powerful skill. By combining directory navigation commands with file creation utilities and the <em>code<\/em> launcher, users gain a streamlined development workflow. Whether working locally or remotely, this approach saves time and enhances control over file management.<\/p>\n<p>From beginners learning Linux basics to experienced developers managing complex projects, understanding how to bridge the terminal and VS Code is a fundamental productivity enhancer.<\/p>\n<h2>Frequently Asked Questions (FAQ)<\/h2>\n<ul>\n<li>\n<strong>1. How does one check if VS Code is installed on Linux?<\/strong><br \/>\nBy running <em>code &#8211;version<\/em> in the terminal. If a version number appears, VS Code is installed correctly.\n<\/li>\n<li>\n<strong>2. Can a file be created and opened without using the touch command?<\/strong><br \/>\nYes. Running <em>code filename<\/em> automatically creates the file if it does not already exist.\n<\/li>\n<li>\n<strong>3. How can multiple files be created at once?<\/strong><br \/>\nUsing the <em>touch<\/em> command with multiple filenames:<br \/>\n<em>touch file1.js file2.js file3.js<\/em>\n<\/li>\n<li>\n<strong>4. Is it possible to open VS Code from any directory?<\/strong><br \/>\nYes, as long as the <em>code<\/em> command is added to the system PATH.\n<\/li>\n<li>\n<strong>5. What does &#8220;code .&#8221; mean?<\/strong><br \/>\nIt opens the current directory in VS Code, displaying all files and subdirectories.\n<\/li>\n<li>\n<strong>6. Does this method work on remote Linux servers?<\/strong><br \/>\nYes, particularly when using SSH and VS Code\u2019s remote extensions, allowing direct editing of server files.\n<\/li>\n<li>\n<strong>7. What should be done if VS Code opens slowly from the terminal?<\/strong><br \/>\nSystem resources should be checked, and unnecessary extensions may be disabled to improve performance.\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":52,"featured_media":4741,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[465],"tags":[],"class_list":["post-4740","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a File in VS Code From the Linux Terminal - Betmok Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a File in VS Code From the Linux Terminal - Betmok Blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/\" \/>\n<meta property=\"og:site_name\" content=\"Betmok Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-14T23:01:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-14T23:03:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"1620\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jake Colins\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jake Colins\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/\"},\"author\":{\"name\":\"Jake Colins\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b\"},\"headline\":\"How to Create a File in VS Code From the Linux Terminal\",\"datePublished\":\"2026-04-14T23:01:48+00:00\",\"dateModified\":\"2026-04-14T23:03:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/\"},\"wordCount\":1241,\"publisher\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/\",\"url\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/\",\"name\":\"How to Create a File in VS Code From the Linux Terminal - Betmok Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg\",\"datePublished\":\"2026-04-14T23:01:48+00:00\",\"dateModified\":\"2026-04-14T23:03:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage\",\"url\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg\",\"contentUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg\",\"width\":1080,\"height\":1620},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.betmok.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a File in VS Code From the Linux Terminal\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#website\",\"url\":\"https:\/\/www.betmok.com\/blog\/\",\"name\":\"Betmok Blog\",\"description\":\"All about football\",\"publisher\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.betmok.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#organization\",\"name\":\"Betmok Blog\",\"url\":\"https:\/\/www.betmok.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png\",\"contentUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png\",\"width\":96,\"height\":96,\"caption\":\"Betmok Blog\"},\"image\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b\",\"name\":\"Jake Colins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g\",\"caption\":\"Jake Colins\"},\"description\":\"I'm Jake Collins, a tech journalist covering the latest in AI and robotics. My goal is to demystify advanced technologies for a broader audience.\",\"url\":\"https:\/\/www.betmok.com\/blog\/author\/jakec\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a File in VS Code From the Linux Terminal - Betmok Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a File in VS Code From the Linux Terminal - Betmok Blog","og_url":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/","og_site_name":"Betmok Blog","article_published_time":"2026-04-14T23:01:48+00:00","article_modified_time":"2026-04-14T23:03:00+00:00","og_image":[{"width":1080,"height":1620,"url":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg","type":"image\/jpeg"}],"author":"Jake Colins","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jake Colins","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#article","isPartOf":{"@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/"},"author":{"name":"Jake Colins","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b"},"headline":"How to Create a File in VS Code From the Linux Terminal","datePublished":"2026-04-14T23:01:48+00:00","dateModified":"2026-04-14T23:03:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/"},"wordCount":1241,"publisher":{"@id":"https:\/\/www.betmok.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage"},"thumbnailUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg","articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/","url":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/","name":"How to Create a File in VS Code From the Linux Terminal - Betmok Blog","isPartOf":{"@id":"https:\/\/www.betmok.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage"},"image":{"@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage"},"thumbnailUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg","datePublished":"2026-04-14T23:01:48+00:00","dateModified":"2026-04-14T23:03:00+00:00","breadcrumb":{"@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#primaryimage","url":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg","contentUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-computer-screen-with-a-blurry-image-of-a-computer-screen-linux-terminal-window-vscode-editor-interface-developer-workspace.jpg","width":1080,"height":1620},{"@type":"BreadcrumbList","@id":"https:\/\/www.betmok.com\/blog\/2026\/04\/14\/how-to-create-a-file-in-vs-code-from-the-linux-terminal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.betmok.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Create a File in VS Code From the Linux Terminal"}]},{"@type":"WebSite","@id":"https:\/\/www.betmok.com\/blog\/#website","url":"https:\/\/www.betmok.com\/blog\/","name":"Betmok Blog","description":"All about football","publisher":{"@id":"https:\/\/www.betmok.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.betmok.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.betmok.com\/blog\/#organization","name":"Betmok Blog","url":"https:\/\/www.betmok.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png","contentUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png","width":96,"height":96,"caption":"Betmok Blog"},"image":{"@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b","name":"Jake Colins","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g","caption":"Jake Colins"},"description":"I'm Jake Collins, a tech journalist covering the latest in AI and robotics. My goal is to demystify advanced technologies for a broader audience.","url":"https:\/\/www.betmok.com\/blog\/author\/jakec\/"}]}},"_links":{"self":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts\/4740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/comments?post=4740"}],"version-history":[{"count":1,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts\/4740\/revisions"}],"predecessor-version":[{"id":4770,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts\/4740\/revisions\/4770"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/media\/4741"}],"wp:attachment":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/media?parent=4740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/categories?post=4740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/tags?post=4740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}