| name | terminal-cli-en |
| description | Reference for operating in a Linux terminal. Use when the user or agent needs to run bash commands, combine commands with && or pipes, read files, sort and deduplicate output, write and execute shell scripts, work with the filesystem (files, links, mounts, permissions), install or update packages, get help on commands, manage containers with Podman, make HTTP requests with curl, manage Kubernetes clusters with kubectl, manage Helm charts, handle environment variables, or launch AI coding agents (aider-chat, claude). Activate this skill for any task involving: bash, shell, terminal, CLI, script, pipe, podman, kubectl, helm, curl, apt, pip, environment variable, aider, or any Unix command.
|
| license | CC BY-NC-SA 4.0 |
| compatibility | Requires a Linux (bash) environment. |
Terminal & CLI Skill
Reference for working in a Linux terminal — covering the full stack from basic
bash to container orchestration and AI agent execution.
How to use this skill
This file covers the most common patterns. For detailed command references,
load the relevant file from references/ on demand:
| Topic | Reference file |
|---|
| Bash core: pipes, scripts, filesystem, install, env vars | references/bash.md |
| Containers: Podman, Kubernetes (kubectl), Helm | references/containers.md |
| HTTP requests: curl | references/curl.md |
| AI agents: aider-chat, claude CLI | references/agents.md |
1. Run a bash command
command [options] [arguments]
cmd1 && cmd2 && cmd3
cmd1; cmd2; cmd3
OUTPUT=$(command)
command > out.txt
command 2> err.txt
command &> all.txt
command > /dev/null 2>&1
2. Check if a tool exists
type -a tool_name
apropos keyword
which tool_name
whereis tool_name
3. Combine with &&
sudo apt update && sudo apt upgrade -y
mkdir -p build && cd build && cmake ..
4. Pipe with |
cmd1 | cmd2 | cmd3
ls -la | grep ".conf"
ps aux | grep nginx
journalctl -u myservice | grep ERROR | tail -20
cat file.txt | wc -l
5. Read content with cat
cat file.txt
cat file1.txt file2.txt
head -n 20 file.txt
tail -n 20 file.txt
tail -f /var/log/app.log
less file.txt
grep "pattern" file.txt
grep -r "pattern" ./dir/
grep -n "pattern" file.txt
grep -i "pattern" file.txt
6. Sort results
sort file.txt
sort -r file.txt
sort -n file.txt
sort -k2 file.txt
sort -t: -k3 -n /etc/passwd
ls -la | sort -k5 -n
7. Unique results
sort file.txt | uniq
sort file.txt | uniq -c
sort file.txt | uniq -d
sort file.txt | uniq -u
cat app.log | grep ERROR | sort | uniq -c | sort -rn
8. Write and run scripts with heredoc
cat << 'EOF' > myscript.sh
set -euo pipefail
echo "Today: $(date +%Y-%m-%d)"
for i in 1 2 3; do
echo "Step $i"
done
EOF
chmod +x myscript.sh
./myscript.sh
bash << 'EOF'
echo "Inline execution"
ls -la /tmp
EOF
Script best practices:
- Always start with
#!/bin/bash
- Use
set -euo pipefail for safe defaults
- Always quote variables:
"$VAR" not $VAR
- Use
$(...) instead of backticks
9. Filesystem — quick reference
pwd && ls -lah
tree -L 2
find /path -name "*.log"
du -sh /path
df -h
mkdir -p /path/to/dir
cp -r src/ dst/
mv src dst
rm -rf dir/
chmod +x file
chmod 644 file
chown user:group file
ln -s /target /link
readlink -f /link
mount
lsblk
findmnt
→ Full filesystem reference: references/bash.md
10. Install & update — quick reference
sudo apt update && sudo apt upgrade -y
sudo apt install -y package-name
pip install package --break-system-packages
npm install -g package-name
→ Full install reference (snap, from-source, pip options): references/bash.md
11. Get help on a command
command --help
man command
apropos keyword
whatis command
info command
help cd
12. Environment variables — quick reference
export VAR="value"
echo $VAR
unset VAR
env
VAR=value command
→ Persisting vars, loading .env files: references/bash.md
Detailed references
Load these files when you need complete command coverage:
references/bash.md — full filesystem, install/update, env vars, scripting patterns
references/containers.md — Podman, kubectl, Helm
references/curl.md — curl for HTTP requests
references/agents.md — aider-chat and claude CLI