Linux Basics
Linux is an open-source operating system kernel used by many server operating systems.
A Linux distribution combines the Linux kernel with system utilities, libraries, package managers and applications. Popular Linux distributions include Debian, Ubuntu, Fedora and Linux Mint.
Package Management
Debian-based systems use APT for package management.
Common commands:
apt update apt install nginx apt remove nginx
apt update downloads current information about available packages.
It does not install package upgrades.
Services
Modern Debian systems use systemd to manage services.
A service can be started with:
systemctl start nginx
Its status can be checked with:
systemctl status nginx
A service can be configured to start automatically during boot:
systemctl enable nginx
File Permissions
Linux permissions are divided into three basic operations:
- read
- write
- execute
Permissions can be defined separately for the owner, group and other users.
The chmod command changes permissions and chown changes file ownership.
Processes
The ps command displays running processes.
The top command provides an interactive view of CPU and memory usage.
A process can be terminated using the kill command.