- If you want to start the installation from zero, check if you already have node and if yes uninstall it.
- Check the version:
node --version
How can I completely uninstall nodejs, npm and node in Ubuntu
This will completely remove nodejs from your system; then you can make a fresh install from the below commands.
- Read the comments
1
sudo apt-get remove nodejs npm node
sudo apt-get purge nodejs
//
//
//
//2
// Now remove .node and .npm folders from your system (CAREFUL, if you already have a lot of data, i will think twice before doing it. save it before)
//
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/share/man/man1/node*
sudo rm -rf /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm -rf /opt/local/bin/node
sudo rm -rf opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/include/node*
sudo rm -rf /usr/local/bin/node*
which node
which nodejs
which npm
- Lets check this:
nvm install node
nvm install --lts
node --version
v12.8.1 //depends of the version
npm - v;
6.13.4 //depends of the version
- Start by updating the package index:
sudo apt update
- Run the following command to install Git:
sudo apt install git
- Verify the installation by typing the following command which will print the Git version:
git --version
More installation options here: How to Install Git on Ubuntu 18.04
- Now that you have installed Git, go to your repository in Gihub and grab your credentials from there.
-
your name repo, mine is 'nadiamariduena': https://github.com/nadiamariduena
-
Your email connected to your github account
-
And the password connected to the account
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --list
user.name=Your Name
user.email=youremail@yourdomain.com
git config --global -e
- Once you copy paste that, you will see a window editor, inside the editor you will be able to edit it directly.
- Once you are done save the changes:
- The editor will give you many options, one of these options is ^O(Ctrl + O)
If you wish to save your current changes to the file, press the ^O (Ctrl + O) combination. If you are editing a new file, you will be asked to give that file a name. This will save your current changes and nano will remain opened so you can continue making changes to the file.
Sometimes when editing a file, you may want to keep temporary copies of the same file just in case. You can use nano’s -B option, which will create backup of the file you are editing. You can use it in combination with the -C option to tell nano where to save those backups like this:
To exit nano, simply press ^X (Ctrl +X keys). If the file has not been previously saved, you will be asked to save the changes with yes/no or cancel the exit.
- Check min 3:26
How to Fix Git Fatal: Authentication Failed New and Easy Method
First steps with git: clone, add, commit, push Intro version control git
Copying a GitHub Repository to Your Local Computer
pwd stands for Print Work directory and does exactly what you think – it shows the directory you’re currently in. This is one of the handiest Linux terminal commands that aims to make new user’s life peaceful by ensuring they don’t get lost in that seemingly cryptic terminal window.
The ls command is probably one of the most widely used commands in the Unix world. It presents to you the contents of a particular directory – both files and directories. You will use this command alongside pwd to navigate your ways inside the mighty Unix filesystem.
Short for Change Directory, the cd command is behind your movement from one directory to another. It’s one of the few Linux commands that you’re bound to use throughout your stint with the Linux system. This command makes life in front of the terminal less scary for beginners while providing a standard method to browse the entire filesystem of your device.
Want to create a new folder through the terminal? The mkdir command is created for just this specific purpose. It lets you create folders anywhere you like in your Linux system – given you have got the necessary permission, of course!
The arch rival of the mkdir command, the rmdir command allows you to delete specific folders from your system without any hassles. Although many utilize the rm command for this purpose, screwing up parameters or even a single character with rm can do things you wouldn’t even dream. So, stick with rmdir for now.
Often you will find the need to list the available block devices of your Linux system. The lsblk is one of the most used Linux commands for this purpose. This handy terminal command will present you with a tree structure of your block devices and is used heavily by professional users.
Contrary to Windows, whenever you plug in an SD card or a USB, chances are your distro won’t show them directly at the start. You need to mount it with your existing filesystem using the mount command. This Linux command is one of the most powerful terminal commands out there.
The df command is one of the most empowering Linux terminal commands that display essential information about the disk space on your filesystem. It is used widely by system administrators to monitor and analyze real-time server or network-oriented systems.
The sort command is quite compelling at the things it does. Whenever you find the need to sort out a file in an alphabetical or reverse manner, utilize this command.
The sudo command is the holy grail of Linux commands. It lets non-privileged users access and modify files that require low-level permissions. Often you will use this command to access root from your regular user account.
The chmod command is among the most powerful Linux commands you will use to change or modify the access permissions of system files or objects. This command can take a very diverse set of parameters from users and, based on those changes, the file permission.
The chown command is very much similar to the chmod command. But instead of changing access permissions, it enables users to change the ownership of a file or directory. Both the chmod and chown terminal commands require root privileges to run.
The tar command is used for archiving files and extracting them. It is a very popular command for compressing files and can tackle such tasks very efficiently.