Installing VS Code
Installing VS Code on Linux is straightforward. On recent Ubuntu machines, we can use snapd
, a package management system for Ubuntu, like this:
sudo snap install --classic code
And that’s it. On RHEL and CentOS machines, we may need to enable snapd
first, before we can use it to install code.
We’re going to run the commands shown next:
- In the first line, we are installing the
snapd
package:sudo yum install snapd
Note: For CentOS 7, we will also need to run the following command:
sudo yum install epel-release
- In the second line, we’re enabling the network socket that
snap
uses:sudo systemctl enable --now snapd.socket
- In the third line, we’re creating a symbolic link that maps
/snap
to/var/lib/snapd/snap
:sudo ln -s /var/lib/snapd/snap /snap
- Finally, we need to log out and log back in, or reboot the machine, to make sure that everything is updated.
We’re now ready to use snap
to install VS Code, as before...