Skip to content

Latest commit

 

History

History
348 lines (209 loc) · 10.6 KB

NODE_GIT_INSTALLATION.md

File metadata and controls

348 lines (209 loc) · 10.6 KB

NODE 🍦

  • 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

Remove it

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*
You can verify your uninstallation by these commands; they should not output anything.
which node
which nodejs
which npm


BEFORE START

  • Lets check this:


🍦

Installing Node.js and npm


nvm install node
nvm install --lts

Once the installation is completed, verify it by printing the Node.js version:

node --version

should give this output:

v12.8.1 //depends of the version

Npm should also be installed with node, verify it using

npm - v;

should give this output:

6.13.4 //depends of the version





GIT 🍨


  • 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

GIT CONFIGURATION 🍦

  • Now that you have installed Git, go to your repository in Gihub and grab your credentials from there.

You will need:



The following commands will set your git commit username and email address:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
To verify the configuration changes, type:
git config --list
Output
user.name=Your Name
user.email=youremail@yourdomain.com

To Edit the .gitconfig from the GNU nano Editor:

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:

Save File in Nano

  • 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.


Save File with Backup

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:


Exit Nano Editor

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.


CREDITS






ISSUES 🔴

Git push results in "Authentication Failed"


Solution

  • Check min 3:26

How to Fix Git Fatal: Authentication Failed New and Easy Method




MISC

First steps with git: clone, add, commit, push Intro version control git

Copying a GitHub Repository to Your Local Computer



VISUAL STUDIO CODE



UBUNTU



1. pwd

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.

2. ls

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.

3. cd

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.

4. mkdir

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!

5. rmdir

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.

6. lsblk

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.

7. mount

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.

8. df

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.

44. sort

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.

45. sudo

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.

46. chmod

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.

47. chown

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.

49. tar

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.