How To Install npm on Kali Linux
Introduction
In this tutorial we learn how to install npm
on Kali Linux.
What is npm
npm is:
Node.js is an event-based server-side javascript engine.
npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.
It is extremely configurable to support a wide variety of use cases. Most commonly, it is used to publish, discover, install, and develop node programs.
There are three methods to install npm
on Kali Linux. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install npm Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install npm
using apt-get
by running the following command:
sudo apt-get -y install npm
Install npm Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install npm
using apt
by running the following command:
sudo apt -y install npm
Install npm Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install npm
using aptitude
by running the following command:
sudo aptitude -y install npm
How To Uninstall npm on Kali Linux
To uninstall only the npm
package we can use the following command:
sudo apt-get remove npm
Uninstall npm And Its Dependencies
To uninstall npm
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove npm
Remove npm Configurations and Data
To remove npm
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge npm
Remove npm configuration, data, and all of its dependencies
We can use the following command to remove npm
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge npm
Dependencies
npm have the following dependencies:
- ca-certificates
- nodejs
- node-abbrev
- node-agent-base
- node-ajv
- node-ansi
- node-ansi-regex
- node-ansi-styles
- node-ansistyles
- node-aproba
- node-archy
- node-are-we-there-yet
- node-asap
- node-asn1
- node-assert-plus
- node-asynckit
- node-aws4
- node-aws-sign2
- node-balanced-match
- node-bcrypt-pbkdf
- node-brace-expansion
- node-builtins
- node-cacache
- node-caseless
- node-chalk
- node-chownr
- node-clone
- node-color-convert
- node-color-name
- node-colors
- node-columnify
- node-combined-stream
- node-concat-map
- node-console-control-strings
- node-core-util-is
- node-dashdash
- node-debug
- node-defaults
- node-delayed-stream
- node-delegates
- node-depd
- node-ecc-jsbn
- node-encoding
- node-err-code
- node-extend
- node-extsprintf
- node-fast-deep-equal
- node-forever-agent
- node-form-data
- node-fs.realpath
- node-function-bind
- node-gauge
- node-getpass
- node-glob
- node-graceful-fs
- node-gyp
- node-har-schema
- node-har-validator
- node-has-flag
- node-http-signature
- node-https-proxy-agent
- node-iconv-lite
- node-imurmurhash
- node-indent-string
- node-inflight
- node-inherits
- node-ini
- node-ip
- node-ip-regex
- node-is-typedarray
- node-isarray
- node-isexe
- node-isstream
- node-jsbn
- node-jsonparse
- node-json-parse-better-errors
- node-json-schema
- node-json-schema-traverse
- node-json-stable-stringify
- node-json-stringify-safe
- node-jsonstream
- node-jsprim
- node-leven
- node-lockfile
- node-mime
- node-mime-types
- node-minimatch
- node-mkdirp
- node-ms
- node-mute-stream
- node-nopt
- node-normalize-package-data
- node-npm-bundled
- node-npm-package-arg
- node-npmlog
- node-number-is-nan
- node-oauth-sign
- node-object-assign
- node-opener
- node-path-is-absolute
- node-promise-retry
- node-promzard
- node-performance-now
- node-p-map
- node-process-nextick-args
- node-psl
- node-puka
- node-punycode
- node-qs
- node-read
- node-readable-stream
- node-read-package-json
- node-resolve
- node-resolve-from
- node-retry
- node-rimraf
- node-safe-buffer
- node-semver
- node-set-blocking
- node-signal-exit
- node-slash
- node-spdx-correct
- node-spdx-exceptions
- node-spdx-expression-parse
- node-spdx-license-ids
- node-sshpk
- node-ssri
- node-string-decoder
- node-string-width
- node-strip-ansi
- node-supports-color
- node-tar
- node-text-table
- node-tunnel-agent
- node-tweetnacl
- node-typedarray-to-buffer
- node-uri-js
- node-util-deprecate
- node-uuid
- node-validate-npm-package-name
- node-verror
- node-which
- node-wide-align
- node-wrappy
- node-wcwidth.js
- node-write-file-atomic
- node-yallist
References
Summary
In this tutorial we learn how to install npm
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.