Operations 62 min read

Master Linux Commands: Compression, Process & Network Management Essentials

This guide provides concise English explanations of dozens of essential Linux commands—including compression tools, process utilities, and network utilities—covering their purpose, syntax, key options, and practical usage examples for system administrators and developers.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Commands: Compression, Process & Network Management Essentials

1. Compression Management

bunzip2

Function: Decompress .bz2 files. Syntax: bunzip2 [-fkLsvV] [.bz2 file]. It is a symlink to bzip2 -d. Options include -f (force overwrite), -k (keep original), -s (use less memory), -v (verbose), and version/license flags.

bzip2

Function: Compress files into .bz2 format. Syntax:

bzip2 [-cdfhkLstvVz] [--repetitive-best] [--repetitive-fast] [-compression-level] [files]

. It uses a newer algorithm than LZ77/LZ78. Important options: -c (stdout), -d (decompress), -f (force), -h (help), -k (keep), -s (small memory), -t (test), -v (verbose), -L (license), -V (version), and repetitive options for better compression on repeated data.

cpio

Function: Create and restore backup archives. Syntax examples:

cpio [-0aABckLovV] [-C <size>] [-F <archive>] [-H <format>] [-O <archive>] [--block-size=<size>] [--force-local] [--help] [--quiet] [--version]

and other variants. Options include -0 (null), -a (reset access time), -A (append), -b (swap), -B (block size 5210), -c (old ASCII format), -C (set I/O block size), -d (make directories), -E (pattern file), -f (non‑matching), -F (specify archive file), -H (format), -i (extract), -l (link), -L (dereference), -m (preserve modification time), -M (message), -n (numeric uid/gid), -p (pass‑through), -r (rename), -s (swap bytes), -S (sparse), -t (list), -u (unconditional), -v (verbose), -V (dot), and block‑size controls.

gunzip

Function: Decompress .gz files (hard link to gzip). Syntax: gunzip [-acfhlLnNqrtvV] [-s <suffix>] [files...]. Options: -a (ASCII mode), -c (stdout), -f (force), -h (help), -l (list info), -L (license), -n (no name), -N (restore name), -q (quiet), -r (recursive), -S (suffix), -t (test), -v (verbose), -V (version).

gzip

Function: Compress files into .gz format. Syntax:

gzip [-acdfhlLnNqrtvV] [-S <suffix>] [-<compression-level>] [files...]

. Options include -a (ASCII), -c (stdout), -d (decompress), -f (force), -h (help), -l (list), -L (license), -n (no name), -N (name), -q (quiet), -r (recursive), -S (suffix), -t (test), -v (verbose), -V (version), and compression level 1‑9 or --best / --fast.

split

Function: Split a file into smaller pieces. Syntax:

split [--help] [--version] [-<lines>] [-b <bytes>] [-C <bytes>] [-l <lines>] [input_file] [output_prefix]

. By default it splits every 1000 lines. Options: -l (lines per file), -b (bytes per file), -C (keep line integrity), --help, --version.

tar

Function: Create and extract archive files. Syntax:

tar [-ABcdgGhiklmMoOpPrRsStuUvwWxzZ] [-b <block-count>] [-C <directory>] [-f <archive>] [-F <script>] ...

. It supports many options for creating, extracting, listing, preserving permissions, handling multi‑volume archives, compression via -z / -j, and more. Key options: -c (create), -x (extract), -t (list), -v (verbose), -f (archive file), -C (change directory), -z (gzip), -j (bzip2), -J (xz), -p (preserve permissions), -k (keep old files), -r (append), -u (update), -A (concatenate), -L (license), -V (version), and many others.

unzip

Function: Extract .zip archives. Syntax:

unzip [-cflptuvz] [-agCjLMnoqsVX] [-P <password>] [zipfile] [files] [-d <dir>] [-x <files>]

. Options: -c (stdout with conversion), -f (update), -l (list), -p (stdout without conversion), -t (test), -u (update and extract), -v (verbose), -z (show comments), -a (ASCII conversion), -b (no conversion), -C (case‑sensitive), -j (ignore paths), -L (lowercase names), -M (pipe to more), -n (no overwrite), -o (overwrite without prompting), -P (password), -q (quiet), -s (replace spaces with underscores), -V (VMS version), -X (preserve UID/GID).

zgrep

Function: Search compressed files with regular expressions, behaving like grep but operating on compressed input. Syntax: zgrep [options] [files]. Options correspond to standard grep flags.

zip

Function: Create .zip archives. Syntax:

zip [-options] [-b <work-dir>] [-ll] [-n <suffix>] [-t <date>] [-<level>] <zipfile> [files...] [-i <pattern>] [-x <pattern>]

. Important options: -A (adjust auto‑extract), -b (work directory), -c (add comment), -d (delete), -D (no directories), -f (force update), -F (fix), -g (append), -h (help), -i (include pattern), -j (no directories), -J (remove leading data), -k (MS‑DOS names), -l (LF to CRLF), -ll (LF+CR to LF), -L (license), -m (move files), -n (exclude suffix), -o (set archive time), -q (quiet), -r (recursive), -S (include system/hidden), -t (set date), -T (test), -u (update), -v (verbose), -V (VMS attributes), -w (VMS version), -x (exclude pattern), -X (no extra attributes), -y (store symlinks), -z (add comment), -$ (store volume name), and compression level 1‑9.

2. Process Management

crontab

Function: Schedule timed tasks. Syntax: crontab [-u <user>] [file] | crontab [-u <user>] [-elr]. The crontab file format is Minute Hour Day Month DayOfWeek Command. Options: -e (edit), -l (list), -r (remove), -u (specify user).

kill

Function: Terminate processes. Syntax: kill [-s <signal>] [pid...] | kill [-l [signal-number]]. Default signal is SIGTERM (15); SIGKILL (9) forces termination. Use ps or jobs to find PIDs. Options: -l (list signals), -s (specify signal).

nohup

Function: Run a command immune to hangups. Syntax: nohup Command [args...] [&]. Output is appended to nohup.out (or $HOME/nohup.out if not writable). Exit codes: 126 (command not executable), 127 (command not found), otherwise the command’s exit status.

ps

Function: Report process status. Syntax: ps [options] [selection]. Common options: -a (all terminals), -A (all processes), -c (CLS and PRI columns), -f (full format), -l (long format), -u (user‑oriented), -x (all processes), -H (tree), -j (jobs format), -o (custom output), -p (by PID), -t (by terminal), -U / -u (by UID), -V (version), -w (wide). Additional long‑form options are also supported.

renice

Function: Change scheduling priority of processes. Syntax: renice [priority] [-g <group>] [-p <pid>] [-u <user>]. Priority range is -20 (highest) to 19 (lowest). Only root can set negative values or affect other users.

top

Function: Real‑time display of running processes. Syntax: top [bciqsS] [d <seconds>] [n <iterations>]. Options: b (batch mode), c (full command line), d (delay), i (ignore idle/zombie), n (iterations), q (quit), s (secure mode), S (cumulative mode).

who

Function: Show who is logged on. Syntax: who [-Himqsw] [--help] [--version] [am i] [logfile]. Options: -H (heading), -i / -u (idle time), -m (same as "am i"), -q (count only), -s (compatibility), -w (show writeable status).

3. Network Management

curl

Function: Transfer data with URLs. Examples:

Read a web page: curl http://www.linuxidc.com Save to file: curl -o page.html http://www.linuxidc.com Use proxy:

curl -x 123.45.67.89:1080 -o page.html http://www.linuxidc.com

Store cookies: curl -D cookie.txt http://example.com Send cookies: curl -b cookie.txt http://example.com Set user‑agent: curl -A "Mozilla/5.0" http://example.com Set referer: curl -e "mail.linuxidc.com" http://example.com Download files: curl -O http://example.com/file.jpg Batch download: curl -O http://host/{001-201}.JPG Custom filenames: curl -o #2_#1.jpg http://host/{001-201}.JPG Resume download: curl -c -O http://example.com/file FTP download: curl -u user:pass ftp://host/path/file FTP upload: curl -T localfile -u user:pass ftp://host/path/ HTTP upload (PUT): curl -T localfile http://host/abc.cgi POST data: curl -d "user=nick&password=12345" http://host/login.cgi POST file:

curl -F upload=@localfile -F nick=go http://host/up_file.cgi

finger

Function: Display user information. Syntax: finger [-lmsp] [user...]. Options: -l (full info), -m (omit real name), -s (short info), -p (omit plan/file).

ftp

Function: Transfer files using FTP protocol. Syntax: ftp [-dignv] host. Options: -d (debug), -i (no interactive prompts), -g (disable filename globbing), -n (no auto‑login), -v (verbose).

ifconfig

Function: Configure network interfaces. Syntax: ifconfig [interface] [options]. Common options: add / del (IPv6 address), down, up, hw (hardware type/address), io_addr, irq, media, mem_start, metric, mtu, netmask, tunnel, -broadcast, -pointopoint, -promisc, and IP address assignment.

ip

Function: Advanced IP routing and device configuration (iproute2). General syntax: ip [options] [object] [command]. Objects include link, addr, route, etc. Examples:

Show links: ip link show or ip -s link show eth0 Set link up/down: ip link set eth0 up, ip link set eth0 down Change MTU: ip link set eth0 mtu 1000 Rename interface: ip link set eth0 name vbird (requires interface down first)

Change MAC: ip link set eth0 address aa:aa:aa:aa:aa:aa Add IP address: ip address add 192.168.50.50/24 dev eth0 label eth0:vbird Delete IP address: ip address del 192.168.50.50/24 dev eth0 Show routes: ip route show Add route: ip route add 192.168.5.0/24 dev eth0 Add gateway route: ip route add 192.168.10.0/24 via 192.168.5.100 dev eth0 Set default gateway: ip route add default via 192.168.1.2 dev eth0 Delete route:

ip route del 192.168.10.0/24

netstat

Function: Network statistics. Syntax: netstat [options]. Common options: -a (all sockets), -c (continuous), -e (extend), -i (interfaces), -l (listening), -n (numeric), -r (routing table), -s (statistics), -t (TCP), -u (UDP), -w (raw), -x (UNIX sockets), --help, --version.

nslookup

Function: Query DNS for hostnames or IP addresses. Syntax: nslookup [hostname|IP]. Interactive mode shows default server and allows queries; exit quits. Useful for testing forward and reverse DNS, MX records, TXT records.

ping

Function: Test reachability of a host using ICMP. Syntax: ping [options] host. Options: -c (count), -i (interval), -I (interface), -l (preload), -n (numeric output), -p (pattern), -q (quiet), -r (bypass routing), -R (record route), -s (packet size), -t (TTL), -v (verbose).

rcp

Function: Remote copy of files or directories. Syntax: rcp [-pr] source target. Options: -p (preserve attributes), -r (recursive).

route

Function: Manually manipulate the kernel routing table. Syntax:

route [-add|-delete] [-net|-host] target [gw gateway] [netmask mask] [dev iface]

. Example:

route add -net 202.96.96.0 -netmask 255.255.255.0 gw 192.168.1.10 dev eth0

.

tcpdump

Function: Capture and display network packets. Syntax: tcpdump [options] [expression]. Important options: -i (interface), -c (packet count), -w (write to file), -r (read from file), -s (snaplen), -n (numeric), -v / -vv (verbosity), -e (link‑layer header), -X (hex+ASCII), -A (ASCII), -t / -tt (timestamps), -F (filter file), -p (no promiscuous mode), -l (line buffered).

telnet

Function: Remote login over TCP. Syntax: telnet [options] host [port]. Options include -8 (8‑bit), -a (auto login), -b (bind address), -c (no .telnetrc), -d (debug), -e (escape character), -f / -F (Kerberos), -k (Kerberos realm), -l (login name), -L (output 8‑bit), -n (record file), -r (rlogin‑like), -S (TOS), -x (encryption), -X (disable auth).

traceroute

Function: Trace the path packets take to a network host. Syntax: traceroute [options] host [packet‑size]. Options: -f (first TTL), -g (gateway list), -i (interface), -m (max TTL), -p (port), -s (source address), -t (TOS), -w (timeout), -n (numeric), -q (queries per hop), -r (bypass routing), -I (use ICMP), -x (checksum), -v (verbose).

For more details, refer to the original source: https://mp.weixin.qq.com/s/Yxd80jt_pXlLbEtBYqpD_g

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxcommand-lineNetworkingSystem Administrationcompression
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.