Skip to content
Skills Library
DevOps & cloud · Building & coding

Linux Bash

/Linux Bash

Expert assistance with Linux bash commands, shell scripting, system administration, file operations, and command-line utilities. Use this when working with bash scripts, Linux system operations, or command-line tasks.

Licence
Apache-2.0
Last repository change
23.10.2026

Assessment and security

90/ 100Class: good
Format15 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Expert assistance with Linux bash commands, shell scripting, system administration, file operations, and command-line utilities. Use this when working with bash scripts, Linux system operations, or command-line tasks.

Original author description

Expert assistance with Linux bash commands, shell scripting, system administration, file operations, and command-line utilities. Use this when working with bash scripts, Linux system operations, or command-line tasks.

How it works

  1. Core Commands
  2. Shell Scripting Best Practices
  3. Common Patterns
  4. Tips
  5. Safety First
Original SKILL.md headings · 128 lines, 461 words
SKILL.md preview
---
name: Linux Bash
description: Expert assistance with Linux bash commands, shell scripting, system administration, file operations, and command-line utilities. Use this when working with bash scripts, Linux system operations, or command-line tasks.
---

# Linux Bash

Expert guidance for Linux bash operations, scripting, and system administration.

## Core Commands

### File Operations
- `ls -lah` - List files with details, including hidden
- `find /path -name "pattern"` - Find files by name
- `grep -r "pattern" /path` - Recursive text search
- `chmod +x file` - Make file executable
- `chown user:group file` - Change ownership
- `tar -czf archive.tar.gz dir/` - Create compressed archive
- `tar -xzf archive.tar.gz` - Extract archive

### Process Management
- `ps aux | grep process` - Find running processes
- `top` / `htop` - Monitor system resources
- `kill -9 PID` - Force kill process
- `nohup command &` - Run command in background
- `jobs` - List background jobs
- `fg %1` - Bring job to foreground

### System Information
- `df -h` - Disk usage human-readable
- `du -sh dir/` - Directory size
- `free -h` - Memory usage
- `uname -a` - System information
- `lsb_release -a` - Distribution info

### Text Processing
- `cat file | head -n 10` - First 10 lines
- `tail -f log.txt` - Follow log file
- `sed 's/old/new/g' file` - Replace text
- `awk '{print $1}' file` - Print first column
- `sort file | uniq` - Remove duplicates

## Shell Scripting Best Practices

### Script Template
```bash
#!/bin/bash
set -euo pipefail  # Exit on error, undefined vars, pipe failures

# Script description
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

main() {
    # Your logic here
    echo "Hello, World!"
}

main "$@"
```

### Error Handling
```bash
# Check command success
if ! command -v tool &> /dev/null; then
    echo "Error: tool not found" >&2
    exit 1
fi

# Trap errors
trap 'echo "Error on line $LINENO"' ERR
```

### Variables
```bash
# Constants (uppercase)
readonly CONFIG_FILE="/etc/app.conf"

# Variables (lowercase)
user_input="$1"

# Arrays
files=("file1.txt" "file2.txt")
for file in "${files[@]}"; do
    echo "$file"
done
```

## Common Patterns

### Check if file exists
```bash
if [[ -f "file.txt" ]]; then
    echo "File exists"
fi
```

### Loop through files
```bash
for file in *.txt; do
    echo "Processing $file"
done
```

### Read user input
```bash
read -p "Enter value: " user_value
```

### Function definition
```bash
my_function() {
    local arg1="$1"
    echo "Received: $arg1"
}
```

## Tips

1. **Quote variables**: Always use `"$variable"` to prevent word splitting
2. **Use [[ ]] for tests**: More features than [ ]
3. **Shellcheck**: Use `shellcheck script.sh` to validate scripts
4. **Exit codes**: Use `$?` to check last command status
5. **Debugging**: Use `set -x` to trace execution

## Safety First

- Always test scripts in safe environment first
- Use `set -e` to exit on errors
- Validate input parameters
- Quote file paths to handle spaces
- Use absolute paths when possible

Versions

The database has no other skills named Linux Bash.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version f072ffb295b1 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100linux-shell-scripting
    This skill should be used when the user asks to "create bash scripts", "automate Linux tasks", "monitor system resources", "backup files", "manage users", or "write production shell scripts". It provides ready-to-use shell script templates for system administration.
  • 95bash-linux
    Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.
  • 95bash-linux
    Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.
  • 95bash-linux
    Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.
  • 95bash-linux
    Bash and Linux/macOS shell patterns - operators, files, processes, text tools, scripts. Use for shell work on Unix.
  • 100bash-linux
    Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.