{"id":37942,"date":"2024-02-28T08:40:40","date_gmt":"2024-02-28T08:40:40","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=37942"},"modified":"2024-05-02T05:26:14","modified_gmt":"2024-05-02T05:26:14","slug":"fixed-bash-ng-command-not-found-error","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/","title":{"rendered":"[Fixed] \u201cbash: ng: command not found\u201d Error"},"content":{"rendered":"<p style=\"text-align: justify;\">The \u201cng: command not found\u201d error in Bash indicates that the <strong>Angular CLI<\/strong> is either not installed or inaccessible. To fix this error, install Angular CLI using:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt update &amp;&amp; sudo apt install -y nodejs npm\nsudo npm install -g @angular\/cli<\/code><\/pre>\n<p style=\"text-align: justify;\">The \u201cng\u201d is a powerful tool for developing Angular applications. It provides a set of commands and functionalities to scaffold, build, test, and deploy Angular applications. However, encountering &#8220;bash: ng: command not found&#8221; indicates that either the Angular command-line tool is not installed on your system or the PATH variable is not set for ng. Let\u2019s see the reasons for this error in detail and explore the possible fixes.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#Reasons_for_%E2%80%9Cng_command_not_found%E2%80%9D_Error_in_Bash\" >Reasons for \u201cng: command not found\u201d Error in Bash<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#4_Methods_to_Solve_%E2%80%9Cbash_ng_command_not_found%E2%80%9D_Error\" >4 Methods to Solve \u201cbash: ng: command not found\u201d Error<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#1_Install_Angular_CLI\" >1. Install Angular CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#2_Link_%E2%80%9Cnpm%E2%80%9D_to_Angular_CLI\" >2. Link \u201cnpm\u201d to Angular CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#3_Set_%E2%80%9Cng%E2%80%9D_PATH_Variable\" >3. Set \u201cng\u201d PATH Variable<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#4_Set_an_Alias_to_%E2%80%9Cng%E2%80%9D\" >4. Set an Alias to \u201cng\u201d<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#How_to_Solve_%E2%80%9Cng_command_not_found%E2%80%9D_Error_in_MacOS\" >How to Solve \u201cng command not found\u201d Error in MacOS?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#People_Also_Ask\" >People Also Ask<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#What_to_do_when_ng_command_is_not_working\" >What to do when ng command is not working?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#How_to_install_ng_for_Angular\" >How to install ng for Angular?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#What_is_the_Ng_command\" >What is the Ng command?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#How_do_I_use_ng_command_locally\" >How do I use ng command locally?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#What_is_the_use_of_ng_command\" >What is the use of ng command?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#How_to_Solve_%E2%80%9Csudo_ng_command_not_found%E2%80%9D_in_Linux\" >How to Solve \u201csudo: ng: command not found\u201d in Linux?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Reasons_for_%E2%80%9Cng_command_not_found%E2%80%9D_Error_in_Bash\"><\/span>Reasons for \u201cng: command not found\u201d Error in Bash<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Some common reasons for the \u201cng\u201d command not found error are:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>Angular CLI not Installed: <\/strong>If you are unable to use the &#8220;ng&#8221; command, it could be that your system does not have Angular CLI installed.<\/li>\n<li style=\"text-align: justify;\"><strong>js and npm not Installed:<\/strong> Angular CLI depends on Node.js and npm. Make sure they are installed on your system.<\/li>\n<li style=\"text-align: justify;\"><strong>Incorrect Path: <\/strong>The PATH on your system may not contain \u201cng\u201d.<\/li>\n<li style=\"text-align: justify;\"><strong>Inadequate Permissions: <\/strong>\u201cng\u201d might not have the authorization it needs to function.<\/li>\n<li style=\"text-align: justify;\"><strong>Binary Not Found:<\/strong> The Angular binary might be missing or corrupted.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"4_Methods_to_Solve_%E2%80%9Cbash_ng_command_not_found%E2%80%9D_Error\"><\/span>4 Methods to Solve \u201cbash: ng: command not found\u201d Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Follow the below methods to solve the ng command not found error in Bash:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_Install_Angular_CLI\"><\/span>1. Install Angular CLI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Most of the time, the absence of <strong>Angular CLI<\/strong> on your system causes the &#8220;bash: ng: command not found&#8221; error. In this instance, <a href=\"https:\/\/linuxsimply.com\/linux-basics\/package-management\/package-manager-examples\/apt\/\" target=\"_blank\" rel=\"noopener\"><strong>APT<\/strong><\/a> in Ubuntu, <a href=\"https:\/\/linuxsimply.com\/linux-basics\/package-management\/package-manager-examples\/yum\/\" target=\"_blank\" rel=\"noopener\"><strong>YUM<\/strong><\/a> in RedHat, and <a href=\"https:\/\/linuxsimply.com\/linux-basics\/package-management\/package-manager-examples\/pacman\/\" target=\"_blank\" rel=\"noopener\"><strong>Pacman<\/strong><\/a> in Arch Linux can install it on your system. To do that, follow the steps:<\/p>\n<ol>\n<li>Press <strong>CTRL+ALT+T <\/strong>to open the terminal in Ubuntu.<\/li>\n<li>Update the repository using <code class=\"\" data-line=\"\">sudo apt update<\/code>.<\/li>\n<li>Run the command to install npm (Node Package Manager) in Ubuntu:\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt install -y nodejs npm<\/code><\/pre>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-37948\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/1-install-npm.png\" alt=\"installing nodejs and npm using apt\" width=\"825\" height=\"448\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/1-install-npm.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/1-install-npm-300x163.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/1-install-npm-768x417.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<li>Now, run the below command to install Angular CLI globally:\n<pre><code class=\"language-bash\" data-line=\"\">sudo npm install -g @angular\/cli<\/code><\/pre>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-37949\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/2-install-angular-cli.png\" alt=\"installing angular cli using npm\" width=\"825\" height=\"519\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/2-install-angular-cli.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/2-install-angular-cli-300x189.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/2-install-angular-cli-768x483.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<li>Execute <code class=\"\" data-line=\"\">ng --version<\/code> to verify the installation.<img decoding=\"async\" class=\"aligncenter size-full wp-image-37950\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/3-ng-version.png\" alt=\"executing ng --version\" width=\"825\" height=\"208\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/3-ng-version.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/3-ng-version-300x76.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/3-ng-version-768x194.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<\/ol>\n<p>Now, the ng command is executed successfully.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Link_%E2%80%9Cnpm%E2%80%9D_to_Angular_CLI\"><\/span>2. Link \u201cnpm\u201d to Angular CLI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To fix the &#8220;ng: command not found&#8221; error, you can create a link between npm and Angular CLI. Here&#8217;s how to do it:<\/p>\n<ol>\n<li>Go to the directory where your Angular CLI project is located.<\/li>\n<li>Run the following command to link the Angular CLI globally:\n<pre><code class=\"language-bash\" data-line=\"\">npm link @angular\/cli<\/code><\/pre>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37951\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/4-npm-link-to-cli.png\" alt=\"creating link from npm to angular cli\" width=\"825\" height=\"598\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/4-npm-link-to-cli.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/4-npm-link-to-cli-300x217.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/4-npm-link-to-cli-768x557.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<\/li>\n<\/ol>\n<p>The above command establishes a symbolic link between the Angular CLI package and the npm global directory, allowing you to use the ng command globally from any terminal session.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_Set_%E2%80%9Cng%E2%80%9D_PATH_Variable\"><\/span>3. Set \u201cng\u201d PATH Variable<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">A prevalent reason behind the \u201cng command not found\u201d is it is not present in your system PATH environment variables. To set the PATH variable for \u201cng\u201d, follow the steps below:<\/p>\n<ol>\n<li>Press <strong>CTRL+ALT+T <\/strong>to open the terminal.<\/li>\n<li>Use <a href=\"https:\/\/linuxsimply.com\/which-command-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>which command<\/strong><\/a> to check the current path of ng:\n<pre><code class=\"language-bash\" data-line=\"\">which ng<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37952\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/5-which-ng.png\" alt=\"executing which ng\" width=\"593\" height=\"141\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/5-which-ng.png 593w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/5-which-ng-300x71.png 300w\" sizes=\"(max-width: 593px) 100vw, 593px\" \/><\/li>\n<li>Open bashrc file using:\n<pre><code class=\"language-bash\" data-line=\"\">nano ~\/.bashrc<\/code><\/pre>\n<\/li>\n<li style=\"text-align: justify;\">Now, replace <strong>&lt;path to ng&gt;<\/strong> in <code class=\"\" data-line=\"\">export PATH=$PATH:&lt;path to ng&gt;<\/code> code with the <strong>which<\/strong> command\u2019s output and paste it at the end of the file. For example:\n<pre><code class=\"language-bash\" data-line=\"\">export PATH=$PATH:\/usr\/local\/bin\/ng<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37953\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/6-add-path-variable.png\" alt=\"adding ng path variable to bashrc file\" width=\"825\" height=\"530\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/6-add-path-variable.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/6-add-path-variable-300x193.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/6-add-path-variable-768x493.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<li>Press <strong>CTRL+S <\/strong>to save, and <strong>CTRL+X<\/strong> to exit.<\/li>\n<li>Then, execute the <strong>.bashrc<\/strong> file using:\n<pre><code class=\"language-bash\" data-line=\"\">source ~\/.bashrc<\/code><\/pre>\n<\/li>\n<li>Now you can check running a <strong>ng<\/strong> command. For example:\n<pre><code class=\"language-bash\" data-line=\"\">ng --version<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37954\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/7-source-bashrc.png\" alt=\"executing bashrc file and checking ng version\" width=\"825\" height=\"248\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/7-source-bashrc.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/7-source-bashrc-300x90.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/7-source-bashrc-768x231.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<\/ol>\n<p>After adding the path, the ng command ran without raising any error.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_Set_an_Alias_to_%E2%80%9Cng%E2%80%9D\"><\/span>4. Set an Alias to \u201cng\u201d<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To fix the &#8220;ng: command not found&#8221; error, you can create a temporary solution by setting up an alias for ng. Here&#8217;s how you can do it:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">echo &quot;alias ng=&#039;$(which ng)&#039;&quot; &gt;&gt; ~\/.bashrc; . ~\/.bashrc<\/code><\/pre>\n<p style=\"text-align: justify;\">This command appends an <a href=\"https:\/\/linuxsimply.com\/alias-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>alias<\/strong><\/a> for the ng command to the <strong>~\/.bashrc <\/strong>file and immediately applies the changes in the current terminal session. The alias ensures that the ng command points to the correct path by using the <code class=\"\" data-line=\"\">$(which ng)<\/code> syntax, which dynamically retrieves the actual path to the ng executable.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Solve_%E2%80%9Cng_command_not_found%E2%80%9D_Error_in_MacOS\"><\/span>How to Solve \u201cng command not found\u201d Error in MacOS?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">To solve \u201cng: command not found\u201d error in MacOS, follow the steps below:<\/p>\n<ol>\n<li>\n<p style=\"text-align: justify;\">First, open your Mac terminal and run <code class=\"\" data-line=\"\">ng --version<\/code> to check whether Angular is installed or not. If Angular CLI is installed, this command will display information about the installed Angular CLI version.<\/p>\n<\/li>\n<li>If it&#8217;s not installed, run the below command to install it:\n<pre><code class=\"language-bash\" data-line=\"\">npm install -g @angular\/cli<\/code><\/pre>\n<p style=\"text-align: justify;\">However, if you get the error even after installing Angular CLI, here\u2019s how to solve it:<\/p>\n<\/li>\n<li>Open the paths file using:\n<pre><code class=\"language-bash\" data-line=\"\">sudo vim ~\/etc\/paths<\/code><\/pre>\n<\/li>\n<li>Enter the user password if prompted.<\/li>\n<li>Press <strong>Fn+i <\/strong>to enable insert mode.<\/li>\n<li>Paste the below line at the end:\n<pre><code class=\"language-bash\" data-line=\"\">~\/.npm-global\/bin<\/code><\/pre>\n<\/li>\n<li>Press <strong>ESC <\/strong>and type <strong>:wq <\/strong>to save the file.<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In conclusion, resolving the &#8220;bash: ng: command not found&#8221; issue involves ensuring the installation of <strong>Angular CLI<\/strong> and configuring the system&#8217;s <strong>PATH<\/strong> appropriately. Applying these solutions allows you to seamlessly access ng commands within the Bash environment and streamline various aspects of Angular development which are an integral part of the Angular development workflow.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"People_Also_Ask\"><\/span>People Also Ask<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"What_to_do_when_ng_command_is_not_working\"><\/span>What to do when ng command is not working?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Ensure Angular CLI is installed globally If not, install it using <code class=\"\" data-line=\"\">npm install -g @angular\/cli<\/code>. Then confirm the Angular CLI installation using <code class=\"\" data-line=\"\">ng --version<\/code>. Also, you can run <code class=\"\" data-line=\"\">echo $PATH<\/code> to ensure the npm global binary directory is in the PATH.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_to_install_ng_for_Angular\"><\/span>How to install ng for Angular?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To install Angular CLI (ng), open a terminal or command prompt and run <code class=\"\" data-line=\"\">sudo npm install -g @angular\/cli<\/code>. After that, use <code class=\"\" data-line=\"\">ng --version<\/code> to confirm the installation by checking the Angular CLI version.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_Ng_command\"><\/span>What is the Ng command?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The ng command is associated with the Angular CLI (Command Line Interface). It streamlines various tasks in Angular development, such as project creation, component generation, server start, building, testing, and more. It streamlines Angular development tasks by providing a set of commands to manage and scaffold Angular projects efficiently.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_use_ng_command_locally\"><\/span>How do I use ng command locally?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To use the ng command locally in an Angular project, open a terminal and navigate to your Angular project&#8217;s root directory. Then, execute ng commands directly within your project, for example: <code class=\"\" data-line=\"\">ng generate component my-component<\/code>. This runs the ng generate command locally for your Angular project.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_use_of_ng_command\"><\/span>What is the use of ng command?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The ng command is the Angular CLI (Command Line Interface) used for various tasks in Angular development, including:<\/p>\n<ol>\n<li>Create new Angular projects: <code class=\"\" data-line=\"\">ng new &lt;project-name&gt;<\/code><\/li>\n<li>Generate components: <code class=\"\" data-line=\"\">ng generate component &lt;component-name&gt;<\/code><\/li>\n<li>Generate modules: <code class=\"\" data-line=\"\">ng generate module &lt;module-name&gt;<\/code><\/li>\n<li>Generate services: <code class=\"\" data-line=\"\">ng generate service &lt;service-name&gt;<\/code><\/li>\n<li>Start a development server: <code class=\"\" data-line=\"\">ng serve<\/code><\/li>\n<li>Build the application for deployment: <code class=\"\" data-line=\"\">ng build<\/code><\/li>\n<li>Run unit tests: <code class=\"\" data-line=\"\">ng test<\/code><\/li>\n<li>Lint code for style and syntax: <code class=\"\" data-line=\"\">ng lint<\/code><\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"How_to_Solve_%E2%80%9Csudo_ng_command_not_found%E2%80%9D_in_Linux\"><\/span>How to Solve \u201csudo: ng: command not found\u201d in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To solve &#8220;sudo: ng: command not found&#8221; in Linux, use sudo with full path. The syntax is:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo $(which ng) [command]<\/code><\/pre>\n<p>If you still find the error, follow the steps:<\/p>\n<ol>\n<li>Install nodejs and npm:\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt update &amp;&amp; sudo apt install -y nodejs npm<\/code><\/pre>\n<\/li>\n<li>Install Angular CLI globally:\n<pre><code class=\"language-bash\" data-line=\"\">sudo npm install -g @angular\/cli<\/code><\/pre>\n<\/li>\n<li>Confirm npm global binary directory is in <strong>sudo&#8217;s secure_path<\/strong>.<\/li>\n<\/ol>\n<p><script type=\"application\/ld+json\">\n    {\n      \"@context\": \"https:\/\/schema.org\",\n      \"@type\": \"FAQPage\",\n      \"mainEntity\": [{\n                \"@type\": \"Question\",\n                \"name\": \"What to do when ng command is not working?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"Ensure Angular CLI is installed globally If not, install it using <code class=\"\" data-line=\"\">npm install -g @angular\/cli<\/code>. Then confirm the Angular CLI installation using <code class=\"\" data-line=\"\">ng --version<\/code>. Also, you can run <code class=\"\" data-line=\"\">echo $PATH<\/code> to ensure the npm global binary directory is in the PATH.\"\n}\n},{\n                \"@type\": \"Question\",\n                \"name\": \"How to install ng for Angular?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"To install Angular CLI (ng), open a terminal or command prompt and run <code class=\"\" data-line=\"\">sudo npm install -g @angular\/cli<\/code>. After that, use <code class=\"\" data-line=\"\">ng --version<\/code> to confirm the installation by checking the Angular CLI version.\"\n}\n},{\n                \"@type\": \"Question\",\n                \"name\": \"What is the Ng command?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"The ng command is associated with the Angular CLI (Command Line Interface). It streamlines various tasks in Angular development, such as project creation, component generation, server start, building, testing, and more. It streamlines Angular development tasks by providing a set of commands to manage and scaffold Angular projects efficiently.\"\n}\n},{\n                \"@type\": \"Question\",\n                \"name\": \"How do I use ng command locally?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"To use the ng command locally in an Angular project, open a terminal and navigate to your Angular project's root directory. Then, execute ng commands directly within your project, for example: <code class=\"\" data-line=\"\">ng generate component my-component<\/code>. This runs the ng generate command locally for your Angular project.\"\n}\n}]\n}\n<\/script><\/p>\n<p><span style=\"font-size: 18pt; color: #003366;\"><strong>Related Articles<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/sudo\/\" target=\"_blank\" rel=\"noopener\">[Fixed] \u201cbash: sudo: command not found\u201d Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/yarn\/\" target=\"_blank\" rel=\"noopener\">[Solved] Bash \u201cyarn\u201d Command Not Found Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/docker\/\" target=\"_blank\" rel=\"noopener\">[Solved] Bash \u201cdocker\u201d Command Not Found Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/java\/\" target=\"_blank\" rel=\"noopener\">[Fixed] \u201cbash: java: command not found\u201d Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/yum\/\" target=\"_blank\" rel=\"noopener\">Solved \u201cbash: yum: command not found\u201d [RHEL, Fedora, CentOS]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/vim\/\" target=\"_blank\" rel=\"noopener\">[Solved] \u201cbash: vim: command not found\u201d Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/curl\/\" target=\"_blank\" rel=\"noopener\">[Fixed] \u201cbash: curl: command not found\u201d Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/node\/\" target=\"_blank\" rel=\"noopener\">[Solved] \u201cbash: node: command not found\u201d Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/code\/\" target=\"_blank\" rel=\"noopener\">[Solved] \u201cbash: code: command not found\u201d Error<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/systemctl\/\" target=\"_blank\" rel=\"noopener\">[Fixed!] \u201csystemctl command not found\u201d Error in Linux<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<p><strong>&lt;&lt; Go Back to <span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;[Solved] \u201cbash: command not found\u201d Error&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1074113,&quot;3&quot;:{&quot;1&quot;:0},&quot;9&quot;:1,&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;16&quot;:12,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/\" target=\"_blank\" rel=\"noopener\">[Solved] \u201cbash: command not found\u201d Error<\/a><\/span> | <span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Bash Error Handling and Debugging&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1074113,&quot;3&quot;:{&quot;1&quot;:0},&quot;9&quot;:1,&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;16&quot;:12,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/\" target=\"_blank\" rel=\"noopener\">Bash Error Handling and Debugging<\/a><\/span> | <span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Bash Scripting Tutorial&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1074113,&quot;3&quot;:{&quot;1&quot;:0},&quot;9&quot;:1,&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;16&quot;:12,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/\" target=\"_blank\" rel=\"noopener\">Bash Scripting Tutorial<\/a><\/span><\/strong><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;37942&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;[Fixed] \u201cbash: ng: command not found\u201d Error&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">Rate this post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>The \u201cng: command not found\u201d error in Bash indicates that the Angular CLI is either not installed or inaccessible. To &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"[Fixed] \u201cbash: ng: command not found\u201d Error\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#more-37942\" aria-label=\"Read more about [Fixed] \u201cbash: ng: command not found\u201d Error\">Read more<\/a><\/p>\n","protected":false},"author":314911,"featured_media":37947,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102],"tags":[200],"class_list":["post-37942","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash-scripting","tag-command-not-found","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[Fixed] \u201cbash: ng: command not found\u201d Error - LinuxSimply<\/title>\n<meta name=\"description\" content=\"Learn quick solution methods for resolving &#039;ng command not found&#039; in Bash by installing Angular CLI, setting the PATH variable, and aliasing.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Fixed] \u201cbash: ng: command not found\u201d Error - LinuxSimply\" \/>\n<meta property=\"og:description\" content=\"Learn quick solution methods for resolving &#039;ng command not found&#039; in Bash by installing Angular CLI, setting the PATH variable, and aliasing.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/profile.php?id=100015393011530&amp;mibextid=ZbWKwL\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-28T08:40:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-02T05:26:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/0-ng-command-not-found.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ashikur Rahman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashikur Rahman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/\"},\"author\":{\"name\":\"Ashikur Rahman\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/a2f48e791486fbce8f957b47a92acbd4\"},\"headline\":\"[Fixed] \u201cbash: ng: command not found\u201d Error\",\"datePublished\":\"2024-02-28T08:40:40+00:00\",\"dateModified\":\"2024-05-02T05:26:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/\"},\"wordCount\":1161,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/0-ng-command-not-found.png\",\"keywords\":[\"command not found\"],\"articleSection\":[\"Bash Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/\",\"name\":\"[Fixed] \u201cbash: ng: command not found\u201d Error - LinuxSimply\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/0-ng-command-not-found.png\",\"datePublished\":\"2024-02-28T08:40:40+00:00\",\"dateModified\":\"2024-05-02T05:26:14+00:00\",\"description\":\"Learn quick solution methods for resolving 'ng command not found' in Bash by installing Angular CLI, setting the PATH variable, and aliasing.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/0-ng-command-not-found.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/0-ng-command-not-found.png\",\"width\":400,\"height\":400,\"caption\":\"ng command not found in Bash\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/ng\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bash Scripting Tutorial\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Bash Error Handling and Debugging\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"[Solved] \\\"bash: command not found\\\" Error\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/error-handling-and-debugging\\\/command-not-found\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"[Fixed] \u201cbash: ng: command not found\u201d Error\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/a2f48e791486fbce8f957b47a92acbd4\",\"name\":\"Ashikur Rahman\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Ashikur-Rahman-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Ashikur-Rahman-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Ashikur-Rahman-II-96x96.png\",\"caption\":\"Ashikur Rahman\"},\"description\":\"Hello, I\u2019m Ashikur Rahman, currently working as a Linux Content Developer Executive at SOFTEKO. I have completed my graduation in Computer Science and Engineering from Khulna University of Engineering &amp; Technology (KUET). Also, I\u2019m pursuing my master\u2019s in the same department at Bangladesh University of Engineering &amp; Technology (BUET). I like to learn new technologies, contribute, and share those with others. Here my goal is to provide beneficial and user-friendly articles on Linux distribution for everyone. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/profile.php?id=100015393011530&mibextid=ZbWKwL\",\"https:\\\/\\\/linkedin.com\\\/in\\\/ashikur-rahman-kuet\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/ashik\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Fixed] \u201cbash: ng: command not found\u201d Error - LinuxSimply","description":"Learn quick solution methods for resolving 'ng command not found' in Bash by installing Angular CLI, setting the PATH variable, and aliasing.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/","og_locale":"en_US","og_type":"article","og_title":"[Fixed] \u201cbash: ng: command not found\u201d Error - LinuxSimply","og_description":"Learn quick solution methods for resolving 'ng command not found' in Bash by installing Angular CLI, setting the PATH variable, and aliasing.","og_url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/profile.php?id=100015393011530&mibextid=ZbWKwL","article_published_time":"2024-02-28T08:40:40+00:00","article_modified_time":"2024-05-02T05:26:14+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/0-ng-command-not-found.png","type":"image\/png"}],"author":"Ashikur Rahman","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ashikur Rahman","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/"},"author":{"name":"Ashikur Rahman","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/a2f48e791486fbce8f957b47a92acbd4"},"headline":"[Fixed] \u201cbash: ng: command not found\u201d Error","datePublished":"2024-02-28T08:40:40+00:00","dateModified":"2024-05-02T05:26:14+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/"},"wordCount":1161,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/0-ng-command-not-found.png","keywords":["command not found"],"articleSection":["Bash Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/","url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/","name":"[Fixed] \u201cbash: ng: command not found\u201d Error - LinuxSimply","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/0-ng-command-not-found.png","datePublished":"2024-02-28T08:40:40+00:00","dateModified":"2024-05-02T05:26:14+00:00","description":"Learn quick solution methods for resolving 'ng command not found' in Bash by installing Angular CLI, setting the PATH variable, and aliasing.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/0-ng-command-not-found.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/02\/0-ng-command-not-found.png","width":400,"height":400,"caption":"ng command not found in Bash"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/ng\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"Bash Scripting Tutorial","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/"},{"@type":"ListItem","position":3,"name":"Bash Error Handling and Debugging","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/"},{"@type":"ListItem","position":4,"name":"[Solved] \"bash: command not found\" Error","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/error-handling-and-debugging\/command-not-found\/"},{"@type":"ListItem","position":5,"name":"[Fixed] \u201cbash: ng: command not found\u201d Error"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/a2f48e791486fbce8f957b47a92acbd4","name":"Ashikur Rahman","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Ashikur-Rahman-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Ashikur-Rahman-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Ashikur-Rahman-II-96x96.png","caption":"Ashikur Rahman"},"description":"Hello, I\u2019m Ashikur Rahman, currently working as a Linux Content Developer Executive at SOFTEKO. I have completed my graduation in Computer Science and Engineering from Khulna University of Engineering &amp; Technology (KUET). Also, I\u2019m pursuing my master\u2019s in the same department at Bangladesh University of Engineering &amp; Technology (BUET). I like to learn new technologies, contribute, and share those with others. Here my goal is to provide beneficial and user-friendly articles on Linux distribution for everyone. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/profile.php?id=100015393011530&mibextid=ZbWKwL","https:\/\/linkedin.com\/in\/ashikur-rahman-kuet"],"url":"https:\/\/linuxsimply.com\/author\/ashik\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/37942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314911"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=37942"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/37942\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/37947"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=37942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=37942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=37942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}