Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Programming»Nodejs»How to Install Grunt on Ubuntu 22.04 & 20.04

    How to Install Grunt on Ubuntu 22.04 & 20.04

    RahulBy RahulJuly 19, 20222 Mins Read

    Grunt is a node-based task runner that helps developers automate common tasks during the software development process. It can be used to compile code, run tests, and more. grunt is easy to install and configure, and it can be used with any programming language.

    Grunt is available as a free, open-source tool, that is typically used in conjunction with other tools, such as Git and npm. A grunt is a powerful tool that can help developers save time and improve their workflow.

    In this blog post, you will learn to install Grunt on Ubuntu systems.

    Prerequsities

    Assuming you already have Node.js and NPM installed on your system. Otherwise, you can visit our other tutorial to install Node.js on Ubuntu systems.

    Verify the Node.js and NPM versions:

    node --version 
    npm  --version 
    

    Installing Grunt CLI

    Once you have verified that Node.js and NPM are on your system. Use the following command to install Grun CLI on your system globally.

    npm install grunt-cli --location=global 
    

    After successfully installation, check the installed version of Grunt-cli:

    grunt --version 
    
    Output
    grunt-cli v1.4.3

    Now, you add the "scripts": { "test": "grunt test" } to the package.json. Now, run “npm test” to initiate the grun test command.

    Enable Shell Auto-completion

    You can also enable the tab auto-completion for Grunt, and add one of the following lines to your ~/.bashrc or ~/.zshrc file based on your active shell.

    • Bash shell users edit ~/.bashrc and apped the following code
      1
      eval "$(grunt --completion=bash)"
    • Zsh shell users edit ~/.zshrc and apped the following code
      1
      eval "$(grunt --completion=zsh)"

    Conclusion

    In this tutorial, you have learned to install Grunt-CLI on your Ubuntu system. Also configured the tab auto-completion.

    grunt grunt-cli node.js npm
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleS3 & Cloudfront: 404 Error on Page Reload (Resolved)
    Next Article #1 macOS and OS X Versions and Codenames

    Related Posts

    Running “npm start” with PM2

    Updated:July 13, 20221 Min Read

    How to Install Bower on Ubuntu 22.04 & 20.04

    Updated:July 2, 20222 Mins Read

    How to run “npm start” through Docker

    Updated:July 2, 20222 Mins Read

    How to Install Latest Node.js on Ubuntu

    Updated:August 4, 20223 Mins Read

    How To Install Node.js on Ubuntu 22.04

    Updated:May 27, 20223 Mins Read

    How To Install NVM on Ubuntu 22.04

    Updated:July 13, 20223 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Import GPG Keys on Ubuntu & Debian (without apt-key)
    • How To Install Google Chrome On macOS
    • How to Install Minecraft on Ubuntu 22.04 & 20.04
    • Running a Cron job every Sunday (Weekly)
    • Running Multiple Commands At Once in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.