# Development Machine Applications - Complete Installation Guide This comprehensive guide details ALL 60+ applications and tools installed on development machines via Ansible playbooks. Each application includes purpose, usage examples, and practical commands to help you get the most out of your development environment. ## 📋 **Navigation** - [Base System Tools](#base-system-tools) (17 applications) - [SSH & Security](#ssh--security) (Multiple tools) - [Development Tools](#development-tools) (6 applications) - [Shell Environment](#shell-environment) (6 tools) - [Desktop Applications](#desktop-applications) (4 applications) - [IDE & Code Editors](#ide--code-editors) (2 applications) - [Container Platform](#container-platform) (5 components) - [System Monitoring](#system-monitoring) (14 applications) - [Backup Tools](#backup-tools) (4 applications) - [VPN & Networking](#vpn--networking) (2 components) - [Custom Scripts](#custom-scripts) (4 scripts) --- ## Base System Tools Essential command-line utilities and system tools that form the foundation of any development environment. ### curl **Purpose**: Command-line tool for transferring data with URLs **Use**: Download files, test APIs, send HTTP requests, and transfer data between servers. **Syntax**: `curl [options] [URL]` **Examples**: ```bash # Download a file curl -O https://example.com/file.zip # Test API endpoints curl -X GET https://api.github.com/users/octocat curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://api.example.com # Follow redirects and show headers curl -L -I https://github.com # Download with progress bar curl --progress-bar -O https://example.com/largefile.zip ``` ### wget **Purpose**: Network downloader for retrieving files from web servers **Use**: Download files, mirror websites, resume interrupted downloads. **Syntax**: `wget [options] [URL]` **Examples**: ```bash # Download a file wget https://example.com/file.tar.gz # Download recursively (mirror site) wget -r -np -k https://example.com/docs/ # Resume interrupted download wget -c https://example.com/largefile.iso # Download in background wget -b https://example.com/file.zip ``` ### unzip **Purpose**: Extract files from ZIP archives **Use**: Decompress ZIP files, view archive contents, extract specific files. **Syntax**: `unzip [options] archive.zip` **Examples**: ```bash # Extract all files unzip archive.zip # Extract to specific directory unzip archive.zip -d /target/directory/ # List contents without extracting unzip -l archive.zip # Extract specific files unzip archive.zip file1.txt file2.txt ``` ### xclip **Purpose**: Command-line clipboard interface **Use**: Copy/paste text between terminal and GUI applications. **Syntax**: `xclip [options]` **Examples**: ```bash # Copy text to clipboard echo "Hello World" | xclip -sel clipboard # Copy file contents to clipboard xclip -sel clipboard < file.txt # Paste from clipboard xclip -sel clipboard -o # Copy command output ls -la | xclip -sel clipboard ``` ### tree **Purpose**: Display directory structure in tree format **Use**: Visualize file system hierarchy, understand project structure. **Syntax**: `tree [options] [directory]` **Examples**: ```bash # Show current directory tree tree # Show with file sizes tree -s # Show hidden files tree -a # Limit depth tree -L 2 # Output to file tree > project_structure.txt ``` ### net-tools **Purpose**: Collection of networking utilities **Use**: Network configuration and troubleshooting (netstat, ifconfig, route). **Examples**: ```bash # Show network interfaces ifconfig # Show listening ports netstat -tulpn # Show routing table route -n # Show network statistics netstat -s ``` ### jq **Purpose**: Command-line JSON processor **Use**: Parse, filter, and manipulate JSON data in shell scripts and pipelines. **Syntax**: `jq [options] 'filter' [file]` **Examples**: ```bash # Pretty print JSON echo '{"name":"John","age":30}' | jq '.' # Extract specific field curl -s https://api.github.com/users/octocat | jq '.name' # Filter arrays echo '[{"name":"John"},{"name":"Jane"}]' | jq '.[].name' # Complex filtering jq '.users[] | select(.age > 25) | .name' users.json ``` ### ripgrep (rg) **Purpose**: Ultra-fast text search tool **Use**: Search for patterns in files, replace grep with better performance. **Syntax**: `rg [options] pattern [path]` **Examples**: ```bash # Search for text in current directory rg "function" # Search in specific file types rg "TODO" --type js # Case insensitive search rg -i "error" # Show line numbers and context rg -n -C 3 "import" # Search and replace preview rg "old_function" --replace "new_function" ``` ### fd-find (fd) **Purpose**: Fast and user-friendly alternative to find **Use**: Search for files and directories with simple syntax. **Syntax**: `fd [options] pattern [path]` **Examples**: ```bash # Find files by name fd config # Find by extension fd -e js # Find directories only fd -t d src # Execute command on results fd -e log -x rm {} # Search hidden files fd -H .env ``` ### yq (via snap) **Purpose**: YAML processor and query tool **Use**: Parse, filter, and manipulate YAML files. **Syntax**: `yq [options] 'query' [file]` **Examples**: ```bash # Pretty print YAML yq '.' config.yaml # Extract specific field yq '.database.host' config.yaml # Convert YAML to JSON yq -o json config.yaml # Update YAML values yq '.port = 8080' config.yaml ``` ### btop (via snap) **Purpose**: Modern system monitor and process viewer **Use**: Monitor system resources, processes, and network activity with beautiful interface. **Examples**: ```bash # Launch btop btop # Key shortcuts within btop: # 'q' - quit # 'm' - toggle memory view # 'n' - toggle network view # 't' - toggle tree view # '+/-' - increase/decrease update interval ``` ### Additional Base System Tools These monitoring and system tools are also included in the base installation: #### **iotop** **Purpose**: I/O usage monitoring **Use**: Monitor disk read/write activity by process for performance analysis. **Syntax**: `iotop [options]` **Examples**: ```bash # Monitor I/O in real-time sudo iotop # Show only processes doing I/O sudo iotop -o # Show accumulated I/O sudo iotop -a # Non-interactive mode sudo iotop -b -n 3 ``` #### **nethogs** **Purpose**: Network bandwidth monitoring per process **Use**: See which applications are using network bandwidth in real-time. **Syntax**: `nethogs [options] [device]` **Examples**: ```bash # Monitor network usage sudo nethogs # Monitor specific interface sudo nethogs eth0 # Monitor with custom delay sudo nethogs -d 5 # Monitor multiple interfaces sudo nethogs eth0 wlan0 ``` #### **logwatch** **Purpose**: Log analysis and reporting **Use**: Automatically analyze system logs and generate summary reports. **Syntax**: `logwatch [options]` **Examples**: ```bash # Generate today's report logwatch --detail low --mailto admin@example.com # Generate report for date range logwatch --range yesterday --detail high # View specific service logs logwatch --service sshd --detail high ``` --- ## SSH & Security Tools for secure remote access, system protection, and network security. ### openssh-server **Purpose**: SSH daemon server for secure remote access **Use**: Enables secure shell connections to your machine from other systems. **Syntax**: Service management via systemctl **Examples**: ```bash # Check SSH service status sudo systemctl status ssh # Start/stop/restart SSH service sudo systemctl start ssh sudo systemctl restart ssh # Connect to remote server ssh username@hostname ssh -p 2222 user@server.com # Custom port ``` ### ufw (Uncomplicated Firewall) **Purpose**: Simple firewall management **Use**: Protect your system by controlling network traffic with easy rules. **Syntax**: `ufw [options] [rule]` **Examples**: ```bash # Enable/disable firewall sudo ufw enable sudo ufw disable # Allow/deny ports sudo ufw allow 22 # SSH sudo ufw allow 80/tcp # HTTP sudo ufw deny 23 # Telnet # Check status sudo ufw status verbose ``` ### fail2ban **Purpose**: Intrusion prevention system **Use**: Automatically bans IP addresses showing suspicious activity. **Syntax**: `fail2ban-client [options]` **Examples**: ```bash # Check status sudo fail2ban-client status # Check specific jail sudo fail2ban-client status sshd # Unban IP address sudo fail2ban-client set sshd unbanip 192.168.1.100 # Start/stop service sudo systemctl restart fail2ban ``` --- ## Development Tools Essential tools for software development including version control, programming languages, and build systems. ### git **Purpose**: Distributed version control system **Use**: Track code changes, collaborate with teams, manage project history. **Syntax**: `git [command] [options]` **Examples**: ```bash # Initialize repository git init # Clone repository git clone https://github.com/user/repo.git # Stage and commit changes git add . git commit -m "Add new feature" # Push to remote git push origin main # Create and switch branch git checkout -b feature-branch # Merge branches git merge feature-branch # View commit history git log --oneline --graph ``` ### nodejs & npm **Purpose**: JavaScript runtime and package manager **Use**: Run JavaScript outside browsers, manage project dependencies. **Syntax**: `node [script]` / `npm [command]` **Examples**: ```bash # Run JavaScript file node app.js # Initialize new project npm init -y # Install dependencies npm install express npm install -g typescript # Run scripts npm start npm test # Check installed packages npm list npm outdated ``` ### python3 & pip3 **Purpose**: Python programming language and package installer **Use**: Python development, scripting, data analysis, web development. **Syntax**: `python3 [script]` / `pip3 [command]` **Examples**: ```bash # Run Python script python3 script.py # Interactive Python shell python3 # Install packages pip3 install requests pip3 install -r requirements.txt # List installed packages pip3 list pip3 show requests # Create virtual environment python3 -m venv myenv source myenv/bin/activate ``` ### build-essential **Purpose**: Essential compilation tools for building software **Use**: Compile C/C++ programs, build native modules, install packages from source. **Examples**: ```bash # Compile C program gcc -o program program.c # Compile C++ program g++ -o program program.cpp # Build with make make make install # Check compiler versions gcc --version g++ --version ``` --- ## Shell Environment Advanced shell configuration and terminal multiplexing tools for enhanced productivity. ### zsh **Purpose**: Advanced shell with powerful features **Use**: Enhanced command-line experience with better completion and customization. **Examples**: ```bash # Switch to zsh chsh -s /usr/bin/zsh # Check current shell echo $SHELL # Zsh-specific features: # - Better tab completion # - Glob patterns: **/*.js # - Parameter expansion: ${file%.txt}.bak ``` ### tmux **Purpose**: Terminal multiplexer **Use**: Split terminal windows, create persistent sessions, manage multiple terminal sessions. **Syntax**: `tmux [command]` **Examples**: ```bash # Start new session tmux new-session -s mysession # List sessions tmux list-sessions # Attach to session tmux attach-session -t mysession # Detach from session (inside tmux) Ctrl+b d # Split window horizontally Ctrl+b % # Split window vertically Ctrl+b " # Switch between panes Ctrl+b arrow-keys ``` ### fzf **Purpose**: Command-line fuzzy finder **Use**: Interactively search files, command history, and process lists. **Examples**: ```bash # Find and edit file vim $(fzf) # Search command history history | fzf # Find and kill process kill $(ps aux | fzf | awk '{print $2}') # Search in current directory find . -type f | fzf # Integration with other commands git log --oneline | fzf ``` ### Oh My Zsh **Purpose**: Zsh configuration framework **Use**: Manage zsh configuration with themes and plugins. **Examples**: ```bash # Update Oh My Zsh omz update # List available themes omz theme list # Set theme omz theme set powerlevel10k # List plugins omz plugin list # Enable plugin # Edit ~/.zshrc and add to plugins array ``` ### **Essential Oh My Zsh Plugins Guide** The following plugins significantly enhance your shell experience. Add them to your `~/.zshrc` file: ```bash plugins=(git sudo z colored-man-pages fzf zsh-syntax-highlighting zsh-autosuggestions web-search copypath) ``` ##### **git** **Purpose**: Git integration and aliases **Usage**: Provides shortcuts and status information for Git repositories ```bash # Aliases provided: ga # git add gst # git status gc # git commit gp # git push gl # git pull gco # git checkout gbr # git branch # Branch info in prompt automatically shown # Works in any Git repository ``` ##### **sudo** **Purpose**: Easily retry commands with sudo **Usage**: Press `ESC` twice to add sudo to the beginning of current command ```bash # Type a command that needs sudo apt update # Press ESC ESC to get: sudo apt update # Also works with previous command # Just press ESC ESC on empty line ``` ##### **z** **Purpose**: Smart directory jumping based on frequency **Usage**: Jump to frequently used directories with partial names ```bash # After visiting directories, z learns your patterns cd ~/Documents/code/projects/myapp cd ~/Downloads cd ~/Documents/code/projects/myapp # visited again # Later, jump directly: z myapp # jumps to ~/Documents/code/projects/myapp z doc # jumps to ~/Documents z proj # jumps to ~/Documents/code/projects # List all tracked directories z -l ``` ##### **colored-man-pages** **Purpose**: Colorized manual pages for better readability **Usage**: Automatic - man pages now have syntax highlighting ##### **fzf** **Purpose**: Fuzzy finder integration with zsh **Usage**: Enhanced command-line searching and filtering ```bash # Search command history with fzf Ctrl+R # Interactive history search # Search files Ctrl+T # Insert selected files into command line # Change directory Alt+C # cd into selected directory ``` ##### **zsh-syntax-highlighting** **Purpose**: Real-time command syntax highlighting **Usage**: Automatic visual feedback while typing commands - Valid commands appear in green - Invalid commands appear in red - Paths, strings, and options are color-coded ##### **zsh-autosuggestions** **Purpose**: Fish-like intelligent command suggestions **Usage**: Shows command suggestions based on history ```bash # Automatic features: # - Gray suggestions appear as you type # - Press → (right arrow) to accept suggestion # - Press Ctrl+f to accept suggestion # - Press Alt+f to accept one word ``` ##### **web-search** **Purpose**: Quick web searches from command line **Usage**: Search various websites directly from terminal ```bash # Search engines available: google "search term" # Google search duckduckgo "search term" # DuckDuckGo search github "repository name" # GitHub search stackoverflow "question" # Stack Overflow search # Examples: google "python tutorial" github "awesome-zsh-plugins" stackoverflow "zsh configuration" ``` ##### **copypath** **Purpose**: Copy file/directory paths to clipboard **Usage**: Quickly copy paths for use in other applications ```bash # Copy current directory path copypath # Copy specific file path copypath filename.txt # Copy absolute path copypath /full/path/to/file ``` ### Powerlevel10k **Purpose**: Zsh theme with rich prompt customization **Use**: Beautiful and informative command prompt with git status, system info. **Examples**: ```bash # Configure theme p10k configure # Show configuration wizard p10k configure # Instant prompt (in .zshrc) # Enable Powerlevel10k instant prompt ``` ### zsh-syntax-highlighting **Purpose**: Real-time syntax highlighting for zsh commands **Use**: Provides visual feedback by highlighting commands as you type them. **Features**: - Valid commands appear in green - Invalid commands appear in red - Strings, options, and paths are color-coded - Works automatically after installation ### zsh-autosuggestions **Purpose**: Fish-like intelligent autosuggestions for zsh **Use**: Suggests commands based on your command history as you type. **Examples**: ```bash # These work automatically after installation: # - Type partial command, see gray suggestion # - Press → (right arrow) to accept full suggestion # - Press Ctrl+f to accept suggestion # - Press Alt+f to accept one word # - Press Ctrl+e to accept to end of line # Example: typing 'git' might suggest 'git status' in gray ``` ### Custom Aliases & Functions The system comes with a comprehensive set of aliases to improve productivity. Here are the key categories: #### **Navigation & File Operations** ```bash # Quick navigation alias ..="cd .." # Go up one directory alias ...="cd ../.." # Go up two directories alias ....="cd ../../.." # Go up three directories alias cd..="cd .." # Handle common typo alias h="cd ~" # Go to home directory alias dc="cd ~/Documents/code" # Go to code directory # File listing with colors alias ls="ls --color=auto" # Colorized ls output # Clear screen shortcut alias c="clear" # Quick clear ``` #### **System Information & Monitoring** ```bash # Disk and memory usage (human readable) alias df="df -h" # Disk usage: df -h shows sizes in KB, MB, GB alias du="du -h" # Directory usage: du -h /path shows folder sizes alias free="free -h" # Memory usage: free -h shows RAM/swap usage # Process management alias ps="ps aux" # Show all processes: ps aux | grep process_name alias cpu="lscpu" # CPU information: shows cores, architecture, etc. alias top="btop" # Use modern btop instead of top alias mem="free -m" # Memory in MB: quick memory check alias ports="ss -tulpn" # Open ports: see what's listening on which ports # Examples: # df -h # Check disk space # du -h ~/Downloads # Check Downloads folder size # free -h # Check memory usage # ports | grep :80 # Check if port 80 is in use ``` #### **Network Information** ```bash # IP address information alias myip="curl -s http://ipecho.net/plain; echo" # Get public IP alias localip="ip route get 1.2.3.4 | awk '{print $7}'" # Get local IP # Examples: # myip # Shows: 203.0.113.42 (your public IP) # localip # Shows: 192.168.1.100 (your local network IP) ``` #### **Development Tools** ```bash # Python shortcuts alias py="python3" # Quick python3 access alias pip="pip3" # Use pip3 by default alias venv="python3 -m venv" # Create virtual environment alias activate="source venv/bin/activate" # Activate venv # Examples: # py script.py # Run Python script # venv myproject # Create virtual environment # activate # Activate the venv in current directory # pip install requests # Install package in active venv ``` #### **Docker Shortcuts** ```bash # Docker command shortcuts alias d="docker" # Short docker command alias dc="docker-compose" # Docker Compose shortcut alias dcu="docker-compose up -d" # Start containers in background alias dcd="docker-compose down" # Stop and remove containers alias dcb="docker-compose build" # Build containers alias dps="docker ps" # Show running containers alias di="docker images" # Show docker images # Examples: # dps # Quick check of running containers # dcu # Start your docker-compose project # dcd # Stop your docker-compose project # d exec -it container_name bash # Enter running container ``` #### **Package Management** ```bash # Debian/Ubuntu package management alias update="sudo apt update && sudo apt upgrade -y" # Update system alias install="sudo apt install" # Install package alias remove="sudo apt remove" # Remove package alias search="apt search" # Search for packages # Examples: # update # Update all system packages # install htop # Install htop package # search python # Find python-related packages # remove old-package # Uninstall package ``` #### **File Permissions & Ownership** ```bash # Permission shortcuts alias chmox="chmod +x" # Make file executable alias own="sudo chown -R $USER:$USER" # Take ownership of files # Examples: # chmox script.sh # Make script executable # own ~/Downloads # Take ownership of Downloads folder ``` #### **Date & Time** ```bash # Date and time shortcuts alias now="date +'%Y-%m-%d %H:%M:%S'" # Current timestamp alias today="date +'%Y-%m-%d'" # Today's date # Examples: # now # Shows: 2023-12-01 14:30:45 # today # Shows: 2023-12-01 ``` #### **Configuration Management** ```bash # Zsh configuration shortcuts alias reload="source ~/.zshrc && echo 'ZSH config reloaded from ~/.zshrc'" alias editrc="nano ~/.zshrc" # Edit zsh configuration # Examples: # editrc # Open .zshrc in nano editor # reload # Reload zsh configuration after changes ``` #### **Node.js Development** ```bash # Node.js project shortcuts alias nfresh="rm -rf node_modules/ package-lock.json && npm install" # Examples: # nfresh # Clean install - removes node_modules and reinstalls # # Useful when package-lock.json conflicts occur ``` ### Environment Variables & Path Configuration The shell environment includes several important environment variables: ```bash # Node Version Manager (NVM) export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # Python pipx tools path export PATH="$PATH:/home/beast/.local/bin" # Examples of using these: # nvm install 18 # Install Node.js version 18 # nvm use 16 # Switch to Node.js version 16 # nvm list # List installed Node.js versions ``` ### Pro Tips for Using Aliases ```bash # View all aliases alias # Show all defined aliases # Create temporary alias (session only) alias ll="ls -la" # Create ll alias for detailed listing # Add permanent alias to ~/.zshrc echo 'alias myalias="command"' >> ~/.zshrc reload # Reload to apply changes # Use aliases in combination dps | grep nginx # Show only nginx containers ports | grep :3000 # Check if port 3000 is in use update && install docker # Update system then install docker ``` --- ## Desktop Applications GUI applications for productivity, web browsing, and document management. ### Brave Browser **Purpose**: Privacy-focused web browser **Use**: Web browsing with built-in ad blocking and privacy protection. **Features**: - Built-in ad blocker - Tor browsing mode - Cryptocurrency rewards - Enhanced privacy controls ### LibreOffice **Purpose**: Complete office suite **Use**: Document creation, spreadsheets, presentations, and more. **Components**: - Writer (documents) - Calc (spreadsheets) - Impress (presentations) - Draw (graphics) - Base (databases) ### Redshift **Purpose**: Blue light filter for displays **Use**: Reduce eye strain by adjusting screen color temperature based on time. **Examples**: ```bash # Start redshift redshift # Set location manually redshift -l 40.7:-74.0 # NYC coordinates # Set color temperature redshift -t 6500:3500 # One-time adjustment redshift -O 3500 ``` ### Evince **Purpose**: PDF document viewer **Use**: View PDF files, documents, and e-books. **Features**: - PDF viewing and navigation - Search within documents - Annotation support - Print functionality --- ## IDE & Code Editors Integrated development environments and code editors for software development. ### Visual Studio Code (via snap) **Purpose**: Lightweight but powerful code editor **Use**: Multi-language code editing with extensive plugin ecosystem. **Examples**: ```bash # Open VS Code code # Open specific file code filename.js # Open current directory code . # Open with specific workspace code workspace.code-workspace # Install extension from command line code --install-extension ms-python.python ``` ### Cursor (via snap) **Purpose**: AI-powered code editor **Use**: Code editing with integrated AI assistance for development. **Features**: - AI-powered code completion - Natural language code generation - Intelligent code suggestions - Built on VS Code foundation --- ## Container Platform Docker ecosystem for containerization and application deployment. ### Docker CE (Community Edition) **Purpose**: Container platform for application packaging and deployment **Use**: Create, manage, and run containers for consistent development environments. **Examples**: ```bash # Check Docker version docker --version # Run container docker run hello-world docker run -it ubuntu bash # List containers docker ps docker ps -a # Build image docker build -t myapp . # Run with port mapping docker run -p 8080:80 nginx # Execute command in running container docker exec -it container_name bash ``` ### Docker CLI **Purpose**: Command-line interface for Docker **Use**: Manage containers, images, networks, and volumes from command line. **Examples**: ```bash # Image management docker images docker pull nginx docker rmi image_name # Container management docker start container_name docker stop container_name docker rm container_name # System cleanup docker system prune docker image prune ``` ### containerd.io **Purpose**: Container runtime **Use**: Low-level container runtime that Docker uses internally. **Note**: Typically managed automatically by Docker, not used directly. ### Docker Buildx plugin **Purpose**: Extended build capabilities for Docker **Use**: Build multi-platform images and advanced build features. **Examples**: ```bash # Create builder instance docker buildx create --name mybuilder --use # Build for multiple platforms docker buildx build --platform linux/amd64,linux/arm64 -t myapp . # Inspect builder docker buildx inspect ``` ### Docker Compose plugin **Purpose**: Multi-container application management **Use**: Define and run multi-container Docker applications using YAML files. **Examples**: ```bash # Start services defined in docker-compose.yml docker compose up # Start in background docker compose up -d # Stop services docker compose down # View logs docker compose logs # Scale services docker compose scale web=3 # Example docker-compose.yml: version: '3.8' services: web: image: nginx ports: - "80:80" db: image: postgres environment: POSTGRES_PASSWORD: password ``` --- ## System Monitoring Comprehensive tools for monitoring system performance, network activity, and resource usage. ### htop **Purpose**: Interactive process viewer **Use**: Monitor system processes with enhanced interface compared to top. **Examples**: ```bash # Launch htop htop # Key shortcuts within htop: # F1 - Help # F2 - Setup # F3 - Search # F4 - Filter # F5 - Tree view # F6 - Sort by # F9 - Kill process # F10 - Quit ``` ### iotop **Purpose**: I/O usage monitoring by process **Use**: Monitor disk read/write activity to identify I/O bottlenecks. **Examples**: ```bash # Monitor I/O in real-time sudo iotop # Show only processes doing I/O sudo iotop -o # Show accumulated I/O sudo iotop -a # Non-interactive mode sudo iotop -b -n 3 ``` ### nethogs **Purpose**: Network bandwidth monitoring per process **Use**: See which applications are using network bandwidth. **Examples**: ```bash # Monitor network usage sudo nethogs # Monitor specific interface sudo nethogs eth0 # Monitor with custom delay sudo nethogs -d 5 # Monitor multiple interfaces sudo nethogs eth0 wlan0 ``` ### iftop **Purpose**: Network bandwidth monitor **Use**: Display network usage on interface in real-time. **Examples**: ```bash # Monitor default interface sudo iftop # Monitor specific interface sudo iftop -i eth0 # Show port numbers sudo iftop -P # Don't resolve hostnames sudo iftop -n ``` ### ncdu **Purpose**: Disk usage analyzer with interactive interface **Use**: Analyze disk space usage and identify large files/directories. **Examples**: ```bash # Analyze current directory ncdu # Analyze specific directory ncdu /var/log # Export results to file ncdu -o diskusage.json # Navigation within ncdu: # Arrow keys - navigate # Enter - enter directory # 'd' - delete file/directory # 'q' - quit ``` ### dstat **Purpose**: Versatile system statistics tool **Use**: Monitor system performance metrics in real-time. **Examples**: ```bash # Basic system stats dstat # Show specific metrics dstat -cdngy # cpu, disk, network, page, system # Show top processes using CPU dstat --top-cpu # Show top processes using I/O dstat --top-io # Output to CSV dstat --output stats.csv ``` ### nmap **Purpose**: Network discovery and security scanner **Use**: Scan networks, discover hosts, identify open ports and services. **Examples**: ```bash # Scan single host nmap 192.168.1.1 # Scan network range nmap 192.168.1.0/24 # Scan specific ports nmap -p 22,80,443 192.168.1.1 # Service version detection nmap -sV 192.168.1.1 # OS detection nmap -O 192.168.1.1 # Aggressive scan nmap -A 192.168.1.1 ``` ### tcpdump **Purpose**: Network packet analyzer **Use**: Capture and analyze network traffic for troubleshooting. **Examples**: ```bash # Capture all traffic sudo tcpdump # Capture on specific interface sudo tcpdump -i eth0 # Capture specific host sudo tcpdump host 192.168.1.1 # Capture specific port sudo tcpdump port 80 # Save to file sudo tcpdump -w capture.pcap # Read from file tcpdump -r capture.pcap ``` ### wireshark-common **Purpose**: Network protocol analyzer utilities **Use**: Command-line tools for network analysis (part of Wireshark suite). **Examples**: ```bash # Analyze capture file tshark -r capture.pcap # Live capture sudo tshark -i eth0 # Filter specific protocol tshark -f "tcp port 80" # Export specific fields tshark -T fields -e ip.src -e ip.dst -r capture.pcap ``` ### sysstat **Purpose**: System performance monitoring tools **Use**: Collect and report system activity statistics. **Examples**: ```bash # CPU usage over time sar -u 1 10 # Memory usage sar -r 1 10 # Disk I/O statistics iostat 1 10 # Network statistics sar -n DEV 1 10 # Generate daily report sar -A ``` ### atop **Purpose**: Advanced system and process monitor **Use**: Detailed system performance monitoring with historical data. **Examples**: ```bash # Launch atop atop # View specific time atop -r /var/log/atop/atop_20231201 # Key shortcuts within atop: # 'g' - generic info # 'm' - memory info # 'd' - disk info # 'n' - network info # 'q' - quit ``` ### btop (via snap) **Purpose**: Modern system monitor with beautiful interface **Use**: Resource monitoring with graphs and modern terminal UI. **Examples**: ```bash # Launch btop btop # Key shortcuts: # 'q' - quit # 'm' - toggle memory view # 'n' - toggle network view # 't' - toggle tree view # '+/-' - adjust update interval ``` ### bandwhich (via snap) **Purpose**: Network utilization monitor by process **Use**: See which processes are using network bandwidth in real-time. **Examples**: ```bash # Monitor network usage sudo bandwhich # Show processes and connections sudo bandwhich --show-processes --show-connections # Monitor specific interface sudo bandwhich --interface eth0 ``` --- ## Backup Tools Comprehensive backup solutions for data protection and synchronization. ### rsync **Purpose**: File synchronization and backup tool **Use**: Efficiently sync files between locations, create backups. **Syntax**: `rsync [options] source destination` **Examples**: ```bash # Basic sync rsync -av /source/ /destination/ # Sync with progress rsync -av --progress /source/ /destination/ # Sync over SSH rsync -av /local/path/ user@server:/remote/path/ # Exclude files rsync -av --exclude='*.log' /source/ /destination/ # Dry run (test without changes) rsync -av --dry-run /source/ /destination/ # Delete files in destination not in source rsync -av --delete /source/ /destination/ ``` ### borgbackup **Purpose**: Deduplicating backup program **Use**: Create space-efficient encrypted backups with deduplication. **Examples**: ```bash # Initialize repository borg init --encryption=repokey /path/to/repo # Create backup borg create /path/to/repo::backup-{now} ~/Documents ~/Pictures # List archives borg list /path/to/repo # Extract archive borg extract /path/to/repo::backup-2023-12-01 # Mount archive as filesystem borg mount /path/to/repo::backup-2023-12-01 /mnt/backup # Check repository borg check /path/to/repo ``` ### rclone **Purpose**: Cloud storage synchronization tool **Use**: Sync files with cloud storage providers (Google Drive, Dropbox, AWS S3, etc.). **Examples**: ```bash # Configure cloud storage rclone config # List configured remotes rclone listremotes # Sync to cloud rclone sync /local/path remote:bucket/path # Copy files rclone copy /local/file remote:bucket/ # Mount cloud storage rclone mount remote:bucket /mnt/cloud --daemon # Check differences rclone check /local/path remote:bucket/path ``` ### restic **Purpose**: Fast, secure backup program **Use**: Create encrypted backups to various storage backends. **Examples**: ```bash # Initialize repository restic init --repo /path/to/repo # Create backup restic backup ~/Documents --repo /path/to/repo # List snapshots restic snapshots --repo /path/to/repo # Restore files restic restore latest --repo /path/to/repo --target /restore/path # Mount snapshots restic mount --repo /path/to/repo /mnt/restic # Check repository restic check --repo /path/to/repo ``` --- ## VPN & Networking Secure networking and VPN solutions for private connectivity. ### Tailscale **Purpose**: Mesh VPN service **Use**: Create secure private networks between devices across the internet. **Examples**: ```bash # Login to Tailscale sudo tailscale up # Check status tailscale status # Show IP addresses tailscale ip # Logout tailscale logout # Enable exit node sudo tailscale up --advertise-exit-node # Use exit node sudo tailscale up --exit-node=100.x.x.x ``` ### tailscaled **Purpose**: Tailscale daemon **Use**: Background service that maintains VPN connections. **Examples**: ```bash # Check service status sudo systemctl status tailscaled # Start/stop service sudo systemctl start tailscaled sudo systemctl stop tailscaled # Enable at boot sudo systemctl enable tailscaled ``` --- ## Custom Scripts Custom monitoring and backup scripts for system administration. ### /usr/local/bin/monitoring/sysinfo **Purpose**: System overview dashboard script **Use**: Display comprehensive system information and status. **Examples**: ```bash # Run system info script sysinfo # Typical output includes: # - System uptime and load # - Memory and disk usage # - Network interfaces # - Running services # - Recent log entries ``` ### /usr/local/bin/monitoring/netinfo **Purpose**: Network monitoring script **Use**: Display network status, connections, and traffic information. **Examples**: ```bash # Run network info script netinfo # Typical output includes: # - Network interfaces and IPs # - Active connections # - Network statistics # - Bandwidth usage # - Routing table ``` ### /opt/backups/scripts/backup-home.sh **Purpose**: Home directory backup script **Use**: Automated backup of user home directories. **Examples**: ```bash # Run home backup sudo /opt/backups/scripts/backup-home.sh # Typically includes: # - User documents and files # - Configuration files # - Application data # - Compression and encryption ``` ### /opt/backups/scripts/backup-system.sh **Purpose**: System configuration backup script **Use**: Backup critical system configurations and settings. **Examples**: ```bash # Run system backup sudo /opt/backups/scripts/backup-system.sh # Typically backs up: # - System configuration files # - Package lists # - Service configurations # - User account information ``` --- ## 🎯 **Quick Reference** ### **Most Used Commands** ```bash # System monitoring htop # Process monitor btop # Modern system monitor docker ps # Container status tailscale status # VPN status # Development git status # Git repository status npm start # Run Node.js project python3 app.py # Run Python script code . # Open VS Code in current directory # File operations rg "pattern" # Search in files fd filename # Find files tree -L 2 # Show directory structure rsync -av src/ dst/ # Sync directories # System administration sudo ufw status # Firewall status sudo systemctl status docker # Service status journalctl -f # View system logs ncdu # Analyze disk usage ``` ### **Configuration Files** - **Zsh**: `~/.zshrc`, `~/.p10k.zsh` - **Git**: `~/.gitconfig` - **SSH**: `~/.ssh/config`, `~/.ssh/authorized_keys` - **Tmux**: `~/.tmux.conf` - **Docker**: `/etc/docker/daemon.json` ### **Service Management** ```bash # Check service status sudo systemctl status # Start/stop/restart services sudo systemctl start sudo systemctl stop sudo systemctl restart # Enable/disable at boot sudo systemctl enable sudo systemctl disable ``` --- *This comprehensive guide covers all applications installed via the Ansible automation system. Each tool is configured and ready for immediate use in your development environment.*