<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Stephan Lamoureux</title>
    <description>The latest articles on Forem by Stephan Lamoureux (@stephanlamoureux).</description>
    <link>https://forem.com/stephanlamoureux</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F54369%2Fc16db00c-25a3-45ab-ad45-276b890a68c1.png</url>
      <title>Forem: Stephan Lamoureux</title>
      <link>https://forem.com/stephanlamoureux</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/stephanlamoureux"/>
    <language>en</language>
    <item>
      <title>Node.js: Installation &amp; Basics</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Mon, 10 Oct 2022 18:37:16 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/nodejs-for-wsl-8hh</link>
      <guid>https://forem.com/stephanlamoureux/nodejs-for-wsl-8hh</guid>
      <description>&lt;p&gt;Node.js is a JavaScript runtime environment that executes JavaScript code outside a web browser. It allows us to install packages, run local web servers, create APIs, and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;WSL/macOS/Linux&lt;/li&gt;
&lt;li&gt;cURL or Wget&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎛 NVM
&lt;/h2&gt;

&lt;p&gt;You will likely need to switch between multiple versions of Node.js based on the needs of the different projects you're working on. Node Version Manager allows you to quickly install and use different versions of Node via the command-line.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing NVM
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;1. Open your terminal and install NVM with &lt;code&gt;curl&lt;/code&gt; or &lt;code&gt;wget&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-o-&lt;/span&gt; https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget &lt;span class="nt"&gt;-qO-&lt;/span&gt; https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To verify installation, enter: &lt;code&gt;command -v nvm&lt;/code&gt;. This should return &lt;code&gt;nvm&lt;/code&gt;, if you receive &lt;code&gt;command not found&lt;/code&gt; or no response at all, close your current terminal, reopen it, and try again.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2. List which versions of Node are currently installed (should be none at this point):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm &lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowxc2lt3v7bwxjiwkmb9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowxc2lt3v7bwxjiwkmb9.png" alt="Ubuntu terminal displaying node not installed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3. Install both the current and stable LTS versions of Node.js.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install the current stable LTS release of Node.js (recommended for production applications):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--lts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the current release of Node.js (for testing the latest Node.js features and improvements, but more likely to have issues):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm &lt;span class="nb"&gt;install &lt;/span&gt;node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;4. List what versions of Node are installed:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm &lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you should see the two versions that you just installed listed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczjveonitj363d1cy9j5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczjveonitj363d1cy9j5.jpg" alt="Ubuntu terminal displaying node installed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5. Verify that Node.js is installed and the current version:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify that you have NPM installed as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Changing Node Versions
&lt;/h3&gt;

&lt;p&gt;Use the following commands to change the version of Node you would like to use for any given project:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Switch to the Current version:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm use node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Switch to the LTS version:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm use &lt;span class="nt"&gt;--lts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use the specific number for any additional versions you've installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm use v8.2.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To list all of the versions of Node.js available, use the command: &lt;code&gt;nvm ls-remote&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 NPM
&lt;/h2&gt;

&lt;p&gt;Node Package Manager is the default package manager for Node.js. It is a command-line tool used to download or publish packages and manage the dependencies of a project. There is a searchable repository of all available NPM packages at &lt;a href="https://www.npmjs.com/" rel="noopener noreferrer"&gt;https://www.npmjs.com/&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  New Projects
&lt;/h3&gt;

&lt;p&gt;When creating a new project that will utilize NPM, it must be initialized with the &lt;code&gt;init&lt;/code&gt; command. First, make sure you are in the root directory of your project, and then use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  package.json
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;npm init&lt;/code&gt; generates a &lt;code&gt;package.json&lt;/code&gt; file and will prompt you for the metadata of your project. This includes things like the name, version, description, and license. You can think of it as the blueprint of your project as it will also contain the packages it depends on. The metadata can be changed at any time by editing the &lt;code&gt;package.json&lt;/code&gt; file after the initialization.&lt;/p&gt;

&lt;p&gt;If you would like to automatically populate the initialization with all the default values, you may add the &lt;code&gt;--yes&lt;/code&gt; flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm init &lt;span class="nt"&gt;--yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Installing Modules
&lt;/h3&gt;

&lt;p&gt;Modules are installed via the &lt;code&gt;npm install&lt;/code&gt; or &lt;code&gt;npm i&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above command will install the React module as a dependency in &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We can also install NPM packages globally on our system. This is useful for utilities like command line interfaces.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://yarnpkg.com/" rel="noopener noreferrer"&gt;Yarn&lt;/a&gt; is another widely used node package manager, if we wanted to use it on all our node projects we would need the &lt;code&gt;--global&lt;/code&gt; or &lt;code&gt;-g&lt;/code&gt; flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Dependencies
&lt;/h4&gt;

&lt;p&gt;You can save a module as either a dependency or a developer dependency.&lt;/p&gt;

&lt;p&gt;A dependency would be something that your project cannot function properly without. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--save&lt;/code&gt; flag used to be needed to install modules as a dependency, but it is now done automatically with the &lt;code&gt;install&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save&lt;/span&gt; gray-matter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Is the same as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;gray-matter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04lmld7kohw0a5xlq99r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04lmld7kohw0a5xlq99r.jpg" alt="VS Code example of the dependencies section of package.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Developer Dependencies
&lt;/h4&gt;

&lt;p&gt;A developer dependency would be the modules used to build the project, not run it. This would include things like linters and testing tools.&lt;/p&gt;

&lt;p&gt;Developer dependencies are added with the &lt;code&gt;--save-dev&lt;/code&gt; or &lt;code&gt;-D&lt;/code&gt; flag. This adds the module to the &lt;code&gt;devDependencies&lt;/code&gt; section of &lt;code&gt;package.json&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save-dev&lt;/span&gt; husky
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe34jyn0rcpcknb00nsu5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe34jyn0rcpcknb00nsu5.jpg" alt="VS Code example of the devDependencies section of package.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Batch Installing
&lt;/h4&gt;

&lt;p&gt;Apart from installing a single module, you can install all modules that are listed as &lt;code&gt;dependencies&lt;/code&gt; and &lt;code&gt;devDependencies&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install all modules listed in the &lt;code&gt;package.json&lt;/code&gt; of your current directory. &lt;/p&gt;

&lt;p&gt;If we only wanted to install the dependencies needed to run our project, the &lt;code&gt;--production&lt;/code&gt; flag is used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--production&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the &lt;code&gt;--production&lt;/code&gt; flag will only install the modules from the &lt;code&gt;dependencies&lt;/code&gt; section of &lt;code&gt;package.json&lt;/code&gt; and ignore the &lt;code&gt;devDependencies&lt;/code&gt;. The perk of this is notably reducing the size of the &lt;code&gt;node_modules&lt;/code&gt; folder.&lt;/p&gt;

&lt;h4&gt;
  
  
  Uninstalling
&lt;/h4&gt;

&lt;p&gt;Removing modules works in the same way as installing them. Flags will need to be used for any global or developer dependencies.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Dependencies:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm uninstall react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Developer Dependencies:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm uninstall &lt;span class="nt"&gt;--save-dev&lt;/span&gt; husky
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Global Installs:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm uninstall &lt;span class="nt"&gt;--global&lt;/span&gt; yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Versioning
&lt;/h3&gt;

&lt;p&gt;Package versions are identified with major, minor, and patch releases. &lt;code&gt;8.1.1&lt;/code&gt; would be major version 8, minor version 1, and patch version 1. &lt;/p&gt;

&lt;p&gt;You can specify an exact version number by using the &lt;code&gt;@&lt;/code&gt; symbol.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;react@17.0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two more symbols we can use are &lt;code&gt;^&lt;/code&gt; and &lt;code&gt;~&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;^&lt;/code&gt; is the latest minor release. &lt;br&gt;
For example, &lt;code&gt;npm install ^8.1.1&lt;/code&gt; specification might install version &lt;code&gt;8.3.1&lt;/code&gt; if that's the latest minor version.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;~&lt;/code&gt; is the latest patch release. &lt;br&gt;
In the same way as minor releases, &lt;code&gt;npm install ~8.1.1&lt;/code&gt; could install version &lt;code&gt;8.1.6&lt;/code&gt; if that's the latest patch version available.&lt;/p&gt;

&lt;p&gt;When using the &lt;code&gt;npm install&lt;/code&gt; or &lt;code&gt;npm i&lt;/code&gt; command, the latest minor version will be used.&lt;/p&gt;
&lt;h3&gt;
  
  
  package-lock.json
&lt;/h3&gt;

&lt;p&gt;The exact package versions will be documented in a generated &lt;code&gt;package-lock.json&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;The values found inside the &lt;code&gt;dependencies&lt;/code&gt; and &lt;code&gt;devDependencies&lt;/code&gt; objects of the &lt;code&gt;package.json&lt;/code&gt; file include a range of acceptable versions of each package to install.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;package-lock.json&lt;/code&gt; is generated by the &lt;code&gt;npm install&lt;/code&gt; command and contains the &lt;em&gt;exact&lt;/em&gt; versions of the dependencies used.&lt;/p&gt;
&lt;h3&gt;
  
  
  Scripts
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;package.json&lt;/code&gt; also contains a &lt;code&gt;scripts&lt;/code&gt; property that can be defined to run command-line tools installed on the current project. This can include things like running tests, formatting your code, and launching a local server. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd23n93eo9edaazllm2tj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd23n93eo9edaazllm2tj.jpg" alt="VS Code example of the scripts section of package.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NPM scripts are run by using the &lt;code&gt;run&lt;/code&gt; command. With the above configuration, you would use the following command to have prettier format your code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run format
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The keys in the scripts object are the command names and the values are the actual commands.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Check out the official &lt;a href="https://docs.npmjs.com/" rel="noopener noreferrer"&gt;NPM&lt;/a&gt;, &lt;a href="https://github.com/nvm-sh/nvm" rel="noopener noreferrer"&gt;NVM&lt;/a&gt;, and &lt;a href="https://nodejs.org/en/docs/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; docs for more in-depth guides.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.freecodecamp.org/news/what-is-npm-a-node-package-manager-tutorial-for-beginners/" rel="noopener noreferrer"&gt;What is npm? A Node Package Manager Tutorial for Beginners&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://nodesource.com/blog/an-absolute-beginners-guide-to-using-npm/" rel="noopener noreferrer"&gt;An Absolute Beginner's Guide to Using npm&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.mend.io/free-developer-tools/blog/npm-how-to-install-a-specific-version-of-node-js-package/" rel="noopener noreferrer"&gt;npm: How To Install A Specific Version of Node.js Package&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>node</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Getting Started With Chocolatey 🍫</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Sun, 02 Oct 2022 14:39:35 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/getting-started-with-chocolatey-epo</link>
      <guid>https://forem.com/stephanlamoureux/getting-started-with-chocolatey-epo</guid>
      <description>&lt;p&gt;&lt;a href="https://community.chocolatey.org/" rel="noopener noreferrer"&gt;Chocolatey&lt;/a&gt; is a command-line package manager like &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;homebrew&lt;/a&gt; or &lt;a href="https://ubuntu.com/server/docs/package-management" rel="noopener noreferrer"&gt;APT&lt;/a&gt;, but for Windows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Windows 7+&lt;/li&gt;
&lt;li&gt;PowerShell&lt;/li&gt;
&lt;li&gt;.NET Framework 4+ (the installer will install .NET if you do not have it)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧑‍💻 Admin Shell
&lt;/h2&gt;

&lt;p&gt;Before we start the installation process, I want to cover launching an administrative shell from windows. There are a few ways to do this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Option 1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Right-click on the Windows start menu and select Windows Terminal (Admin):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmqzguucwp7aajeotgb92.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmqzguucwp7aajeotgb92.png" alt="Right clicked Windows start menu"&gt;&lt;/a&gt;&lt;br&gt;
Once your terminal loads, click the &lt;code&gt;˅&lt;/code&gt; icon and open a new PowerShell tab. It should say &lt;code&gt;Administrator: Windows PowerShell&lt;/code&gt; in the new tab:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yjofkr8p4pnwfci6mha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yjofkr8p4pnwfci6mha.png" alt="Admin PowerShell"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Option 2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have Windows Terminal on your taskbar, &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Right-Click&lt;/code&gt; on the icon and select run as administrator, and then open a new PowerShell tab:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm32t1yumbza4qx767k80.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm32t1yumbza4qx767k80.png" alt="Right click windows terminal icon"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Option 3&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use the search bar from the Start menu and type in &lt;code&gt;powershell&lt;/code&gt;. A link to Run as Administrator will display:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ipt85goj4dnalcxajm8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ipt85goj4dnalcxajm8.png" alt="Search PowerShell from the start menu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Option 4&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Windows Terminal added a new feature where you can launch a PowerShell/Command Prompt profile in an Admin terminal automatically. In the Windows Terminal settings, scroll down to your desired profile and then toggle the &lt;code&gt;Run this profile as Administrator&lt;/code&gt; switch. Now you can skip all the steps above, and the terminal will always launch as admin.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7df9uir316zfm5am5zd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7df9uir316zfm5am5zd.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🍫 Installing Chocolatey
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;1. Open an administrative PowerShell terminal and run the following command:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;Get-ExecutionPolicy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;2. If it returns &lt;code&gt;Restricted&lt;/code&gt;, then run one of the following commands:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;Set-ExecutionPolicy&lt;/span&gt; &lt;span class="nf"&gt;AllSigned&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;Set-ExecutionPolicy&lt;/span&gt; &lt;span class="nf"&gt;Bypass&lt;/span&gt; &lt;span class="nf"&gt;-Scope&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;With PowerShell, you must ensure &lt;code&gt;Get-ExecutionPolicy&lt;/code&gt; is not Restricted. We suggest using &lt;code&gt;Bypass&lt;/code&gt; to bypass the policy to get things installed or &lt;code&gt;AllSigned&lt;/code&gt; for quite a bit more security.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;3. Finally, run the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;Set-ExecutionPolicy&lt;/span&gt; &lt;span class="nf"&gt;Bypass&lt;/span&gt; &lt;span class="nf"&gt;-Scope&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt; &lt;span class="nf"&gt;-Force;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;System.Net.ServicePointManager&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="nf"&gt;::SecurityProtocol&lt;/span&gt; &lt;span class="nf"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;System.Net.ServicePointManager&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="nf"&gt;::SecurityProtocol&lt;/span&gt; &lt;span class="nf"&gt;-bor&lt;/span&gt; &lt;span class="nf"&gt;3072;&lt;/span&gt; &lt;span class="nf"&gt;iex&lt;/span&gt; &lt;span class="s"&gt;((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't see any errors, you are ready to use Chocolatey! Type &lt;code&gt;choco&lt;/code&gt; or &lt;code&gt;choco -?&lt;/code&gt; now, or see &lt;a href="https://docs.chocolatey.org/en-us/getting-started" rel="noopener noreferrer"&gt;Getting Started&lt;/a&gt; for usage instructions.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⌨️ Basic Commands
&lt;/h2&gt;

&lt;p&gt;We use the &lt;code&gt;choco&lt;/code&gt; command to run chocolatey. (&lt;em&gt;Remember, you must use an administrative shell for it to work.&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;Install a new package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;install&lt;/span&gt; &lt;span class="nf"&gt;filename&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove a package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;uninstall&lt;/span&gt; &lt;span class="nf"&gt;filename&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List all of the installed packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;upgrade&lt;/span&gt; &lt;span class="nf"&gt;filename&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or to update everything at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;upgrade&lt;/span&gt; &lt;span class="nf"&gt;all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📱 App Recommendations
&lt;/h2&gt;

&lt;p&gt;Search for available apps on the &lt;a href="https://community.chocolatey.org/packages" rel="noopener noreferrer"&gt;Community Package Repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here are a few of my favorite (free) apps for productivity and development on Windows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.wox.one/" rel="noopener noreferrer"&gt;Wox&lt;/a&gt; - A full-featured launcher&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://runjs.app/" rel="noopener noreferrer"&gt;RunJs&lt;/a&gt; - JavaScript and TypeScript playground&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://responsively.app" rel="noopener noreferrer"&gt;Responsively&lt;/a&gt; - A modified web browser that helps in responsive web development.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://zealdocs.org/" rel="noopener noreferrer"&gt;Zeal&lt;/a&gt; - the Windows version of Dash&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.figma.com" rel="noopener noreferrer"&gt;Figma&lt;/a&gt; - A collaborative UI design tool&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://app.diagrams.net" rel="noopener noreferrer"&gt;draw.io&lt;/a&gt; - Flowchart maker and diagram software&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://desktop.github.com/" rel="noopener noreferrer"&gt;GitHub Desktop&lt;/a&gt; - A GUI for Git&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; - API tools&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.notion.so/" rel="noopener noreferrer"&gt;Notion&lt;/a&gt; - Project management and note-taking software&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.microsoft.com/en-us/windows/powertoys/?WT.mc_id=twitter-0000-docsmsft" rel="noopener noreferrer"&gt;Microsoft PowerToys&lt;/a&gt; - A set of utilities for power users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can download all these at once with the following command using chocolatey in an admin shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;choco &lt;span class="nb"&gt;install &lt;/span&gt;wox runjs responsively zeal figma drawio github-desktop postman notion powertoys &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.chocolatey.org/en-us/" rel="noopener noreferrer"&gt;Chocolatey Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>codenewbie</category>
      <category>productivity</category>
    </item>
    <item>
      <title>💤 Zsh in WSL</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Sun, 02 Oct 2022 03:56:44 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/zsh-in-wsl-1dgc</link>
      <guid>https://forem.com/stephanlamoureux/zsh-in-wsl-1dgc</guid>
      <description>&lt;p&gt;Z shell works almost identically to the standard BASH shell found on default Linux installs. What makes it different is its support for plugins and themes, along with some extra features like spelling correction and recursive path expansion. It's time to throw BASH in the trash!&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Windows 10 or 11&lt;/li&gt;
&lt;li&gt;WSL or WSL2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The terminal commands used are based on Ubuntu/Debian-based Linux distributions.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🐚 Installing Zsh
&lt;/h2&gt;

&lt;p&gt;Zsh can be installed with one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;zsh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installing, type the &lt;code&gt;zsh&lt;/code&gt; command. Zsh will ask you to choose some configurations. We will do this later on while installing oh-my-zsh, so choose option &lt;code&gt;0&lt;/code&gt; to create the config file and prevent this message from showing again.&lt;/p&gt;




&lt;h2&gt;
  
  
  😱 OhMyZsh
&lt;/h2&gt;

&lt;p&gt;The most popular plugin framework by far is &lt;a href="https://ohmyz.sh/"&gt;OhMyZsh&lt;/a&gt;. It comes preloaded with loads of plugins, themes, helpers, and more. It can help with productivity for sure, but more importantly, it just looks cool 😎.&lt;/p&gt;

&lt;h3&gt;
  
  
  cURL
&lt;/h3&gt;

&lt;p&gt;First off, we need to make sure we have &lt;a href="https://curl.se/"&gt;cURL&lt;/a&gt; installed. Short for "Client URL", it's a way to transfer data from the command line, and that's how we will download OhMyZsh.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Installing OhMyZsh
&lt;/h3&gt;

&lt;p&gt;Enter the following command into your terminal to install OhMyZsh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! You should now see a &lt;code&gt;.oh-my-zsh&lt;/code&gt; directory inside of your home directory. To change your plugins and themes you will need to edit your &lt;code&gt;.zshrc&lt;/code&gt; file, also found in your home dir. &lt;/p&gt;

&lt;p&gt;Here is a list of all the &lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Themes"&gt;themes&lt;/a&gt; and &lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins"&gt;plugins&lt;/a&gt; that come bundled with OhMyZsh.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔌 Plugins
&lt;/h2&gt;

&lt;p&gt;There are countless plugins available, but these are the two I recommend most.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/zsh-users/zsh-autosuggestions"&gt;zsh-autosuggestions&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Autosuggestions for zsh, It suggests commands as you type based on history and completions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Clone this repository into &lt;code&gt;$ZSH_CUSTOM/plugins&lt;/code&gt; (by default &lt;code&gt;~/.oh-my-zsh/custom/plugins&lt;/code&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-autosuggestions &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSH_CUSTOM&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;~/.oh-my-zsh/custom&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/plugins/zsh-autosuggestions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;2. Add the plugin to the list of plugins for Oh My Zsh to load (inside &lt;code&gt;~/.zshrc&lt;/code&gt;):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;plugins&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;git zsh-autosuggestions&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;3. Start a new terminal session.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/zsh-users/zsh-syntax-highlighting"&gt;zsh-syntax-highlighting&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This package provides syntax highlighting for the shell zsh. It enables highlighting of commands whilst they are typed at a zsh prompt into an interactive terminal. This helps in reviewing commands before running them, particularly in catching syntax errors.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Clone this repository in oh-my-zsh's plugins directory:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-syntax-highlighting.git &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSH_CUSTOM&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;~/.oh-my-zsh/custom&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/plugins/zsh-syntax-highlighting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;2. Activate the plugin in &lt;code&gt;~/.zshrc&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;plugins&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;git zsh-autosuggestions zsh-syntax-highlighting&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;3. Start a new terminal session.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  More Plugins
&lt;/h3&gt;

&lt;p&gt;A huge list of plugins can be found at the &lt;a href="https://github.com/unixorn/awesome-zsh-plugins"&gt;awesome zsh plugins repo&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki"&gt;OhMyZsh Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://kevinprogramming.com/using-zsh-in-windows-terminal/"&gt;Using Zsh in Windows Terminal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zsh.sourceforge.io/Guide/zshguide.html"&gt;A User's Guide to the Z-Shell&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Configuring Git in WSL</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Sat, 17 Sep 2022 17:02:28 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/configuring-git-in-wsl-5e3m</link>
      <guid>https://forem.com/stephanlamoureux/configuring-git-in-wsl-5e3m</guid>
      <description>&lt;p&gt;This guide walks you through the initial Git config and setting up your Personal Access Token in a Windows dev environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;p&gt;My two assumptions for this are that you have Windows 10/11 and WSL already installed. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;The terminal commands used are based off of Ubuntu/Debian based Linux distributions.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📝 Git Config
&lt;/h2&gt;

&lt;p&gt;Git should come pre-installed on most, if not all of the WSL Linux distributions. To ensure you have the latest version, use the following command in an Ubuntu or Debian based distro:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;git


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Name
&lt;/h3&gt;

&lt;p&gt;To set up your Git config file, open a WSL command line and set your name with this command (replacing "Your Name" with your preferred username):&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Email
&lt;/h3&gt;

&lt;p&gt;Set your email with this command (replacing "&lt;a href="mailto:youremail@domain.com"&gt;youremail@domain.com&lt;/a&gt;" with the email you prefer):&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"youremail@domain.com"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Username
&lt;/h3&gt;

&lt;p&gt;And finally, add your GitHub username to link it to git (case sensitive!):&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.username &lt;span class="s2"&gt;"GitHub username"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Make sure you are inputting &lt;code&gt;user.username&lt;/code&gt; and not &lt;code&gt;user.name&lt;/code&gt; otherwise you will overwrite your name and you will not be correctly synced to your GitHub account.&lt;/p&gt;

&lt;p&gt;You can double-check any of your settings by typing &lt;code&gt;git config --global user.name&lt;/code&gt; and so on. To make any changes just type the necessary command again as in the examples above.&lt;/p&gt;




&lt;h2&gt;
  
  
  😺 GitHub Credentials
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Creating your Personal Access Token
&lt;/h3&gt;

&lt;p&gt;GitHub has removed the ability to use a conventional password when working in a remote repository. You are now required to create a personal access token instead.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the &lt;a href="https://docs.github.com/en/rest/overview/other-authentication-methods#via-oauth-and-personal-access-tokens" rel="noopener noreferrer"&gt;GitHub API&lt;/a&gt; or the &lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#using-a-token-on-the-command-line" rel="noopener noreferrer"&gt;command line&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Follow &lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token" rel="noopener noreferrer"&gt;these docs&lt;/a&gt; for step-by-step instructions on creating your personal token.&lt;/p&gt;

&lt;h3&gt;
  
  
  Git Credential Manager
&lt;/h3&gt;

&lt;p&gt;Once you enter in your token the first time, it can be stored via &lt;a href="https://github.com/GitCredentialManager/git-credential-manager" rel="noopener noreferrer"&gt;Git Credential Manager (GCM)&lt;/a&gt; so you won't have to authenticate yourself each time.&lt;/p&gt;

&lt;p&gt;You can have Git installed in WSL and also in Windows at the same time. &lt;a href="https://gitforwindows.org/" rel="noopener noreferrer"&gt;Git for Windows&lt;/a&gt; includes GCM and is the preferred way to install it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybd9zppcsghp91wzhpjk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybd9zppcsghp91wzhpjk.png" alt="Windows Git Installer Menu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also download the &lt;a href="https://github.com/GitCredentialManager/git-credential-manager/releases/latest" rel="noopener noreferrer"&gt;latest installer for Windows&lt;/a&gt; to install the GCM standalone version.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storing Your Token
&lt;/h3&gt;

&lt;p&gt;Once Git Credential Manager is installed you can set it up for use with WSL. Open your WSL terminal and enter this command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper &lt;span class="s2"&gt;"/mnt/c/Program&lt;/span&gt;&lt;span class="se"&gt;\ &lt;/span&gt;&lt;span class="s2"&gt;Files/Git/mingw64/bin/git-credential-manager-core.exe"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;If you ever receive the following error message:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

/mnt/c/Program&lt;span class="se"&gt;\ &lt;/span&gt;Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe store: 1: 
/mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe: not found


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Try using the this command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper store


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h2&gt;
  
  
  🔚 Conclusion
&lt;/h2&gt;

&lt;p&gt;That wraps up the basics for a Git config on Windows! If you are interested in learning more, check out my &lt;a href="https://dev.to/stephanlamoureux/series/11364"&gt;Git a Grip series&lt;/a&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token" rel="noopener noreferrer"&gt;GitHub Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/stephanlamoureux/series/11364"&gt;Git a Grip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs" rel="noopener noreferrer"&gt;Git Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>git</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>The Complete Windows Web Developer Setup Guide</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Sun, 29 May 2022 00:01:00 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/the-complete-windows-developer-setup-guide-fie</link>
      <guid>https://forem.com/stephanlamoureux/the-complete-windows-developer-setup-guide-fie</guid>
      <description>&lt;h2&gt;
  
  
  🔭 Overview
&lt;/h2&gt;

&lt;p&gt;After a lot of trial and error, I've been able to piece together a pretty respectable Windows dev environment. There are plenty of guides already out there, but none of them seem to cover the entire scope. I tried to do that here, without getting too deep into any individual topic. I believe this will leave the majority of users with a smooth Windows developer experience. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;The &lt;a href="https://github.com/Vets-Who-Code/windows-dev-guide" rel="noopener noreferrer"&gt;repo&lt;/a&gt; for this guide contains some additional info and will be continually updated.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Windows 10 version 2004 and higher (&lt;em&gt;Build 19041 and higher&lt;/em&gt;) or Windows 11 &lt;a href="https://support.microsoft.com/en-us/topic/628bec99-476a-2c13-5296-9dd081cdd808" rel="noopener noreferrer"&gt;(&lt;em&gt;Which version do I have?&lt;/em&gt;)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; account&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🐧 WSL
&lt;/h2&gt;

&lt;p&gt;The first and most important part of setting up your Windows dev environment is installing the Windows Subsystem for Linux (WSL). I recommend sticking with Ubuntu, but feel free to try out as many distributions as you like. There are no issues with having multiple distributions installed at once.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing WSL 2
&lt;/h3&gt;

&lt;p&gt;WSL 2 is the latest version of WSL, adding new features like a full Linux kernel and full system call compatibility. There used to be a handful of steps needed to install it, but we now only need to enter the following command into PowerShell or Command Prompt:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

wsl &lt;span class="nt"&gt;--install&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This command does the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enables the optional WSL and Virtual Machine Platform components&lt;/li&gt;
&lt;li&gt;Downloads and installs the latest Linux kernel&lt;/li&gt;
&lt;li&gt;Sets WSL 2 as the default&lt;/li&gt;
&lt;li&gt;Downloads and installs the Ubuntu Linux distribution (a reboot may be required)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using the &lt;code&gt;--install&lt;/code&gt; command defaults to Ubuntu and only works if WSL is not installed yet. If you would like to change your default Linux distribution, &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install#change-the-default-Linux-distribution-installed" rel="noopener noreferrer"&gt;follow these docs&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Config
&lt;/h3&gt;

&lt;p&gt;Once the process of installing your Linux distribution with WSL is complete, open the distribution (Ubuntu by default) using the Start menu. You will be asked to create a User Name and Password for your Linux distribution. When you enter your new password, nothing will display in the terminal. Your keyboard is still working! It is just a security feature.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This User Name and Password is specific to each separate Linux distribution that you install and has no bearing on your Windows user name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you create a User Name and Password, the account will be your default user for the distribution and automatically sign-in on launch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This account will be considered the Linux administrator, with the ability to run sudo (Super User Do) administrative commands.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each Linux distribution running on WSL has its own Linux user accounts and passwords. You will have to configure a Linux user account every time you add a distribution, reinstall, or reset.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Updating Linux
&lt;/h3&gt;

&lt;p&gt;It is recommended that you regularly update and upgrade your packages. In Ubuntu or Debian, we use the &lt;code&gt;apt&lt;/code&gt; package manager:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Windows does not automatically update or upgrade your Linux distribution(s). This is a task that most Linux users prefer to control themselves.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mapping Your Linux Drive
&lt;/h3&gt;

&lt;p&gt;When you open the Windows file explorer, it displays your devices and drives. We are going to add our Ubuntu virtual drive as a network location for easy access.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the &lt;code&gt;\\wsl$\&lt;/code&gt; location from file explorer:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvpouje1q3pdemlgic9lm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvpouje1q3pdemlgic9lm.jpg" alt="File explorer search bar"&gt;&lt;/a&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right-click on the Ubuntu folder, and select &lt;code&gt;Map network drive&lt;/code&gt;:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzo894w02yt2494ds56o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzo894w02yt2494ds56o.jpg" alt="Mapping network drive"&gt;&lt;/a&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the drive letter you would like to use, leave &lt;code&gt;Reconnect at sign-in&lt;/code&gt; checked and &lt;code&gt;Connect using different credentials&lt;/code&gt; unchecked, and then click finish (mine will look slightly different because it's already been done):&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6buxuwak7bdmdnv8fvwz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6buxuwak7bdmdnv8fvwz.jpg" alt="Mapping network drive"&gt;&lt;/a&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The end result should look something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ahqj416o6qnaxp6dzt2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ahqj416o6qnaxp6dzt2.jpg" alt="File explorer"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you wanted to access your Windows files from the Linux terminal, they are found in the &lt;code&gt;/mnt/&lt;/code&gt; directory, so your Windows user directory would be located at &lt;code&gt;/mnt/c/Users/username&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With your Ubuntu drive mapped, you can easily drag/drop or copy/paste Windows files to the Linux file system by using the file explorer.&lt;/p&gt;

&lt;p&gt;However, it is recommended to store your project files on the Linux file system. It will be much faster than accessing files from Windows and it can also be a little buggy.&lt;/p&gt;

&lt;h4&gt;
  
  
  Pin Your Code Directory
&lt;/h4&gt;

&lt;p&gt;Another quick tip I have is to create a code directory inside of Ubuntu, and then pin it to the quick access menu found on the left side of the file explorer. This comes in handy when transferring files quickly between Windows and Linux.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open file explorer and click on the Ubuntu network drive we created&lt;/li&gt;
&lt;li&gt;Select the home dir, and then your user directory&lt;/li&gt;
&lt;li&gt;Right-click and create a new folder, name it code, or anything else you'd like&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Drag that new folder to the left, underneath the star icon that says &lt;code&gt;Quick access&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9ocnuvzqdhmkvy7gjc9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9ocnuvzqdhmkvy7gjc9.jpg" alt="My code directory"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Restarting WSL
&lt;/h3&gt;

&lt;p&gt;If for some reason WSL stops working, you can restart it with these two commands from PowerShell/Command Prompt:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

wsl.exe &lt;span class="nt"&gt;--shutdown&lt;/span&gt;
wsl.exe


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you go back to your Linux shell everything should be back to normal.&lt;/p&gt;




&lt;h2&gt;
  
  
  👨‍💻 Windows Terminal
&lt;/h2&gt;

&lt;p&gt;To launch a Linux terminal we currently need to use the Ubuntu icon from the Start menu or enter the &lt;code&gt;wsl&lt;/code&gt; or &lt;code&gt;bash&lt;/code&gt; commands into PowerShell/Command Prompt. Another option that will give us more features like tabs, split views, themes, transparency, and key bindings, is to use the Windows Terminal. There are also a few other terminals like &lt;a href="https://cmder.net/" rel="noopener noreferrer"&gt;Cmder&lt;/a&gt;, &lt;a href="https://conemu.github.io/" rel="noopener noreferrer"&gt;ConEmu&lt;/a&gt;, or &lt;a href="https://hyper.is/" rel="noopener noreferrer"&gt;Hyper&lt;/a&gt;, but in my experience, Windows Terminal works extremely well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing Windows Terminal
&lt;/h3&gt;

&lt;p&gt;Windows 11 comes with Windows Terminal by default, but If you are using Windows 10, Download and install Windows Terminal through the &lt;a href="https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?rtc=1&amp;amp;activetab=pivot:overviewtab" rel="noopener noreferrer"&gt;Microsoft Store&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Terminal Settings
&lt;/h3&gt;

&lt;p&gt;A couple of quick things I recommend setting up are the default profile and your starting home directory. These settings make it so launching Windows Terminal will open directly into WSL inside our user's home directory.&lt;/p&gt;

&lt;h4&gt;
  
  
  Default Profile
&lt;/h4&gt;

&lt;p&gt;Windows Terminal will open a PowerShell or Command Prompt shell when launched by default, here is how to switch it to WSL:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Select the &lt;code&gt;˅&lt;/code&gt; icon from Windows Terminal and go to the Settings menu:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhl7jyj0svhbh4mp2qqf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhl7jyj0svhbh4mp2qqf.jpeg" alt="Windows terminal settings"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the Startup section you will find the Default profile dropdown, select Ubuntu. Below it, select Windows Terminal as the Default terminal application:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32mpr2pao94165fy2n9q.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32mpr2pao94165fy2n9q.jpeg" alt="Default shell profile"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Starting Directory
&lt;/h4&gt;

&lt;p&gt;A default Ubuntu terminal will open to the root directory. To make finding your files a little quicker we can have it open into your home directory instead.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Under the Profiles section in the settings menu click on Ubuntu&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At the General tab, you will find a Starting directory input&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter the following replacing "username" with your Ubuntu user name: &lt;code&gt;\\wsl$\Ubuntu\home\username&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can leave the &lt;code&gt;Use parent process directory&lt;/code&gt; box unchecked&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If it is still opening into your &lt;code&gt;/&lt;/code&gt; directory, change the &lt;code&gt;Command line&lt;/code&gt; setting located right above the &lt;code&gt;Starting directory&lt;/code&gt; input box to the following: &lt;code&gt;wsl.exe -d Ubuntu&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpin4mz9pffnb5j5gnu5j.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpin4mz9pffnb5j5gnu5j.jpeg" alt="Starting directory in Ubuntu terminal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many more settings to explore, and there is also a JSON file you can edit for more advanced customizations.&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://www.ubuntupit.com/best-windows-terminal-themes-and-color-schemes/" rel="noopener noreferrer"&gt;this guide&lt;/a&gt; for some popular Windows Terminal themes and how to install them.&lt;/p&gt;




&lt;h2&gt;
  
  
  📝 Git Config
&lt;/h2&gt;

&lt;p&gt;Git should come pre-installed on most, if not all of the WSL Linux distributions. To ensure you have the latest version, use the following command in an Ubuntu or Debian based distro:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;git


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Name
&lt;/h3&gt;

&lt;p&gt;To set up your Git config file, open a WSL command line and set your name with this command (replacing "Your Name" with your preferred username):&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Email
&lt;/h3&gt;

&lt;p&gt;Set your email with this command (replacing "&lt;a href="mailto:youremail@domain.com"&gt;youremail@domain.com&lt;/a&gt;" with the email you prefer):&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"youremail@domain.com"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Username
&lt;/h3&gt;

&lt;p&gt;And finally, add your GitHub username to link it to git (case sensitive!):&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.username &lt;span class="s2"&gt;"GitHub username"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Make sure you are inputting &lt;code&gt;user.username&lt;/code&gt; and not &lt;code&gt;user.name&lt;/code&gt; otherwise you will overwrite your name and you will not be correctly synced to your GitHub account.&lt;/p&gt;

&lt;p&gt;You can double-check any of your settings by typing &lt;code&gt;git config --global user.name&lt;/code&gt; and so on. To make any changes just type the necessary command again as in the examples above.&lt;/p&gt;




&lt;h2&gt;
  
  
  😺 GitHub Credentials
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Creating your Personal Access Token
&lt;/h3&gt;

&lt;p&gt;GitHub has removed the ability to use a conventional password when working in a remote repository. You are now required to create a personal access token instead.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the &lt;a href="https://docs.github.com/en/rest/overview/other-authentication-methods#via-oauth-and-personal-access-tokens" rel="noopener noreferrer"&gt;GitHub API&lt;/a&gt; or the &lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#using-a-token-on-the-command-line" rel="noopener noreferrer"&gt;command line&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Follow &lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token" rel="noopener noreferrer"&gt;these docs&lt;/a&gt; for step-by-step instructions on creating your personal token.&lt;/p&gt;

&lt;h3&gt;
  
  
  Git Credential Manager
&lt;/h3&gt;

&lt;p&gt;Once you enter in your token the first time, it can be stored via &lt;a href="https://github.com/GitCredentialManager/git-credential-manager" rel="noopener noreferrer"&gt;Git Credential Manager (GCM)&lt;/a&gt; so you won't have to authenticate yourself each time.&lt;/p&gt;

&lt;p&gt;You can have Git installed in WSL and also in Windows at the same time. &lt;a href="https://gitforwindows.org/" rel="noopener noreferrer"&gt;Git for Windows&lt;/a&gt; includes GCM and is the preferred way to install it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybd9zppcsghp91wzhpjk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybd9zppcsghp91wzhpjk.png" alt="Windows Git Installer Menu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also download the &lt;a href="https://github.com/GitCredentialManager/git-credential-manager/releases/latest" rel="noopener noreferrer"&gt;latest installer for Windows&lt;/a&gt; to install the GCM standalone version.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storing Your Token
&lt;/h3&gt;

&lt;p&gt;Once Git Credential Manager is installed you can set it up for use with WSL. Open your WSL terminal and enter this command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper &lt;span class="s2"&gt;"/mnt/c/Program&lt;/span&gt;&lt;span class="se"&gt;\ &lt;/span&gt;&lt;span class="s2"&gt;Files/Git/mingw64/bin/git-credential-manager-core.exe"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you ever receive the following error message:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

/mnt/c/Program&lt;span class="se"&gt;\ &lt;/span&gt;Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe store: 1: 
/mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe: not found


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Try using the this command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper store


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h2&gt;
  
  
  💤 Zsh
&lt;/h2&gt;

&lt;p&gt;Z shell works almost identically to the standard BASH shell found on default Linux installs. What makes it different is its support for plugins and themes, along with some extra features like spelling correction and recursive path expansion. It's time to throw BASH in the trash!&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing Zsh
&lt;/h3&gt;

&lt;p&gt;Zsh can be installed with one command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;zsh


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;After installing, type the &lt;code&gt;zsh&lt;/code&gt; command. Zsh will ask you to choose some configurations. We will do this later on while installing oh-my-zsh, so choose option &lt;code&gt;0&lt;/code&gt; to create the config file and prevent this message from showing again.&lt;/p&gt;

&lt;h3&gt;
  
  
  OhMyZsh
&lt;/h3&gt;

&lt;p&gt;The most popular plugin framework by far is &lt;a href="https://ohmyz.sh/" rel="noopener noreferrer"&gt;OhMyZsh&lt;/a&gt;. It comes preloaded with loads of plugins, themes, helpers, and more. It can help with productivity for sure, but more importantly, it just looks cool 😎.&lt;/p&gt;

&lt;h3&gt;
  
  
  cURL
&lt;/h3&gt;

&lt;p&gt;First off, we need to make sure we have &lt;a href="https://curl.se/" rel="noopener noreferrer"&gt;cURL&lt;/a&gt; installed. Short for "Client URL", it's a way to transfer data from the command line, and that's how we will download OhMyZsh.&lt;/p&gt;

&lt;p&gt;Install curl with:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;curl


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Installing OhMyZsh
&lt;/h3&gt;

&lt;p&gt;Enter the following command into your terminal to install OhMyZsh:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That's it! You should now see a &lt;code&gt;.oh-my-zsh&lt;/code&gt; directory inside of your home directory. To change your plugins and themes you will need to edit your &lt;code&gt;.zshrc&lt;/code&gt; file, also found in your home dir. &lt;/p&gt;

&lt;p&gt;Here is a list of all the &lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Themes" rel="noopener noreferrer"&gt;themes&lt;/a&gt; and &lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins" rel="noopener noreferrer"&gt;plugins&lt;/a&gt; that come bundled with OhMyZsh.&lt;/p&gt;

&lt;h3&gt;
  
  
  More Plugins
&lt;/h3&gt;

&lt;p&gt;There are countless plugins available, but these are the two I recommend most.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://github.com/zsh-users/zsh-autosuggestions" rel="noopener noreferrer"&gt;zsh-autosuggestions&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Autosuggestions for zsh, It suggests commands as you type based on history and completions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Clone this repository into &lt;code&gt;$ZSH_CUSTOM/plugins&lt;/code&gt; (by default &lt;code&gt;~/.oh-my-zsh/custom/plugins&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git clone https://github.com/zsh-users/zsh-autosuggestions &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSH_CUSTOM&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;~/.oh-my-zsh/custom&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/plugins/zsh-autosuggestions


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;2. Add the plugin to the list of plugins for Oh My Zsh to load (inside &lt;code&gt;~/.zshrc&lt;/code&gt;):&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;plugins&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;git zsh-autosuggestions&lt;span class="o"&gt;)&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;3. Start a new terminal session.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://github.com/zsh-users/zsh-syntax-highlighting" rel="noopener noreferrer"&gt;zsh-syntax-highlighting&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;This package provides syntax highlighting for the shell zsh. It enables highlighting of commands whilst they are typed at a zsh prompt into an interactive terminal. This helps in reviewing commands before running them, particularly in catching syntax errors.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Clone this repository in oh-my-zsh's plugins directory:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSH_CUSTOM&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;~/.oh-my-zsh/custom&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/plugins/zsh-syntax-highlighting


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;2. Activate the plugin in &lt;code&gt;~/.zshrc&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;plugins&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;git zsh-autosuggestions zsh-syntax-highlighting&lt;span class="o"&gt;)&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;3. Start a new terminal session.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  More
&lt;/h3&gt;

&lt;p&gt;A huge list of plugins can be found at the &lt;a href="https://github.com/unixorn/awesome-zsh-plugins" rel="noopener noreferrer"&gt;awesome zsh plugins repo&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Node.js
&lt;/h2&gt;

&lt;p&gt;Node.js is a JavaScript runtime environment that executes JavaScript code outside a web browser. It allows us to install packages, run local web servers, create APIs, and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  NVM
&lt;/h3&gt;

&lt;p&gt;You will likely need to switch between multiple versions of Node.js based on the needs of different projects you're working on. Node Version Manager allows you to quickly install and use different versions of node via the command line.&lt;/p&gt;

&lt;h4&gt;
  
  
  Installing NVM
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;1. Open your Ubuntu command line and Install NVM with:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

curl &lt;span class="nt"&gt;-o-&lt;/span&gt; https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To verify installation, enter: &lt;code&gt;command -v nvm&lt;/code&gt;. This should return 'nvm', if you receive 'command not found' or no response at all, close your current terminal, reopen it, and try again.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2. List which versions of Node are currently installed (should be none at this point):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

nvm &lt;span class="nb"&gt;ls&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowxc2lt3v7bwxjiwkmb9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowxc2lt3v7bwxjiwkmb9.png" alt="Ubuntu terminal displaying node not installed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3. Install both the current and stable LTS versions of Node.js.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install the current stable LTS release of Node.js (recommended for production applications):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

nvm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--lts&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Install the current release of Node.js (for testing latest Node.js features and improvements, but more likely to have issues):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

nvm &lt;span class="nb"&gt;install &lt;/span&gt;node


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;4. List what versions of Node are installed:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

nvm &lt;span class="nb"&gt;ls&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now you should see the two versions that you just installed listed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczjveonitj363d1cy9j5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczjveonitj363d1cy9j5.jpg" alt="Ubuntu terminal displaying node installed"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5. Verify that Node.js is installed and the current version:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

node &lt;span class="nt"&gt;--version&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then verify that you have NPM installed as well:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nt"&gt;--version&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  Changing Node Versions
&lt;/h4&gt;

&lt;p&gt;Use the following commands to change the version of Node you would like to use for any given project:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Switch to the Current version:&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

nvm use node


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Switch to the LTS version:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

nvm use &lt;span class="nt"&gt;--lts&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can also use the specific number for any additional versions you've installed:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

nvm use v8.2.1.


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To list all of the versions of Node.js available, use the command: &lt;code&gt;nvm ls-remote&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  NPM
&lt;/h3&gt;

&lt;p&gt;Node Package Manager is the default package manager for Node.js. It is a command-line tool used to download or publish packages and manage the dependencies of a project. There is a searchable repository of all available NPM packages at &lt;a href="https://www.npmjs.com/" rel="noopener noreferrer"&gt;https://www.npmjs.com/&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  New Projects
&lt;/h4&gt;

&lt;p&gt;When creating a new project that will utilize NPM, it must be initialized with the &lt;code&gt;init&lt;/code&gt; command. First, make sure you are in the root directory of your project, and then use the following command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm init


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  package.json
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;npm init&lt;/code&gt; generates a &lt;code&gt;package.json&lt;/code&gt; file and will prompt you for the metadata of your project. This includes things like the name, version, description, and license. You can think of it as the blueprint of your project as it will also contain the packages it depends on. The metadata can be changed at any time by editing the &lt;code&gt;package.json&lt;/code&gt; file after the initialization.&lt;/p&gt;

&lt;p&gt;If you would like to automatically populate the initialization with all the default values, you may add the &lt;code&gt;--yes&lt;/code&gt; flag.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm init &lt;span class="nt"&gt;--yes&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  Installing Modules
&lt;/h4&gt;

&lt;p&gt;Modules are installed via the &lt;code&gt;npm install&lt;/code&gt; or &lt;code&gt;npm i&lt;/code&gt; command. &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install &lt;/span&gt;react


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The above command will install the React module as a dependency in &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We can also install NPM packages globally on our system. This is useful for utilities like command line interfaces.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://yarnpkg.com/" rel="noopener noreferrer"&gt;Yarn&lt;/a&gt; is another widely used node package manager, if we wanted to use it on all our node projects we would need the &lt;code&gt;--global&lt;/code&gt; or &lt;code&gt;-g&lt;/code&gt; flag.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; yarn


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  Dependencies
&lt;/h4&gt;

&lt;p&gt;You can save a module as either a dependency or a developer dependency.&lt;/p&gt;

&lt;p&gt;A dependency would be something that your project cannot function properly without. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--save&lt;/code&gt; flag used to be needed to install modules as a dependency, but it is now done automatically with the &lt;code&gt;install&lt;/code&gt; command. &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save&lt;/span&gt; gray-matter


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Is the same as:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install &lt;/span&gt;gray-matter


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04lmld7kohw0a5xlq99r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04lmld7kohw0a5xlq99r.jpg" alt="VS Code example of the dependencies section of package.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Developer Dependencies
&lt;/h4&gt;

&lt;p&gt;A developer dependency would be the modules used to build the project, not run it. This would include things like linters and testing tools.&lt;/p&gt;

&lt;p&gt;Developer dependencies are added with the &lt;code&gt;--save-dev&lt;/code&gt; or &lt;code&gt;-D&lt;/code&gt; flag. This adds the module to the &lt;code&gt;devDependencies&lt;/code&gt; section of &lt;code&gt;package.json&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save-dev&lt;/span&gt; husky


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe34jyn0rcpcknb00nsu5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe34jyn0rcpcknb00nsu5.jpg" alt="VS Code example of the devDependencies section of package.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Batch Installing
&lt;/h4&gt;

&lt;p&gt;Apart from installing a single module, you can install all modules that are listed as &lt;code&gt;dependencies&lt;/code&gt; and &lt;code&gt;devDependencies&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This will install all modules listed in the &lt;code&gt;package.json&lt;/code&gt; of your current directory. &lt;/p&gt;

&lt;p&gt;If we only wanted to install the dependencies needed to run our project, the &lt;code&gt;--production&lt;/code&gt; flag is used:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--production&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;the &lt;code&gt;--production&lt;/code&gt; flag will only install the modules from the &lt;code&gt;dependencies&lt;/code&gt; section of &lt;code&gt;package.json&lt;/code&gt; and ignore the &lt;code&gt;devDependencies&lt;/code&gt;. The perk of this is notably reducing the size of the &lt;code&gt;node_modules&lt;/code&gt; folder.&lt;/p&gt;

&lt;h4&gt;
  
  
  Uninstalling
&lt;/h4&gt;

&lt;p&gt;Removing modules works in the same way as installing them. Flags will need to be used for any global or developer dependencies.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Dependencies:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm uninstall react


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Developer Dependencies:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm uninstall &lt;span class="nt"&gt;--save-dev&lt;/span&gt; husky


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Global Installs:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm uninstall &lt;span class="nt"&gt;--global&lt;/span&gt; yarn


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  Versioning
&lt;/h4&gt;

&lt;p&gt;Package versions are identified with major, minor, and patch releases. &lt;code&gt;8.1.1&lt;/code&gt; would be major version 8, minor version 1, and patch version 1. &lt;/p&gt;

&lt;p&gt;You can specify an exact version number by using the &lt;code&gt;@&lt;/code&gt; symbol. &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install &lt;/span&gt;react@17.0.1


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Two more symbols we can use are &lt;code&gt;^&lt;/code&gt; and &lt;code&gt;~&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;^&lt;/code&gt; is the latest minor release. &lt;br&gt;
For example, &lt;code&gt;npm install ^8.1.1&lt;/code&gt; specification might install version &lt;code&gt;8.3.1&lt;/code&gt; if that's the latest minor version.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;~&lt;/code&gt; is the latest patch release. &lt;br&gt;
In the same way as minor releases, &lt;code&gt;npm install ~8.1.1&lt;/code&gt; could install version &lt;code&gt;8.1.6&lt;/code&gt; if that's the latest patch version available.&lt;/p&gt;

&lt;p&gt;When using the &lt;code&gt;npm install&lt;/code&gt; or &lt;code&gt;npm i&lt;/code&gt; command, the latest minor version will be used.&lt;/p&gt;

&lt;h4&gt;
  
  
  package-lock.json
&lt;/h4&gt;

&lt;p&gt;The exact package versions will be documented in a generated &lt;code&gt;package-lock.json&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;The values found inside the &lt;code&gt;dependencies&lt;/code&gt; and &lt;code&gt;devDependencies&lt;/code&gt; objects of the &lt;code&gt;package.json&lt;/code&gt; file include a range of acceptable versions of each package to install.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;package-lock.json&lt;/code&gt; is generated by the &lt;code&gt;npm install&lt;/code&gt; command and contains the &lt;em&gt;exact&lt;/em&gt; versions of the dependencies used.&lt;/p&gt;

&lt;h4&gt;
  
  
  Scripts
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;package.json&lt;/code&gt; also contains a &lt;code&gt;scripts&lt;/code&gt; property that can be defined to run command-line tools installed on the current project. This can include things like running tests, formatting your code, and launching a local server. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd23n93eo9edaazllm2tj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd23n93eo9edaazllm2tj.jpg" alt="VS Code example of the scripts section of package.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NPM scripts are run by using the &lt;code&gt;run&lt;/code&gt; command. With the above configuration, you would use the following command to have prettier format your code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm run format


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The keys in the scripts object are the command names and the values are the actual commands.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Check out the official &lt;a href="https://docs.npmjs.com/" rel="noopener noreferrer"&gt;npm&lt;/a&gt; and &lt;a href="https://nodejs.org/en/docs/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; docs for more in-depth guides.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💻 Visual Studio Code
&lt;/h2&gt;

&lt;p&gt;There are many amazing code editors available for free, but Visual Studio Code has become the defacto standard and my personal favorite.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing VS Code
&lt;/h3&gt;

&lt;p&gt;VS Code is available on Windows, macOS, and Linux. You can download the latest Windows installer &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. I recommend using the stable build.&lt;/p&gt;

&lt;h3&gt;
  
  
  Changing the Default Shell
&lt;/h3&gt;

&lt;p&gt;The WSL2 shell can be chosen as the default VS Code terminal by pressing &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;P&lt;/code&gt; and typing/choosing Terminal: Select Default Profile, then selecting zsh:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnoat8j10zq7vhswyli5g.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnoat8j10zq7vhswyli5g.jpeg" alt="VSCode default shell"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Remote Extension
&lt;/h3&gt;

&lt;p&gt;Install the &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl" rel="noopener noreferrer"&gt;Remote - WSL&lt;/a&gt; extension on VS Code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This allows you to use WSL as your integrated development environment and will handle compatibility and pathing for you. &lt;a href="https://code.visualstudio.com/docs/remote/remote-overview" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This extension will also allow you to launch VS Code right from your WSL terminal by using the &lt;code&gt;code&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;If I was inside the root directory of my repository, I would use &lt;code&gt;code .&lt;/code&gt; to launch the entire directory inside VS Code.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;cd &lt;/span&gt;my-project
code &lt;span class="nb"&gt;.&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  More Extensions
&lt;/h3&gt;

&lt;p&gt;The number of extensions available for VS Code can be overwhelming, here are some of the ones I use the most.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer" rel="noopener noreferrer"&gt;Live Server&lt;/a&gt; - Launch a local development server with live reload feature for static &amp;amp; dynamic pages.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack" rel="noopener noreferrer"&gt;Live Share&lt;/a&gt; - Includes everything you need to start collaboratively editing and debugging in real-time.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt; - Quickly glimpse into whom, why, and when a line or code block was changed.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory" rel="noopener noreferrer"&gt;Git History&lt;/a&gt; - View git log, file history, compare branches or commits&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noopener noreferrer"&gt;Prettier&lt;/a&gt; - Prettier is an opinionated code formatter.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint" rel="noopener noreferrer"&gt;ESLint&lt;/a&gt; - Find and fix problems in your JavaScript code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight" rel="noopener noreferrer"&gt;Color Highlight&lt;/a&gt; - This extension styles CSS/web colors found in your document.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one" rel="noopener noreferrer"&gt;Markdown All in One&lt;/a&gt; - Markdown keyboard shortcuts, table of contents, auto preview, and more&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint" rel="noopener noreferrer"&gt;markdownlint&lt;/a&gt; - Markdown linting and style checking for Visual Studio Code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview" rel="noopener noreferrer"&gt;GitHub Markdown Preview&lt;/a&gt; - Adds styling, markdown checkboxes, footnotes, emoji, and YAML preamble.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=WakaTime.vscode-wakatime" rel="noopener noreferrer"&gt;Wakatime&lt;/a&gt; - Metrics, insights, and time tracking automatically generated from your programming activity.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=deerawan.vscode-dash" rel="noopener noreferrer"&gt;Dash&lt;/a&gt; - Dash, Zeal, and Velocity integration in Visual Studio Code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio" rel="noopener noreferrer"&gt;Draw.io Integration&lt;/a&gt; - This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker" rel="noopener noreferrer"&gt;Docker&lt;/a&gt; - Makes it easy to create, manage, and debug containerized applications.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python" rel="noopener noreferrer"&gt;Python&lt;/a&gt; - IntelliSense, Linting, Debugging, Jupyter Notebooks, refactoring, unit tests, and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You will need to install any VS Code extensions for your Remote - WSL. Extensions already installed locally on VS Code will not automatically be available. &lt;a href="https://code.visualstudio.com/docs/remote/wsl#_managing-extensions" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  🍫 Chocolatey
&lt;/h2&gt;

&lt;p&gt;Chocolatey is a package manager like &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;homebrew&lt;/a&gt;, but for Windows.&lt;/p&gt;
&lt;h3&gt;
  
  
  Admin Shell
&lt;/h3&gt;

&lt;p&gt;Before we start the installation process, I want to cover launching an administrative shell from windows. There are a few ways to do this:&lt;/p&gt;
&lt;h4&gt;
  
  
  Option 1
&lt;/h4&gt;

&lt;p&gt;Right-click on the Windows start menu and select Windows Terminal (Admin):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmqzguucwp7aajeotgb92.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmqzguucwp7aajeotgb92.png" alt="Right clicked Windows start menu"&gt;&lt;/a&gt;&lt;br&gt;
Once your terminal loads, click the &lt;code&gt;˅&lt;/code&gt; icon and open a new PowerShell tab. It should say &lt;code&gt;Administrator: Windows PowerShell&lt;/code&gt; in the new tab:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yjofkr8p4pnwfci6mha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yjofkr8p4pnwfci6mha.png" alt="Admin PowerShell"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Option 2
&lt;/h4&gt;

&lt;p&gt;If you have Windows Terminal on your taskbar, &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Right-Click&lt;/code&gt; on the icon and select run as administrator, and then open a new PowerShell tab:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm32t1yumbza4qx767k80.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm32t1yumbza4qx767k80.png" alt="Right click windows terminal icon"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Option 3
&lt;/h4&gt;

&lt;p&gt;Use the search bar from the Start menu and type in &lt;code&gt;powershell&lt;/code&gt;. A link to Run as Administrator will display:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ipt85goj4dnalcxajm8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ipt85goj4dnalcxajm8.png" alt="Search PowerShell from the start menu"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Option 4
&lt;/h4&gt;

&lt;p&gt;Windows Terminal added a new feature where you can launch a PowerShell/Command Prompt profile in an Admin terminal automatically. In the Windows Terminal settings, scroll down to your desired profile and then toggle the &lt;code&gt;Run this profile as Administrator&lt;/code&gt; switch. Now you can skip all the steps above, and the terminal will always launch as admin.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7df9uir316zfm5am5zd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7df9uir316zfm5am5zd.jpg" alt="Admin tab in Windows Terminal"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Installing Chocolatey
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;1. Open an administrative PowerShell terminal and run:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;Get-ExecutionPolicy&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;2. If it returns &lt;code&gt;Restricted&lt;/code&gt;, then run one of the following commands:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;Set-ExecutionPolicy&lt;/span&gt; &lt;span class="nf"&gt;AllSigned&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;Set-ExecutionPolicy&lt;/span&gt; &lt;span class="nf"&gt;Bypass&lt;/span&gt; &lt;span class="nf"&gt;-Scope&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;With PowerShell, you must ensure &lt;code&gt;Get-ExecutionPolicy&lt;/code&gt; is not Restricted. We suggest using &lt;code&gt;Bypass&lt;/code&gt; to bypass the policy to get things installed or &lt;code&gt;AllSigned&lt;/code&gt; for quite a bit more security.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;3. Now run the following command:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;Set-ExecutionPolicy&lt;/span&gt; &lt;span class="nf"&gt;Bypass&lt;/span&gt; &lt;span class="nf"&gt;-Scope&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt; &lt;span class="nf"&gt;-Force;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;System.Net.ServicePointManager&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="nf"&gt;::SecurityProtocol&lt;/span&gt; &lt;span class="nf"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;System.Net.ServicePointManager&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="nf"&gt;::SecurityProtocol&lt;/span&gt; &lt;span class="nf"&gt;-bor&lt;/span&gt; &lt;span class="nf"&gt;3072;&lt;/span&gt; &lt;span class="nf"&gt;iex&lt;/span&gt; &lt;span class="s"&gt;((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you don't see any errors, you are ready to use Chocolatey! Type &lt;code&gt;choco&lt;/code&gt; or &lt;code&gt;choco -?&lt;/code&gt; now, or see &lt;a href="https://docs.chocolatey.org/en-us/getting-started" rel="noopener noreferrer"&gt;Getting Started&lt;/a&gt; for usage instructions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Chocolatey Commands
&lt;/h3&gt;

&lt;p&gt;We use the &lt;code&gt;choco&lt;/code&gt; command to run chocolatey. (&lt;em&gt;Remember, you must use an administrative shell for it to work.&lt;/em&gt;) &lt;/p&gt;

&lt;p&gt;Install a new package:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;install&lt;/span&gt; &lt;span class="nf"&gt;filename&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Remove a package:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;uninstall&lt;/span&gt; &lt;span class="nf"&gt;filename&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;List all of the installed packages:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Update:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;upgrade&lt;/span&gt; &lt;span class="nf"&gt;filename&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;or to update everything at once:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;upgrade&lt;/span&gt; &lt;span class="nf"&gt;all&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Windows Apps
&lt;/h3&gt;

&lt;p&gt;Search for available apps on the &lt;a href="https://community.chocolatey.org/packages" rel="noopener noreferrer"&gt;Community Package Repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here are a few of my favorite (free) apps for productivity and development on Windows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.wox.one/" rel="noopener noreferrer"&gt;Wox&lt;/a&gt; - A full-featured launcher&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://runjs.app/" rel="noopener noreferrer"&gt;RunJs&lt;/a&gt; - JavaScript and TypeScript playground&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://responsively.app" rel="noopener noreferrer"&gt;Responsively&lt;/a&gt; - A modified web browser that helps in responsive web development.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://zealdocs.org/" rel="noopener noreferrer"&gt;Zeal&lt;/a&gt; - the Windows version of Dash&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.figma.com" rel="noopener noreferrer"&gt;Figma&lt;/a&gt; - A collaborative UI design tool&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://app.diagrams.net" rel="noopener noreferrer"&gt;draw.io&lt;/a&gt; - Flowchart maker and diagram software&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://desktop.github.com/" rel="noopener noreferrer"&gt;GitHub Desktop&lt;/a&gt; - A GUI for Git&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; - API tools&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.notion.so/" rel="noopener noreferrer"&gt;Notion&lt;/a&gt; - Project management and note-taking software&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.microsoft.com/en-us/windows/powertoys/?WT.mc_id=twitter-0000-docsmsft" rel="noopener noreferrer"&gt;Microsoft PowerToys&lt;/a&gt; - A set of utilities for power users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can download all these at once with the following command using chocolatey in an admin shell:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight postscript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;choco&lt;/span&gt; &lt;span class="nf"&gt;install&lt;/span&gt; &lt;span class="nf"&gt;wox&lt;/span&gt; &lt;span class="nf"&gt;runjs&lt;/span&gt; &lt;span class="nf"&gt;responsively&lt;/span&gt; &lt;span class="nf"&gt;zeal&lt;/span&gt; &lt;span class="nf"&gt;figma&lt;/span&gt; &lt;span class="nf"&gt;drawio&lt;/span&gt; &lt;span class="nf"&gt;github-desktop&lt;/span&gt; &lt;span class="nf"&gt;postman&lt;/span&gt; &lt;span class="nf"&gt;notion&lt;/span&gt; &lt;span class="nf"&gt;powertoys&lt;/span&gt; &lt;span class="nf"&gt;-y&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h2&gt;
  
  
  🪜 Chrome Extensions
&lt;/h2&gt;

&lt;p&gt;These are all available as &lt;a href="https://addons.mozilla.org/en-US/firefox/extensions/" rel="noopener noreferrer"&gt;Firefox extensions&lt;/a&gt; as well.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi" rel="noopener noreferrer"&gt;React Dev tools&lt;/a&gt; - Adds React debugging tools to the Chrome Developer Tools.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp" rel="noopener noreferrer"&gt;ColorZilla&lt;/a&gt; - Advanced Eyedropper, Color Picker, Gradient Generator, and other colorful goodies&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd" rel="noopener noreferrer"&gt;Axe Accessibility&lt;/a&gt; - Accessibility Checker for Developers, Testers, and Designers in Chrome&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/dailydev-the-homepage-dev/jlmpjdjjbgclbocgajdjefcidcncaied" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; - Get a feed of the hottest developer news personalized to you.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/nimbus-screenshot-screen/bpconcjcammlapcogcnnelfmaeghhagj" rel="noopener noreferrer"&gt;Nimbus Capture&lt;/a&gt; - Screen Capture full Web page or any part.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm" rel="noopener noreferrer"&gt;WhatFont&lt;/a&gt; - With this extension, you could inspect web fonts by just hovering on them.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en" rel="noopener noreferrer"&gt;JSON Formatter&lt;/a&gt; - Makes JSON easy to read.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📚 References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.sitepoint.com/wsl2/" rel="noopener noreferrer"&gt;WSL2 Install Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/windows/terminal/install" rel="noopener noreferrer"&gt;Install and get started setting up Windows Terminal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/stephanlamoureux/series/11364"&gt;Git a Grip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/GitCredentialManager/git-credential-manager" rel="noopener noreferrer"&gt;Git Credential Manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki" rel="noopener noreferrer"&gt;OhMyZsh Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://kevinprogramming.com/using-zsh-in-windows-terminal/" rel="noopener noreferrer"&gt;Using Zsh in Windows Terminal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zsh.sourceforge.io/Guide/zshguide.html" rel="noopener noreferrer"&gt;A User's Guide to the Z-Shell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl" rel="noopener noreferrer"&gt;Installing Node on WSL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chocolatey.org/install" rel="noopener noreferrer"&gt;Chocolatey Install Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How to Target Specific Browsers With CSS</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Fri, 23 Apr 2021 21:40:53 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/how-to-target-specific-browsers-only-with-css-3jog</link>
      <guid>https://forem.com/stephanlamoureux/how-to-target-specific-browsers-only-with-css-3jog</guid>
      <description>&lt;p&gt;Web browsers are built with different rendering engines, and this causes small differences in the way your website appears between browsers. The sizing may be a little different, the colors aren't consistent, and many more things of that nature. &lt;/p&gt;

&lt;p&gt;To counter this, we can use the following CSS to target and style specific browsers. &lt;/p&gt;

&lt;h3&gt;
  
  
  Chrome &amp;amp; Safari (Webkit)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;-webkit-min-device-pixel-ratio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="py"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Firefox
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@-moz-document&lt;/span&gt; &lt;span class="n"&gt;url-prefix&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.class&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="py"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Microsoft Edge
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@supports&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;-ms-ime-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.selector&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="py"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  IE11 and up
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;_&lt;/span&gt;&lt;span class="nd"&gt;:-ms-fullscreen&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="nc"&gt;.ie11up&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
&lt;span class="py"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>css</category>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Git a Grip: Part 3 - Ah, push it 🔊</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Sun, 28 Feb 2021 01:54:18 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/git-a-grip-part-3-ah-push-it-push-it-real-good-2b8d</link>
      <guid>https://forem.com/stephanlamoureux/git-a-grip-part-3-ah-push-it-push-it-real-good-2b8d</guid>
      <description>&lt;p&gt;In the last part, we created a repository on our local system. However, if we want to share our code or collaborate, it needs to be available in a public location. &lt;a href="https://github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; is one of the many hosts that provides this service. Some of the other popular platforms include &lt;a href="https://about.gitlab.com/" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt;, &lt;a href="https://bitbucket.org/" rel="noopener noreferrer"&gt;BitBucket&lt;/a&gt;, and &lt;a href="https://sourceforge.net/" rel="noopener noreferrer"&gt;SourceForge&lt;/a&gt;. GitHub is by far the most popular (and what I use) - that is why I chose it for this series.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a Remote Repository
&lt;/h2&gt;

&lt;p&gt;Now we are going to sync the local 'git-a-grip' repository to GitHub. Head over to GitHub.com, and in the top right corner click the '+' dropdown and select 'New repository'. &lt;/p&gt;

&lt;p&gt;For the repository name make sure it matches the local one, 'git-a-grip'. You can add a description if you like but it's not needed here. &lt;/p&gt;

&lt;p&gt;Keep it public and leave the three checkboxes blank for: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;initialize with a README&lt;/li&gt;
&lt;li&gt;Add .gitignore&lt;/li&gt;
&lt;li&gt;choose a license&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We already have a README file made and the other two will not be used in this lesson. &lt;/p&gt;

&lt;p&gt;Click the 'Create repository' button and on the next page, you will see &lt;em&gt;Quick setup&lt;/em&gt; at the top. Make sure that the HTTPS box is selected and then copy the link to the right of it. This is the address to the remote repository. &lt;/p&gt;

&lt;h4&gt;
  
  
  README
&lt;/h4&gt;

&lt;p&gt;A README file explains what the project is, where to get it, how to use it, and so on.&lt;/p&gt;

&lt;h4&gt;
  
  
  .gitignore
&lt;/h4&gt;

&lt;p&gt;Files that you wish to ignore are saved in a special file named &lt;em&gt;.gitignore&lt;/em&gt;. These will often be files with passwords, hidden system files (like .DS_Store in macOS), and node packages/modules. There is no git command to add or remove files to .gitignore. The file must be edited and committed manually when you wish to make changes. &lt;/p&gt;

&lt;p&gt;Since .gitignore is a dot file, you will have to turn on the hidden files view to see it with your file manager. In the terminal, you must add the &lt;code&gt;-a&lt;/code&gt; flag within the &lt;code&gt;ls&lt;/code&gt; command to show &lt;em&gt;all&lt;/em&gt; files. &lt;/p&gt;

&lt;p&gt;I usually use &lt;code&gt;ls -lah&lt;/code&gt; when displaying files from the command line. &lt;code&gt;-l&lt;/code&gt; is to use &lt;em&gt;long list format&lt;/em&gt;, and &lt;code&gt;-h&lt;/code&gt; stands for &lt;em&gt;human-readable&lt;/em&gt;, which just displays file sizes in a more friendly manner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1egehaipbb1td1bkgmgy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1egehaipbb1td1bkgmgy.png" alt="ls -lah"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Licenses
&lt;/h4&gt;

&lt;p&gt;A software license lets others know what they can and can't do with your source code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Public repositories on GitHub are often used to share open-source software. For your repository to truly be open source, you'll need to license it so that others are free to use, change, and distribute the software.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To make things easier, &lt;a href="https://www.github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; created &lt;a href="https://choosealicense.com/" rel="noopener noreferrer"&gt;choosealicense.com&lt;/a&gt; to help us understand the options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect Local to Remote
&lt;/h2&gt;

&lt;p&gt;Next, open your terminal inside the local repository directory. We are going to tell Git what the remote address is on GitHub. In this example, we only have one remote, but it is possible to have many for the same repo. The primary remote is typically named 'origin'. To add a remote named 'origin' use the &lt;code&gt;git remote&lt;/code&gt; command: &lt;br&gt;
&lt;code&gt;git remote add origin "URL from GitHub"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5dakp39jfi4c2my3adc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5dakp39jfi4c2my3adc.png" alt="git remote"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As shown above, I also used the &lt;code&gt;git remote -v&lt;/code&gt; command. This is how you can view the remote address URL.&lt;/p&gt;

&lt;p&gt;The local repository now knows where the remote repository is located, which means we can send our files to GitHub!&lt;/p&gt;

&lt;h2&gt;
  
  
  Push to Remote
&lt;/h2&gt;

&lt;p&gt;Sending your local changes to a remote is called &lt;em&gt;pushing&lt;/em&gt;. Since we have previously added our README file and committed it, the last step is to use the &lt;code&gt;git push&lt;/code&gt; command. We can push our README file to GitHub by using:&lt;br&gt;
&lt;code&gt;git push origin main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you didn't change your branch name to 'main' earlier, you will have to use 'master' instead. Remember, 'origin' is the name of the remote, and 'main' is the name of the branch. &lt;/p&gt;

&lt;p&gt;Go to your repository's page at GitHub.com and refresh it if needed - you should now see that it matches your local repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3m081luezisghwanz7d6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3m081luezisghwanz7d6.png" alt="git push"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pull
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;git pull&lt;/code&gt; command is used to keep your files up to date by &lt;em&gt;pulling&lt;/em&gt; in changes from other contributors. It finds and downloads the latest changes, and then merges them into the selected branch. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt; is actually two commands - &lt;code&gt;git fetch&lt;/code&gt; and &lt;code&gt;git merge&lt;/code&gt; combined. &lt;/p&gt;

&lt;p&gt;If others were working on this project and we wanted to make sure our local file was up to date, we would use the following command: &lt;code&gt;git pull origin main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If there are no changes, a message will appear that says, "Already up-to-date." Otherwise, the changes will be merged. &lt;/p&gt;

&lt;p&gt;It is also possible to see available changes without pulling them in. This is done by entering: &lt;code&gt;git fetch --dry-run&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We are now properly synced with GitHub - enabling us to push and pull data between local and remote servers. &lt;/p&gt;

&lt;p&gt;Here is a quick recap of the commands we used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls -lah&lt;/code&gt; - long list format, human-readable, and show hidden files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git remote add&lt;/code&gt; - add a new remote address&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git remote -v&lt;/code&gt; - show the current remote address&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git push&lt;/code&gt; - push files to a remote&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git pull&lt;/code&gt; - pull files from remote to local&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git fetch --dry-run&lt;/code&gt; - see what the changes are without pulling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Coming up next, we'll take a quick look into forks and clones.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Git a Grip: Part 2 - Don't Fear Commitment 💍</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Mon, 22 Feb 2021 22:55:00 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/git-a-grip-part-2-don-t-fear-commitment-2ia9</link>
      <guid>https://forem.com/stephanlamoureux/git-a-grip-part-2-don-t-fear-commitment-2ia9</guid>
      <description>&lt;p&gt;In this lesson, we will start using some basic shell commands and the Git CLI (command line interface) to navigate the file system and to create our first repository. We will then cover the different steps taken until a file is officially committed into our local repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Terminal
&lt;/h2&gt;

&lt;p&gt;Before we start working with Git, lets learn a few basic commands to help us move about our system. For this tutorial, the default shell will be fine to use with any operating system, just be aware that they all differ slightly. Windows uses PowerShell, macOS uses Zsh, and Linux typically defaults to Bash. However, if you are running Windows, I would recommend using &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10" rel="noopener noreferrer"&gt;WSL&lt;/a&gt; or Git Bash (comes bundled with the Git Windows installer) instead of PowerShell. &lt;/p&gt;

&lt;h4&gt;
  
  
  Creating our workspace
&lt;/h4&gt;

&lt;p&gt;Open your terminal and enter the command &lt;code&gt;mkdir git-a-grip&lt;/code&gt;.&lt;br&gt;
This will create a new directory named 'git-a-grip' inside of your home folder (unless you have changed your shell's default directory). We will be working in this directory for the rest of the series. Following that up, use the &lt;code&gt;ls&lt;/code&gt; command to display all the files and folders in your current directory. You should see our newly created one.&lt;/p&gt;

&lt;p&gt;Next, change into that new directory by entering &lt;code&gt;cd git-a-grip&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Started
&lt;/h2&gt;

&lt;p&gt;Now that we are inside the 'git-a-grip' directory, we want to tell Git to start tracking any changes here. We simply type the &lt;code&gt;git init&lt;/code&gt; command, and this will initialize Git in our current directory. You should see a message stating "Initialized empty Git repository in [your current location]". Great! Now we have a working repository. A repo (repository) is just a collection of files related to a project. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note that any time we use a command that starts with 'git', we are using the Git CLI, which is just a way to run Git commands through the command line.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Create a README
&lt;/h4&gt;

&lt;p&gt;Open a text editor and create a file with "Hello World!" as its content - or anything else you would like. Save the file as 'README.md' into the 'git-a-grip' directory. We want to save it as markdown because that is what GitHub uses for its readme files. Notice that readme files are generally written in all uppercase, but it will not cause any issues if not. Back inside of your terminal, use the &lt;code&gt;ls&lt;/code&gt; command to confirm that 'README.md' exists in your 'git-a-grip' folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ready For Commitment
&lt;/h2&gt;

&lt;p&gt;Git tracks when files are added, removed, or even when just a single letter inside of a file has changed. It also tracks who made these changes and when they were made.&lt;/p&gt;

&lt;h4&gt;
  
  
  Tracking
&lt;/h4&gt;

&lt;p&gt;Since we have created a new file inside of our repository, let's check that Git has tracked this change. Inside of your 'git-a-grip' directory, check the status by entering &lt;code&gt;git status&lt;/code&gt;. This should return a message that shows there is an untracked file called README.md and that we should use "git add" to track.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftcenq7kpq6xg1q101amc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftcenq7kpq6xg1q101amc.png" alt="git status"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Staging
&lt;/h4&gt;

&lt;p&gt;Before our new file is committed, there is an intermediary step called staging that takes place. This is where you select all the changes you would like to go forward with. &lt;a href="https://softwareengineering.stackexchange.com/a/119790/385595" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is an answer from StackExchange that sums it up perfectly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Say you are working on two features - one is finished, and one still needs some work done. You would like to make a commit and go home (5 o'clock, finally!) but would not like to commit the parts of the second feature, which is not done yet. You stage the parts you know belong to the first feature, and commit. Now, your commit is your project with the first feature done, while the second is still in work-in-progress in your working directory.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To stage our README.md file, enter the &lt;code&gt;git add README.md&lt;/code&gt; command from inside of your repository's directory. Running the &lt;code&gt;git status&lt;/code&gt; command will now show that there is one new file ready to be committed. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe1bdoawl079tnvfbzc5k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe1bdoawl079tnvfbzc5k.png" alt="git add"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Adding multiple files
&lt;/h5&gt;

&lt;p&gt;If you wanted to stage multiple files at once, you only need to add a space between file names: &lt;code&gt;git add file-1 file-2 file-3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To add &lt;strong&gt;ALL&lt;/strong&gt; files, it just takes a period: &lt;code&gt;git add .&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Uh-oh
&lt;/h5&gt;

&lt;p&gt;But what if you made a mistake and staged the wrong file? That problem is easily fixed with a single command: &lt;code&gt;git rm --cached README.md&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;git rm --cached&lt;/code&gt; the file is removed from staging, but the file itself is not deleted from the working directory. Test it out for yourself! Remove the README.md file, run &lt;code&gt;git status&lt;/code&gt;, add the file back again, &lt;code&gt;git status&lt;/code&gt; one last time and see how it all works. &lt;/p&gt;

&lt;h4&gt;
  
  
  Committing
&lt;/h4&gt;

&lt;p&gt;We are finally ready to commit our file. To do so, use the following command: &lt;code&gt;git commit -m "Created README"&lt;/code&gt;. The "-m" flag stands for "message", it's important to put a detailed description with each one of your commits. You will thank yourself later and if other developers look at the commit history it helps to see more than "I hope this works" in the description.  &lt;/p&gt;

&lt;p&gt;If you make a typo or want to change your description, use the following command to edit your commit message:&lt;br&gt;
&lt;code&gt;git commit --amend -m "New message"&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  More changes
&lt;/h4&gt;

&lt;p&gt;Open your README.md file, add another line to it and save. We can view the difference between the file now and from its last commit with the &lt;code&gt;git diff&lt;/code&gt; command. You should see a + sign displaying the updated content. You may have to hit the 'Q' key on your keyboard to close the git diff message.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww5s9ombr8wq58t0i582.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww5s9ombr8wq58t0i582.png" alt="git diff"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git status&lt;/code&gt; shows us that the README.md file has been modified. Stage and commit your latest change again, and that is it for now!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We have gone over the basics of creating a local repository and learned a few Git commands. &lt;/p&gt;

&lt;p&gt;Here is a quick reference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt; - make directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; - change directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; - list files and folders&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git init&lt;/code&gt; - initializes a new repository&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git status&lt;/code&gt; - shows any changes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git add&lt;/code&gt; - stages your files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git rm --cache "filename"&lt;/code&gt; - unstages the file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git commit -m "message"&lt;/code&gt; - commits your changes with a description&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git diff&lt;/code&gt; - the difference from your last commit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In part 3, we will learn about connecting our local repository to a remote one and pushing the changes there. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Git a Grip: Part 1 - Initial Setup 💻</title>
      <dc:creator>Stephan Lamoureux</dc:creator>
      <pubDate>Fri, 19 Feb 2021 03:29:30 +0000</pubDate>
      <link>https://forem.com/stephanlamoureux/git-a-grip-part-1-initial-setup-5c3k</link>
      <guid>https://forem.com/stephanlamoureux/git-a-grip-part-1-initial-setup-5c3k</guid>
      <description>&lt;p&gt;The goal of this series is to create small, easy-to-digest lessons that get progressively more in-depth. Hopefully, this can turn into a quick reference guide while also being a non-intimidating way to learn Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Git?
&lt;/h2&gt;

&lt;p&gt;In this article, we will be going over the basic steps to get you started with Git and GitHub. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://git-scm.com/"&gt;Git&lt;/a&gt; is a free open-source version control program written by the creator of Linux, Linus Torvalds. It is used for keeping track of changes in files and coordinating work among programmers who are collaboratively developing software.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;No matter which operating system you use, installing Git is usually as simple as downloading a single file. In some cases, you may already have it installed on your computer. &lt;/p&gt;

&lt;p&gt;If you are unsure if you already have Git installed or want to check which version you currently have, type &lt;code&gt;git --version&lt;/code&gt; into your terminal to find out. It should return something like &lt;code&gt;git version 2.30.1&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Windows
&lt;/h4&gt;

&lt;p&gt;The Windows operating system does not come with Git pre-installed, but here are two simple ways to install it onto your PC:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download Git from &lt;a href="https://git-scm.com/"&gt;https://git-scm.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install with &lt;a href="https://chocolatey.org/"&gt;chocolatey&lt;/a&gt; by entering &lt;code&gt;choco install git -y&lt;/code&gt; into the terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If installing via chocolatey, remember to open Power Shell as an administrator. You can do this by right-clicking on the Start menu and selecting &lt;em&gt;Power Shell (Admin)&lt;/em&gt;. If you have the Power Shell pinned to your taskbar, you can also hold down the Shift key and right-click the icon to select &lt;em&gt;Run as administrator&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  macOS
&lt;/h4&gt;

&lt;p&gt;macOS already comes with Git pre-installed, however, it is most likely an older version. To get the latest version use one of the following methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download Git from &lt;a href="https://git-scm.com/"&gt;https://git-scm.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install with &lt;a href="https://brew.sh/"&gt;homebrew&lt;/a&gt; by entering &lt;code&gt;brew install git&lt;/code&gt; into the terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Linux
&lt;/h4&gt;

&lt;p&gt;There is a good chance that Git will already be on most Linux distributions. If not, there is an official &lt;a href="https://git-scm.com/download/linux"&gt;install guide&lt;/a&gt; for most of the popular distros.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub
&lt;/h2&gt;

&lt;p&gt;GitHub is essentially Git for the cloud. It gives you a safe place to store your code and makes collaboration easier. It has all of the standard features of Git along with many more added-in. Arguably one of its biggest features is its social networking, which allows users from all around the globe to share their work and contribute to others. &lt;/p&gt;

&lt;h4&gt;
  
  
  Create a GitHub account
&lt;/h4&gt;

&lt;p&gt;If you don't have an account yet, signing up at &lt;a href="https://github.com/"&gt;https://github.com/&lt;/a&gt; is painless. Also, if you are a student make sure to apply for the &lt;a href="https://education.github.com/pack"&gt;Github Student Developer Pack&lt;/a&gt;. It provides a TON of high-quality free resources including a GitHub Pro account, Frontend Masters subscription, free domain names, and much more! &lt;/p&gt;

&lt;h4&gt;
  
  
  GitHub Desktop
&lt;/h4&gt;

&lt;p&gt;While you are there, you might as well download the &lt;a href="https://desktop.github.com/"&gt;GitHub Desktop&lt;/a&gt; application too. It is very useful and quite easy to use. Just be aware that this app cannot do everything that Git is capable of and we will be using the command line only in this series. Currently, it is only officially available for macOS and Windows, but there are some workarounds to get it on a few of the Linux distros. Check out &lt;a href="https://dev.to/rahedmir/is-github-desktop-available-for-gnu-linux-4a69"&gt;this&lt;/a&gt; DEV article on installation instructions for Debian/Ubuntu and Red Hat/CentOS/Fedora distributions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure
&lt;/h2&gt;

&lt;p&gt;We're almost finished with our initial setup. The last thing we need to do is configure Git to associate our work with ourselves. Open up your terminal and enter the following commands to update your Git profile:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Set your name:&lt;br&gt;&lt;br&gt;
&lt;code&gt;git config --global user.name "Your Name"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add your email address:&lt;br&gt;&lt;br&gt;
&lt;code&gt;git config --global user.email "youremail@address.com"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Link to your GitHub account:&lt;br&gt;&lt;br&gt;
&lt;code&gt;git config --global user.username "github username"&lt;/code&gt; (case sensitive!)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Make sure you are inputting &lt;code&gt;user.username&lt;/code&gt; and not &lt;code&gt;user.name&lt;/code&gt; otherwise you will overwrite your name and you will not be correctly synced to your GitHub account.&lt;/p&gt;

&lt;p&gt;You can double-check any of your settings by typing &lt;code&gt;git config --global user.name&lt;/code&gt; and so on. To make any changes just type the necessary command again as mentioned in steps 1-3 to overwrite.&lt;/p&gt;

&lt;p&gt;One last configuration I make is to change the name of the initial branch from 'master' to 'main'. I'd rather use more inclusive terms when possible, and another popular name to use for it is 'trunk'. We will go over branches in depth later but for now, here is how to do this:&lt;br&gt;&lt;br&gt;
&lt;code&gt;git config --global init.defaultBranch main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Edit: The above method only works after you have made your first commit.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Another way to do this without having to commit first is found &lt;a href="https://stackoverflow.com/a/64769110/8298834"&gt;here.&lt;/a&gt; These are the steps listed in the post:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the directory where your project sits.&lt;/li&gt;
&lt;li&gt;In it, show hidden files since, by default, .git would be hidden.&lt;/li&gt;
&lt;li&gt;Inside .git, there is a file, HEAD, open it in a text editor.&lt;/li&gt;
&lt;li&gt;You'd see, ref: refs/heads/master. Simple enough, change, master to main.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;That should cover everything we need to get started, I'll see you in the next article where we will learn some basic terminal commands and create our first repository. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
