Tutorial: Sudo commands that you should know as a web developer
We’re pleased to announce that the Codesphere IDE now supports sudo!
If you’ve ever worked in a Linux operating system, you’re probably familiar with the “sudo” command.
Sudo is a program for Unix-like systems that allows users to run programs with privileges of another user.
In the following article, we will show you some common sudo commands that you may come across as a web developer.
Updating the npm version globally
sudo npm i -g npm
Run sudo npm i -g npm in your terminal to update the npm version globally.
Changing the Node.js version
N is a great tool for switching between Node.js versions with ease. Simply execute sudo n latest to change your Node.js version to the latest version.
Removing versions of Node.js
sudo n rm
If you might want to remove an old version of Node.js, just run
sudo n rm .
Installing packages globally
sudo npm i -g
Node.js has great package management, so installing packages globally is very simple. Sometimes installing packages globally gives you the ability to use NPM packages locally as well as globally, such as within other Node.js projects.
In the following example, we are installing nodemon and eslint globally.
Installing the create-react-app package globally
sudo npm i -g create-react-app
To install the create-react-app package globally use the command mentioned above.
That’s all for now, we hope that you enjoyed the read! Our team is working hard to make Codesphere easier and even more enjoyable for you.
Thanks for using Codesphere.
TUTORIAL: How to Get Started With Codesphere
At Codesphere, we want our users to be able to start coding without having to deal with a long and confusing setup process for their… (Read More)