This script updates package lists and installs a collection of development, networking, and system administration tools on a Debian-based system.
npm run import -- "Install dev tools on Linux"
mkdir /var/lib/apt/lists/partial
apt-get -qq update
apt-get install -y --fix-missing git curl wget zip unzip vim dos2unix g++ python net-tools make websockify novnc
#!/bin/bash
# Create directory for apt cache
mkdir -p /var/lib/apt/lists/partial
# Update apt cache
apt-get update -qq
# Install required packages
apt-get install -y --fix-missing \
git curl wget zip unzip vim dos2unix \
g++ python3 net-tools make \
websockify novnc
# Clean up apt cache
apt-get autoremove -y
apt-get clean -y
This code snippet updates the package lists and installs several packages on a Debian-based system.
Here's a breakdown:
mkdir /var/lib/apt/lists/partial
:
/var/lib/apt/lists/partial
if it doesn't exist. This directory is used by apt
to store partial package lists.apt-get -qq update
:
-qq
: Suppresses most output, making the command run more quietly.apt-get install -y --fix-missing git curl wget zip unzip vim dos2unix g++ python net-tools make websockify novnc
:
-y
: Automatically answers "yes" to any prompts during installation.--fix-missing
: Attempts to resolve any missing dependencies.git
: Version control system.curl
: Command-line tool for transferring data using various protocols.wget
: Command-line tool for downloading files from the internet.zip
: Utility for creating and extracting ZIP archives.unzip
: Utility for extracting ZIP archives.vim
: Text editor.dos2unix
: Converts DOS-style line endings to Unix-style line endings.g++
: C++ compiler.python
: Python programming language.net-tools
: Network utilities.make
: Build automation tool.websockify
: Tool for creating WebSocket proxies.novnc
: Web-based VNC client.In essence, this code prepares a Debian-based system by updating package lists and installing a set of commonly used tools for development, networking, and system administration.