document updates
This commit is contained in:
78
docs/tech_docs/linux/FFmpeg.md
Normal file
78
docs/tech_docs/linux/FFmpeg.md
Normal file
@@ -0,0 +1,78 @@
|
||||
### Extracting Audio from Video with FFmpeg
|
||||
|
||||
First, you'll extract the audio from your video file into a `.wav` format suitable for speech recognition:
|
||||
|
||||
1. **Open your terminal.**
|
||||
|
||||
2. **Run the FFmpeg command to extract audio:**
|
||||
```bash
|
||||
ffmpeg -i input_video.mp4 -vn -acodec pcm_s16le -ar 16000 -ac 1 output_audio.wav
|
||||
```
|
||||
- Replace `input_video.mp4` with the path to your video file.
|
||||
- The output will be a `.wav` file named `output_audio.wav`.
|
||||
|
||||
### Setting Up the Python Virtual Environment and DeepSpeech
|
||||
|
||||
Next, prepare your environment for running DeepSpeech:
|
||||
|
||||
1. **Update your package list (optional but recommended):**
|
||||
```bash
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
2. **Install Python3-venv if you haven't already:**
|
||||
```bash
|
||||
sudo apt install python3-venv
|
||||
```
|
||||
|
||||
3. **Create a Python virtual environment:**
|
||||
```bash
|
||||
python3 -m venv deepspeech-venv
|
||||
```
|
||||
|
||||
4. **Activate the virtual environment:**
|
||||
```bash
|
||||
source deepspeech-venv/bin/activate
|
||||
```
|
||||
|
||||
### Installing DeepSpeech
|
||||
|
||||
With your virtual environment active, install DeepSpeech:
|
||||
|
||||
1. **Install DeepSpeech within the virtual environment:**
|
||||
```bash
|
||||
pip install deepspeech
|
||||
```
|
||||
|
||||
### Downloading DeepSpeech Pre-trained Models
|
||||
|
||||
Before transcribing, you need the pre-trained model files:
|
||||
|
||||
1. **Download the pre-trained DeepSpeech model and scorer files from the [DeepSpeech GitHub releases page](https://github.com/mozilla/DeepSpeech/releases).** Look for files named similarly to `deepspeech-0.9.3-models.pbmm` and `deepspeech-0.9.3-models.scorer`.
|
||||
|
||||
2. **Place the downloaded files in a directory where you plan to run the transcription, or note their paths for use in the transcription command.**
|
||||
|
||||
### Transcribing Audio to Text
|
||||
|
||||
Finally, you're ready to transcribe the audio file to text:
|
||||
|
||||
1. **Ensure you're in the directory containing both the audio file (`output_audio.wav`) and the DeepSpeech model files, or have their paths noted.**
|
||||
|
||||
2. **Run DeepSpeech with the following command:**
|
||||
```bash
|
||||
deepspeech --model deepspeech-0.9.3-models.pbmm --scorer deepspeech-0.9.3-models.scorer --audio output_audio.wav
|
||||
```
|
||||
- Replace `deepspeech-0.9.3-models.pbmm` and `deepspeech-0.9.3-models.scorer` with the paths to your downloaded model and scorer files, if they're not in the current directory.
|
||||
- Replace `output_audio.wav` with the path to your `.wav` audio file if necessary.
|
||||
|
||||
This command will output the transcription of your audio file directly in the terminal. The transcription process might take some time depending on the length of your audio file and the capabilities of your machine.
|
||||
|
||||
### Deactivating the Virtual Environment
|
||||
|
||||
After you're done, you can deactivate the virtual environment:
|
||||
|
||||
```bash
|
||||
deactivate
|
||||
```
|
||||
|
||||
This guide provides a streamlined process for extracting audio from video files and transcribing it to text using DeepSpeech on Debian-based Linux systems. It's a handy reference for tasks involving speech recognition and transcription.
|
||||
60
docs/tech_docs/linux/KVM-virtualization-setup.md
Normal file
60
docs/tech_docs/linux/KVM-virtualization-setup.md
Normal file
@@ -0,0 +1,60 @@
|
||||
### 1. Folder Structure Best Practices
|
||||
For a well-organized virtualization environment, consider the following directory structure:
|
||||
|
||||
- **VM Images Directory:**
|
||||
- Default path: `/var/lib/libvirt/images/`
|
||||
- This is the default location where the disk images of your VMs are stored. However, if you have a dedicated storage device or partition for VMs, you can create a directory there and symlink it to this path.
|
||||
|
||||
- **ISOs Directory:**
|
||||
- Suggested path: `/var/lib/libvirt/isos/`
|
||||
- Store all your downloaded ISO files here. This helps in easily locating and managing different OS installation media.
|
||||
|
||||
- **Cloud Images:**
|
||||
- Suggested path: `/var/lib/libvirt/cloud-images/`
|
||||
- If you plan to use cloud-init images for VMs, it's good to keep them separate from standard ISOs for clarity.
|
||||
|
||||
- **Snapshots and Backups:**
|
||||
- Suggested path: `/var/lib/libvirt/snapshots/` and `/var/lib/libvirt/backups/`
|
||||
- Having dedicated directories for snapshots and backups is crucial for easy management and recovery.
|
||||
|
||||
**Note:** Always ensure that these directories have appropriate permissions and are accessible by the `libvirt` group.
|
||||
|
||||
### 2. Networking Setup
|
||||
For networking, you typically have a few options:
|
||||
|
||||
- **NAT Network (Default):**
|
||||
- This is the default network (`virbr0`) set up by libvirt, providing NAT (Network Address Translation) to the VMs. VMs can access external networks through the host but are not accessible from outside by default.
|
||||
|
||||
- **Bridged Network:**
|
||||
- A bridge network connects VMs directly to the physical network, making them appear as physical hosts in your network. This is useful if you need VMs accessible from other machines in the network.
|
||||
- To set up a bridge, you can use `nmcli` (NetworkManager command-line interface) or manually edit network interface configuration files.
|
||||
|
||||
- **Host-Only Network:**
|
||||
- For VMs that only need to communicate with the host and other VMs, a host-only network is suitable.
|
||||
|
||||
**Verifying Network:**
|
||||
- Check the default network is active: `virsh net-list --all`
|
||||
- For custom network configurations, validate using `ip addr` and `brctl show`.
|
||||
|
||||
### 3. Storage Setup
|
||||
For VM storage, consider the following:
|
||||
|
||||
- **LVM (Logical Volume Management):**
|
||||
- Ideal for production environments. LVM allows for flexible management of disk space, easy resizing, and snapshotting capabilities.
|
||||
- You can create a dedicated volume group for your VMs for better management.
|
||||
|
||||
- **Standard Partitions:**
|
||||
- If you don’t use LVM, ensure that you have a partition or a separate disk with sufficient space for your VM images.
|
||||
|
||||
- **External/NAS Storage:**
|
||||
- For larger setups, you might consider network-attached storage (NAS). Ensure the NAS is mounted properly on your system and has the necessary read/write permissions.
|
||||
|
||||
- **Storage Pools:**
|
||||
- Libvirt can manage various types of storage pools. You can create and manage them using `virsh` or Virt-Manager.
|
||||
|
||||
### Final Checks and Tips
|
||||
|
||||
- **Permissions:** Ensure the `libvirt` group has proper permissions on all these directories.
|
||||
- **Security:** If your VMs are exposed to the internet, implement necessary security measures (firewalls, updates, secure passwords).
|
||||
- **Monitoring and Maintenance:** Regularly monitor the performance and storage usage. Tools like `virt-top` and `nmon` can be handy.
|
||||
- **Documentation:** Keep a record of your setup and configurations for future reference or troubleshooting.
|
||||
331
docs/tech_docs/linux/Linux-commands.md
Normal file
331
docs/tech_docs/linux/Linux-commands.md
Normal file
@@ -0,0 +1,331 @@
|
||||
# Linux `ls*` Commands Reference Guide
|
||||
|
||||
## File and Directory Listing
|
||||
- **ls**: List files and directories
|
||||
- `-l`: Long format
|
||||
- `-a`: Include hidden files
|
||||
- `-h`: Human-readable file sizes
|
||||
|
||||
## Hardware and System Information
|
||||
- **lsblk**: List block devices (hard drives, SSDs, USB drives)
|
||||
- **lscpu**: Display CPU architecture information (CPUs, cores, threads, CPU family, model)
|
||||
- **lsmod**: List currently loaded kernel modules
|
||||
- **lspci**: Show details about PCI buses and devices (graphics cards, network adapters)
|
||||
- **lsusb**: List USB devices
|
||||
|
||||
## System Configuration and Status
|
||||
- **lsb_release**: Display Linux distribution information (distributor ID, description, release number, codename)
|
||||
- **lslogins**: Display user information (login name, UID, GID, home directory, shell)
|
||||
- **lsof**: List open files by processes (including files, directories, network sockets)
|
||||
- **lsattr**: Display file attributes on a Linux second extended file system (immutable, append only, etc.)
|
||||
- **lsns**: List information about namespaces
|
||||
- **lsmem**: Show memory range available in the system
|
||||
|
||||
## Usage
|
||||
Each command can be explored further with its man page, for example, `man lsblk`.
|
||||
|
||||
> Note: This guide is a quick reference and does not cover all available options and nuances of each command.
|
||||
|
||||
---
|
||||
|
||||
# Linux System Administration Command Sets
|
||||
|
||||
## System Monitoring Commands
|
||||
- **top**: Displays real-time system stats, CPU, memory usage, and running processes.
|
||||
- **htop**: An interactive process viewer, similar to top but with more features.
|
||||
- **vmstat**: Reports virtual memory statistics.
|
||||
- **iostat**: Provides CPU and input/output statistics for devices and partitions.
|
||||
- **free**: Shows memory and swap usage.
|
||||
- **uptime**: Tells how long the system has been running.
|
||||
|
||||
## Network Management Commands
|
||||
- **ifconfig**: Configures and displays network interface parameters.
|
||||
- **ip**: Routing, devices, policy routing, and tunnels.
|
||||
- **netstat**: Displays network connections, routing tables, interface statistics.
|
||||
- **ss**: Utility to investigate sockets.
|
||||
- **ping**: Checks connectivity with a host.
|
||||
- **traceroute**: Traces the route taken by packets to reach a network host.
|
||||
|
||||
## Disk and File System Management
|
||||
- **df**: Reports file system disk space usage.
|
||||
- **du**: Estimates file and directory space usage.
|
||||
- **fdisk**: A disk partitioning tool.
|
||||
- **mount**: Mounts a file system.
|
||||
- **umount**: Unmounts a file system.
|
||||
- **fsck**: Checks and repairs a Linux file system.
|
||||
- **mkfs**: Creates a file system on a device.
|
||||
|
||||
## Security and User Management
|
||||
- **passwd**: Changes user passwords.
|
||||
- **chown**: Changes file owner and group.
|
||||
- **chmod**: Changes file access permissions.
|
||||
- **chgrp**: Changes group ownership.
|
||||
- **useradd/userdel**: Adds or deletes users.
|
||||
- **groupadd/groupdel**: Adds or deletes groups.
|
||||
- **sudo**: Executes a command as another user.
|
||||
- **iptables**: Administration tool for IPv4 packet filtering and NAT.
|
||||
|
||||
## Miscellaneous Useful Commands
|
||||
- **crontab**: Schedule a command to run at a certain time.
|
||||
- **grep**: Searches for patterns in files.
|
||||
- **awk**: Pattern scanning and processing language.
|
||||
- **sed**: Stream editor for filtering and transforming text.
|
||||
- **find**: Searches for files in a directory hierarchy.
|
||||
- **tar**: Archiving utility.
|
||||
- **wget**: Retrieves files from the web.
|
||||
|
||||
> Note: This is a basic overview of some essential system administration commands. Each command has its specific options and uses, which can be explored further in their man pages (e.g., `man top`).
|
||||
|
||||
---
|
||||
|
||||
# Expanded Linux System Administration Command Sets
|
||||
|
||||
## System Monitoring Commands
|
||||
- **top**: Displays real-time system stats, CPU, memory usage, and running processes. Interactive controls to sort and manage processes.
|
||||
- **htop**: An enhanced interactive process viewer, similar to top but with more features, better visual representation, and customization options.
|
||||
- **vmstat**: Reports virtual memory statistics, including processes, memory, paging, block IO, traps, and CPU activity.
|
||||
- **iostat**: Provides detailed CPU and input/output statistics for devices and partitions, useful for monitoring system input/output device loading.
|
||||
- **free**: Shows the total amount of free and used physical and swap memory in the system, and the buffers and caches used by the kernel.
|
||||
- **uptime**: Tells how long the system has been running, including the number of users and the system load averages for the past 1, 5, and 15 minutes.
|
||||
|
||||
## Network Management Commands
|
||||
- **ifconfig**: Configures and displays network interface parameters. Essential for network troubleshooting and configuration.
|
||||
- **ip**: A versatile command for routing, devices, policy routing, and tunnels. Replaces many older commands like ifconfig.
|
||||
- **netstat**: Displays network connections (both incoming and outgoing), routing tables, and a number of network interface statistics.
|
||||
- **ss**: A utility to investigate sockets, can display more detailed network statistics than netstat.
|
||||
- **ping**: Checks connectivity with a host, measures the round-trip time for messages sent to the destination.
|
||||
- **traceroute**: Traces the route taken by packets to reach a network host, helps in determining the path and measuring transit delays.
|
||||
|
||||
## Disk and File System Management
|
||||
- **df**: Reports the amount of disk space used and available on file systems.
|
||||
- **du**: Provides an estimation of file and directory space usage, can be used to find directories consuming excessive space.
|
||||
- **fdisk**: A disk partitioning tool, useful for creating and manipulating disk partition tables.
|
||||
- **mount/umount**: Mounts or unmounts file systems.
|
||||
- **fsck**: Checks and repairs a Linux file system, typically used for fixing unclean shutdowns or system crashes.
|
||||
- **mkfs**: Creates a file system on a device, usually used for formatting new partitions.
|
||||
- **lvextend/lvreduce**: Resize logical volume sizes in LVM.
|
||||
|
||||
## Security and User Management
|
||||
- **passwd**: Changes user account passwords, an essential tool for managing user security.
|
||||
- **chown**: Changes the user and/or group ownership of a given file, directory, or symbolic link.
|
||||
- **chmod**: Changes file access permissions, essential for managing file security.
|
||||
- **chgrp**: Changes the group ownership of files or directories.
|
||||
- **useradd/userdel**: Adds or deletes user accounts.
|
||||
- **groupadd/groupdel**: Adds or deletes groups.
|
||||
- **sudo**: Executes a command as another user, fundamental for privilege escalation and user command control.
|
||||
- **iptables**: An administration tool for IPv4 packet filtering and NAT, crucial for network security.
|
||||
|
||||
## Miscellaneous Useful Commands
|
||||
- **crontab**: Manages cron jobs for scheduling tasks to run at specific times.
|
||||
- **grep**: Searches text or files for lines containing a match to the given strings or patterns.
|
||||
- **awk**: A powerful pattern scanning and processing language, used for text/data extraction and reporting.
|
||||
- **sed**: A stream editor for filtering and transforming text.
|
||||
- **find**: Searches for files in a directory hierarchy, highly customizable search criteria.
|
||||
- **tar**: An archiving utility, used for storing and extracting files from a tape or disk archive.
|
||||
- **wget/curl**: Retrieves content from web servers, essential for downloading files or querying APIs.
|
||||
|
||||
## System Information and Configuration
|
||||
- **uname**: Displays system information, such as the kernel name, version, and architecture.
|
||||
- **dmesg**: Prints or controls the kernel ring buffer, useful for diagnosing hardware and driver issues.
|
||||
- **sysctl**: Configures kernel parameters at runtime, crucial for system tuning and security parameter settings.
|
||||
- **env**: Displays the environment variables, useful for scripting and troubleshooting environment-related issues.
|
||||
|
||||
> Note: This guide provides a more detailed overview of essential commands for system administration. For in-depth information and additional options, refer to the respective command's manual page (e.g., `man sysctl`).
|
||||
|
||||
---
|
||||
|
||||
# Expanded Linux System Administration Command Sets
|
||||
|
||||
## System Monitoring Commands
|
||||
- **top**: Displays real-time system stats, CPU, memory usage, and running processes.
|
||||
- **htop**: An interactive process viewer, similar to top but with more features.
|
||||
- **vmstat**: Reports virtual memory statistics.
|
||||
- **iostat**: Provides CPU and input/output statistics for devices and partitions.
|
||||
- **free**: Shows memory and swap usage.
|
||||
- **uptime**: Tells how long the system has been running.
|
||||
|
||||
## Network Management Commands
|
||||
- **ifconfig**: Configures and displays network interface parameters.
|
||||
- **ip**: Routing, devices, policy routing, and tunnels.
|
||||
- **netstat**: Displays network connections, routing tables, interface statistics.
|
||||
- **ss**: Utility to investigate sockets.
|
||||
- **ping**: Checks connectivity with a host.
|
||||
- **traceroute**: Traces the route taken by packets to reach a network host.
|
||||
|
||||
## Disk and File System Management
|
||||
- **df**: Reports file system disk space usage.
|
||||
- **du**: Estimates file and directory space usage.
|
||||
- **fdisk**: A disk partitioning tool.
|
||||
- **mount/umount**: Mounts or unmounts file systems.
|
||||
- **fsck**: Checks and repairs a Linux file system.
|
||||
- **mkfs**: Creates a file system on a device.
|
||||
- **lvextend/lvreduce**: Resize logical volume sizes in LVM.
|
||||
|
||||
## Security and User Management
|
||||
- **passwd**: Changes user passwords.
|
||||
- **chown**: Changes file owner and group.
|
||||
- **chmod**: Changes file access permissions.
|
||||
- **chgrp**: Changes group ownership.
|
||||
- **useradd/userdel**: Adds or deletes users.
|
||||
- **groupadd/groupdel**: Adds or deletes groups.
|
||||
- **sudo**: Executes a command as another user.
|
||||
- **iptables**: Administration tool for IPv4 packet filtering and NAT.
|
||||
|
||||
## Miscellaneous Useful Commands
|
||||
- **crontab**: Schedule a command to run at a certain time.
|
||||
- **grep**: Searches for patterns in files.
|
||||
- **awk**: Pattern scanning and processing language.
|
||||
- **sed**: Stream editor for filtering and transforming text.
|
||||
- **find**: Searches for files in a directory hierarchy.
|
||||
- **tar**: Archiving utility.
|
||||
- **wget/curl**: Retrieves content from web servers.
|
||||
|
||||
## System Information and Configuration
|
||||
- **uname**: Displays system information.
|
||||
- **dmesg**: Prints or controls the kernel ring buffer.
|
||||
- **sysctl**: Configures kernel parameters at runtime.
|
||||
- **env**: Displays the environment variables.
|
||||
|
||||
## Usage
|
||||
Each command can be explored further with its man page, for example, `man top`.
|
||||
|
||||
> Note: This guide is a quick reference and does not cover all available options and nuances of each command.
|
||||
|
||||
---
|
||||
|
||||
# Essential Linux Packages for RHEL and Debian-Based Systems
|
||||
|
||||
## Core Utilities
|
||||
- **coreutils**: Provides basic file, shell, and text manipulation utilities like `ls`, `cat`, `rm`, `cp`, and `chmod`.
|
||||
- **bash**: The GNU Bourne Again shell, a key component of the Linux system, providing the command-line environment.
|
||||
- **sed**: A stream editor for filtering and transforming text in a scriptable way.
|
||||
- **grep**: A utility for searching plain-text data for lines matching a regular expression.
|
||||
- **awk**: A powerful text processing scripting language.
|
||||
|
||||
## System Management
|
||||
- **systemd**: A system and service manager for Linux, compatible with SysV and LSB init scripts.
|
||||
- **NetworkManager**: Provides network connection management and configuration.
|
||||
- **firewalld/iptables**: Tools for managing network firewall rules.
|
||||
- **SELinux**: Security-Enhanced Linux, a security module for enforcing mandatory access control policies.
|
||||
|
||||
## Package Management
|
||||
- **yum/dnf** (RHEL): Command-line package management utilities for RHEL and derivatives.
|
||||
- **apt/apt-get** (Debian): Advanced Package Tool for managing packages on Debian-based systems.
|
||||
|
||||
## Development Tools
|
||||
- **build-essential** (Debian): A meta-package that installs GCC, Make, and other utilities essential for compiling software.
|
||||
- **Development Tools** (RHEL): A package group that includes basic development tools like GCC, Make, and others.
|
||||
|
||||
## Compression and Archiving
|
||||
- **tar**: An archiving utility for storing and extracting files.
|
||||
- **gzip/bzip2/xz**: Compression tools used to reduce the size of files.
|
||||
|
||||
## Networking Utilities
|
||||
- **net-tools**: Provides basic networking tools like `ifconfig`, `netstat`, `route`, and `arp`.
|
||||
- **openssh**: Provides secure shell access and SCP file transfer.
|
||||
- **curl/wget**: Command-line tools for transferring data with URL syntax.
|
||||
- **rsync**: A utility for efficiently transferring and synchronizing files.
|
||||
|
||||
## File System Utilities
|
||||
- **e2fsprogs**: Utilities for the ext2, ext3, and ext4 file systems, including `fsck`.
|
||||
- **xfsprogs**: Utilities for managing XFS file systems.
|
||||
- **dosfstools**: Utilities for making and checking MS-DOS FAT filesystems on Linux.
|
||||
|
||||
## Text Editors
|
||||
- **vim**: An advanced text editor that seeks to provide the power of the de facto Unix editor 'Vi', with a more complete feature set.
|
||||
- **nano**: A simple, easy-to-use command-line text editor.
|
||||
|
||||
## Security Utilities
|
||||
- **openssh-server**: Provides the SSH server component for secure access to the system.
|
||||
- **openssl**: Toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols.
|
||||
|
||||
## Monitoring Tools
|
||||
- **htop**: An interactive process viewer, more powerful than `top`.
|
||||
- **nmon**: Performance monitoring tool for Linux.
|
||||
- **iotop**: A utility for monitoring disk IO usage by processes.
|
||||
|
||||
> Note: This guide provides a basic overview of essential Linux packages for system administration on RHEL and Debian-based systems. Each package's specific functionality can be explored further in its documentation or man page.
|
||||
|
||||
---
|
||||
|
||||
# Enhanced Linux Troubleshooting Tools Guide
|
||||
|
||||
This guide offers a comprehensive overview of essential tools and packages for troubleshooting in Linux environments, with specific emphasis on tools useful in both RHEL and Debian-based distributions.
|
||||
|
||||
## General Troubleshooting Tools Common Across Distributions
|
||||
|
||||
### GNU Coreutils
|
||||
Fundamental utilities for file, shell, and text manipulation.
|
||||
- **Key Tools**: `ls`, `cp`, `mv`, `rm`, `df`, `du`, `cat`, `chmod`, `chown`, `ln`, `mkdir`, `rmdir`, `touch`
|
||||
|
||||
### Util-linux
|
||||
Core set of utilities for system administration.
|
||||
- **Key Tools**: `dmesg`, `mount`, `umount`, `fdisk`, `blkid`, `lsblk`, `uuidgen`, `losetup`
|
||||
|
||||
### IPUtils
|
||||
Essential for network diagnostics.
|
||||
- **Key Tools**: `ping`, `traceroute`, `arp`, `clockdiff`
|
||||
|
||||
### Procps
|
||||
Utilities for monitoring running processes.
|
||||
- **Key Tools**: `ps`, `top`, `vmstat`, `w`, `kill`, `pkill`, `pgrep`, `watch`
|
||||
|
||||
## RHEL-Specific Tools and Packages
|
||||
|
||||
### Procps-ng
|
||||
Enhanced version of procps for process monitoring.
|
||||
- **Additional Tools**: `free`, `pmap`
|
||||
|
||||
### IPRoute
|
||||
Advanced tool for network configuration and troubleshooting.
|
||||
- **Key Utility**: `ip`, `ss`
|
||||
|
||||
### Sysstat
|
||||
Performance monitoring tools suite.
|
||||
- **Key Tools**: `iostat`, `mpstat`, `pidstat`, `sar`, `sadf`
|
||||
|
||||
### EPEL Repository
|
||||
Extra Packages for Enterprise Linux; additional tools not in default repo.
|
||||
- **Notable Tool**: `htop`, `nmon`
|
||||
|
||||
## Debian-Specific Tools and Packages
|
||||
|
||||
### IPRoute2
|
||||
Suite of utilities for network traffic control.
|
||||
- **Key Tools**: `ip`, `ss`, `tc`
|
||||
|
||||
### Sysstat
|
||||
Similar usage as in RHEL for system performance monitoring.
|
||||
- **Key Tools**: `iostat`, `sar`
|
||||
|
||||
## Additional Essential Tools
|
||||
|
||||
### Networking Tools
|
||||
- **Net-tools**: Traditional tools for network administration (`ifconfig`, `netstat`, `route`).
|
||||
- **OpenSSH**: Tools for secure network communication (`ssh`, `scp`).
|
||||
|
||||
### Disk Management and File Systems
|
||||
- **e2fsprogs**: Utilities for ext2/ext3/ext4 file systems.
|
||||
- **xfsprogs**: Utilities for managing XFS file systems.
|
||||
- **ntfs-3g**: Read-write NTFS driver.
|
||||
|
||||
### Security and Inspection
|
||||
- **lsof**: Lists open files and the corresponding processes.
|
||||
- **strace**: Traces system calls and signals.
|
||||
|
||||
### Log Management and Analysis
|
||||
- **rsyslog** (RHEL) / **syslog-ng** (Debian): Advanced system logging daemons.
|
||||
- **logwatch**: Simplifies log analysis and reporting.
|
||||
|
||||
### Hardware Monitoring and Diagnosis
|
||||
- **lm_sensors**: Monitors temperature, voltage, and fan speeds.
|
||||
- **smartmontools**: Controls and monitors storage systems using SMART.
|
||||
|
||||
## Conclusion
|
||||
|
||||
This guide provides an extensive overview of the tools available in standard Linux distributions for system monitoring and troubleshooting. Mastery of these tools is crucial for effectively diagnosing and resolving issues in both RHEL and Debian-based environments. For detailed usage, refer to each tool's manual page or official documentation.
|
||||
|
||||
---
|
||||
|
||||
|
||||
---
|
||||
97
docs/tech_docs/linux/Neovim-Configuration-with-Lua.md
Normal file
97
docs/tech_docs/linux/Neovim-Configuration-with-Lua.md
Normal file
@@ -0,0 +1,97 @@
|
||||
## Initialization (`init.lua`)
|
||||
- **Create `init.lua`**:
|
||||
```bash
|
||||
touch ~/.config/nvim/init.lua
|
||||
```
|
||||
This command creates a new file named `init.lua` in your Neovim configuration directory, which will store your custom settings.
|
||||
|
||||
- **Basic Settings in `init.lua`**:
|
||||
```lua
|
||||
vim.o.number = true -- Enable line numbers
|
||||
vim.cmd('syntax enable') -- Enable syntax highlighting
|
||||
```
|
||||
These lines set basic Neovim options: enabling line numbers and syntax highlighting, which are essential for better readability and coding efficiency.
|
||||
|
||||
## Modular Setup
|
||||
- **Create Modules**:
|
||||
- Make Lua files like `keymaps.lua`, `plugins.lua` in `~/.config/nvim/lua/`. This modular approach allows you to organize your configuration efficiently. For example, `keymaps.lua` can hold all your keybindings, while `plugins.lua` can manage your plugin configurations.
|
||||
|
||||
- **Include Modules in `init.lua`**:
|
||||
```lua
|
||||
require('keymaps')
|
||||
require('plugins')
|
||||
```
|
||||
These lines in your `init.lua` file load the modules you created. It keeps your main configuration file clean and your settings organized.
|
||||
|
||||
## Plugin Management
|
||||
- **Install Packer**:
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
```
|
||||
Packer is a plugin manager for Neovim. This command installs Packer, allowing you to easily add, update, and manage your Neovim plugins.
|
||||
|
||||
- **Define Plugins in `plugins.lua`**:
|
||||
```lua
|
||||
use {'neovim/nvim-lspconfig', config = function() require('lsp') end}
|
||||
```
|
||||
Here, you're telling Packer to use the `nvim-lspconfig` plugin. This plugin is used for configuring LSP (Language Server Protocol), which provides features like auto-completion, code navigation, and syntax checking.
|
||||
|
||||
## Key Mappings (`keymaps.lua`)
|
||||
- **Global Mappings Example**:
|
||||
```lua
|
||||
vim.api.nvim_set_keymap('n', '<Leader>f', ':Telescope find_files<CR>', {noremap = true})
|
||||
```
|
||||
This code maps `<Leader>f` to `Telescope find_files` in normal mode, enabling you to quickly search for files.
|
||||
|
||||
- **Mode-Specific Mappings Example**:
|
||||
```lua
|
||||
vim.api.nvim_set_keymap('i', 'jj', '<Esc>', {noremap = true})
|
||||
```
|
||||
This snippet maps `jj` to `<Esc>` in insert mode, providing a quick way to exit insert mode.
|
||||
|
||||
## LSP and Autocomplete (`lsp.lua`)
|
||||
- **Configure LSP Client**:
|
||||
```lua
|
||||
require'lspconfig'.pyright.setup{}
|
||||
```
|
||||
This line sets up an LSP client for Python using `pyright`. LSPs are crucial for advanced coding assistance like error detection and code suggestions.
|
||||
|
||||
- **Setup Autocomplete**:
|
||||
- Use a plugin like `nvim-compe` for autocomplete. This plugin offers intelligent code completion, which is a huge productivity boost.
|
||||
|
||||
# Tmux Configuration
|
||||
|
||||
## Basic Configuration (`tmux.conf`)
|
||||
- **Create/Edit `.tmux.conf`**:
|
||||
```bash
|
||||
touch ~/.tmux.conf
|
||||
```
|
||||
This creates or edits your Tmux configuration file, where you can customize Tmux to your liking.
|
||||
|
||||
- **Set Global Options in `.tmux.conf`**:
|
||||
```
|
||||
set-option -g prefix C-a
|
||||
set -g status-right 'Battery: #{battery_percentage}'
|
||||
```
|
||||
These commands change the default prefix key to `Ctrl-a` and add a battery status indicator to the right side of the status line.
|
||||
|
||||
## Lua Scripting for Tmux
|
||||
- **Write Lua Scripts** to generate dynamic Tmux commands.
|
||||
- **Run Scripts** to update your `.tmux.conf`. For example, a Lua script can be written to adjust the status line based on time of day or system status.
|
||||
|
||||
## Key Bindings and Session Management
|
||||
- **Add Key Bindings in `.tmux.conf`** for efficient navigation. For instance, binding keys for splitting panes or switching between them can significantly speed up your workflow.
|
||||
- **Script Session Setups**: Create scripts for predefined layouts and windows, enabling you to launch complex Tmux environments with a single command.
|
||||
|
||||
## Status Line Customization
|
||||
- **Use Lua Scripts** for dynamic status line updates in Tmux, like changing colors or displaying contextual information.
|
||||
|
||||
## Performance and Testing
|
||||
- **Regularly Review** your configurations for performance impacts. This includes monitoring load times and responsiveness.
|
||||
- **Test Config
|
||||
ChatGPT
|
||||
urations** in a separate tmux session to ensure your changes work as expected without disrupting your current workflow.
|
||||
|
||||
## Troubleshooting and FAQs
|
||||
- **Include a Section**: Adding a troubleshooting section or an FAQ can help users resolve common issues they might encounter while configuring Neovim or Tmux.
|
||||
54
docs/tech_docs/linux/Poppler-Utils:-Tools-and-Usage.md
Normal file
54
docs/tech_docs/linux/Poppler-Utils:-Tools-and-Usage.md
Normal file
@@ -0,0 +1,54 @@
|
||||
## `pdfdetach`
|
||||
- **Summary**: Extracts embedded files (attachments) from a PDF.
|
||||
- **Projects**: Extracting data files, source code, or other attachments embedded in PDFs for academic papers or reports.
|
||||
- **Command**: `pdfdetach -saveall input.pdf`
|
||||
|
||||
## `pdffonts`
|
||||
- **Summary**: Lists the fonts used in a PDF document.
|
||||
- **Projects**: Font analysis for document design consistency, troubleshooting font issues in PDFs.
|
||||
- **Command**: `pdffonts input.pdf`
|
||||
|
||||
## `pdfimages`
|
||||
- **Summary**: Extracts images from a PDF file.
|
||||
- **Projects**: Retrieving all images for documentation, presentations, or image analysis.
|
||||
- **Command**: `pdfimages -all input.pdf output_prefix`
|
||||
|
||||
## `pdfinfo`
|
||||
- **Summary**: Provides detailed information about a PDF, including metadata.
|
||||
- **Projects**: Analyzing PDFs for metadata, such as author, creation date, number of pages.
|
||||
- **Command**: `pdfinfo input.pdf`
|
||||
|
||||
## `pdfseparate`
|
||||
- **Summary**: Splits a PDF document into individual pages.
|
||||
- **Projects**: Extracting specific pages from a document for separate use or analysis.
|
||||
- **Command**: `pdfseparate input.pdf output_%d.pdf`
|
||||
|
||||
## `pdftocairo`
|
||||
- **Summary**: Converts PDF documents to other formats like PNG, JPEG, PS, EPS, SVG.
|
||||
- **Projects**: Creating thumbnails, converting PDFs for web use, generating vector images from PDFs.
|
||||
- **Command**: `pdftocairo -png input.pdf output`
|
||||
|
||||
## `pdftohtml`
|
||||
- **Summary**: Converts a PDF file to HTML.
|
||||
- **Projects**: Converting PDFs to HTML for web publishing, extracting content for web use.
|
||||
- **Command**: `pdftohtml -c input.pdf output.html`
|
||||
|
||||
## `pdftoppm`
|
||||
- **Summary**: Converts PDF pages to image formats like PNG or JPEG.
|
||||
- **Projects**: Creating high-quality images from PDF pages for presentations or documentation.
|
||||
- **Command**: `pdftoppm -png input.pdf output`
|
||||
|
||||
## `pdftops`
|
||||
- **Summary**: Converts a PDF to PostScript format.
|
||||
- **Projects**: Preparing PDFs for printing or for use in graphics applications.
|
||||
- **Command**: `pdftops input.pdf output.ps`
|
||||
|
||||
## `pdftotext`
|
||||
- **Summary**: Converts a PDF to plain text.
|
||||
- **Projects**: Extracting text for analysis, archiving, or conversion to other text formats.
|
||||
- **Command**: `pdftotext input.pdf output.txt`
|
||||
|
||||
## `pdfunite`
|
||||
- **Summary**: Merges several PDF files into one.
|
||||
- **Projects**: Combining multiple PDF documents into a single file for reports or booklets.
|
||||
- **Command**: `pdfunite input1.pdf input2.pdf output.pdf`
|
||||
71
docs/tech_docs/linux/Zsh-Configuration-Guide.md
Normal file
71
docs/tech_docs/linux/Zsh-Configuration-Guide.md
Normal file
@@ -0,0 +1,71 @@
|
||||
This guide provides detailed steps for configuring the Zsh (Z Shell) on Debian systems. Zsh is a powerful shell that offers improvements over the default Bash shell, including better scriptability, user-friendly features, and extensive customization options.
|
||||
|
||||
## Installation and Initial Setup
|
||||
|
||||
### Installing Zsh
|
||||
- **Install Zsh**:
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install zsh
|
||||
```
|
||||
This command installs Zsh on your Debian system.
|
||||
|
||||
### Setting Zsh as Default Shell
|
||||
- **Change Default Shell**:
|
||||
```bash
|
||||
chsh -s $(which zsh)
|
||||
```
|
||||
This command sets Zsh as your default shell. You may need to logout and login again for the change to take effect.
|
||||
|
||||
## Customizing Zsh
|
||||
|
||||
### Oh My Zsh Framework
|
||||
- **Install Oh My Zsh**:
|
||||
```bash
|
||||
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
|
||||
```
|
||||
Oh My Zsh is a popular framework for managing your Zsh configuration. It offers themes, plugins, and a user-friendly setup.
|
||||
|
||||
### Zsh Theme
|
||||
- **Set a Theme**:
|
||||
- Open `~/.zshrc` in a text editor.
|
||||
- Set the `ZSH_THEME` variable. Example: `ZSH_THEME="agnoster"`.
|
||||
|
||||
### Plugins
|
||||
- **Add Plugins**:
|
||||
- In `~/.zshrc`, find the `plugins` section and add your desired plugins. Example: `plugins=(git zsh-autosuggestions zsh-syntax-highlighting)`.
|
||||
- Restart your terminal or run `source ~/.zshrc` to apply changes.
|
||||
|
||||
### Aliases
|
||||
- **Create Aliases**:
|
||||
- Add aliases to `~/.zshrc` for shortcuts. Example: `alias ll='ls -lah'`.
|
||||
|
||||
## Advanced Customization
|
||||
|
||||
### Custom Scripts
|
||||
- **Add Custom Scripts**:
|
||||
- Create custom scripts in `~/.zshrc` or source external scripts for advanced functionality.
|
||||
|
||||
### Environment Variables
|
||||
- **Set Environment Variables**:
|
||||
- Add environment variables in `~/.zshrc`. Example: `export PATH="$HOME/bin:$PATH"`.
|
||||
|
||||
## Managing Your Zsh Configuration
|
||||
|
||||
### Version Control
|
||||
- **Use Git**: Consider using Git to version control your `~/.zshrc` file. This helps in tracking changes and sharing configurations across machines.
|
||||
|
||||
### Backup and Restore
|
||||
- **Backup Your Config**:
|
||||
- Regularly backup your `~/.zshrc` and any custom scripts.
|
||||
- **Restore Config**:
|
||||
- Copy your backed-up `.zshrc` file to `~/.zshrc` on any new machine.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **Common Issues**:
|
||||
- Add a section for troubleshooting common issues and how to resolve them.
|
||||
|
||||
## Conclusion
|
||||
|
||||
Customizing Zsh on Debian can greatly enhance your terminal experience. With themes, plugins, and custom scripts, you can create a powerful, efficient, and visually appealing command-line environment.
|
||||
75
docs/tech_docs/linux/bootable_usb_linux.md
Normal file
75
docs/tech_docs/linux/bootable_usb_linux.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# How to Create a Bootable Debian USB Drive on Linux
|
||||
|
||||
Creating a bootable USB drive is a straightforward process, but it requires careful attention to detail to ensure you're working with the correct device and not risking any data. This guide will walk you through the entire process, from verification to completion, for creating a bootable Debian USB drive.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- A Linux operating system with terminal access.
|
||||
- A USB drive with at least 4GB of storage (all data on the USB drive will be erased).
|
||||
- A Debian ISO file downloaded to your system.
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Identify Your USB Drive
|
||||
|
||||
First, insert your USB drive and use the `dmesg` command to identify it:
|
||||
|
||||
```bash
|
||||
sudo dmesg | tail
|
||||
```
|
||||
|
||||
Look for messages that indicate a new USB device has been connected, usually showing a device name like `/dev/sda` and the size of the drive.
|
||||
|
||||
### 2. Verify the Device with `lsblk`
|
||||
|
||||
Run `lsblk` before and after inserting the USB drive to see which device appears:
|
||||
|
||||
```bash
|
||||
lsblk
|
||||
```
|
||||
|
||||
The new device (e.g., `/dev/sda`) that appears is your USB drive.
|
||||
|
||||
### 3. Unmount the USB Drive
|
||||
|
||||
If any partitions on the USB drive are mounted, unmount them using:
|
||||
|
||||
```bash
|
||||
sudo umount /dev/sdxN
|
||||
```
|
||||
|
||||
Replace `/dev/sdxN` with the actual device and partition number (e.g., `/dev/sda1`).
|
||||
|
||||
### 4. Write the Debian ISO to the USB Drive
|
||||
|
||||
Use the `dd` command to write the ISO file to the USB drive:
|
||||
|
||||
```bash
|
||||
sudo dd if=/path/to/debian.iso of=/dev/sdx bs=4M status=progress oflag=sync
|
||||
```
|
||||
|
||||
Replace `/path/to/debian.iso` with the path to your Debian ISO file and `/dev/sdx` with your USB drive device name.
|
||||
|
||||
- `if=` specifies the input file.
|
||||
- `of=` specifies the output file (your USB drive).
|
||||
- `bs=4M` sets the block size to 4 MB.
|
||||
- `status=progress` shows the writing progress.
|
||||
- `oflag=sync` ensures all data is written and synchronized.
|
||||
|
||||
### 5. Eject the USB Drive
|
||||
|
||||
After the `dd` command finishes, ensure all data is written:
|
||||
|
||||
```bash
|
||||
sync
|
||||
```
|
||||
|
||||
Safely remove the USB drive from your computer.
|
||||
|
||||
### 6. Boot from the USB Drive
|
||||
|
||||
Insert the bootable USB drive into the target computer and restart it. You may need to enter the BIOS/UEFI settings to change the boot order or select the USB drive as the first boot option.
|
||||
|
||||
## Conclusion
|
||||
|
||||
By following these steps, you've created a bootable Debian USB drive ready for installation. Remember, the `dd` command is powerful and can overwrite any data on the target device, so double-check the device name before proceeding.
|
||||
40
docs/tech_docs/linux/journalctl.md
Normal file
40
docs/tech_docs/linux/journalctl.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# `journalctl` Troubleshooting Guide
|
||||
|
||||
This guide provides a structured approach to troubleshooting common issues in Linux using the `journalctl` command.
|
||||
|
||||
## General Troubleshooting
|
||||
|
||||
1. **Review Recent Logs**
|
||||
- View recent log entries: `journalctl -e`
|
||||
- Show logs since the last boot: `journalctl -b`
|
||||
|
||||
## Service-Specific Issues
|
||||
|
||||
1. **Identify Service Issues**
|
||||
- Display logs for a specific service: `journalctl -u service-name.service`
|
||||
- Replace `service-name` with the actual service name, e.g., `journalctl -u sshd`
|
||||
|
||||
## System Crashes or Boots
|
||||
|
||||
1. **Investigate Boot Issues**
|
||||
- Display logs from the current boot: `journalctl -b`
|
||||
- Show logs from the previous boot: `journalctl -b -1`
|
||||
- List boot sessions to identify specific instances: `journalctl --list-boots`
|
||||
|
||||
## Error Messages
|
||||
|
||||
1. **Filter by Error Priority**
|
||||
- Show only error messages: `journalctl -p err`
|
||||
- For more severe issues, consider using higher priority levels like `crit`, `alert`, or `emerg`
|
||||
|
||||
## Additional Tips
|
||||
|
||||
- **Follow Live Logs**: Monitor logs in real-time: `journalctl -f`
|
||||
- **Time-Based Filtering**: Investigate issues within a specific timeframe:
|
||||
- Since a specific time: `journalctl --since "YYYY-MM-DD HH:MM:SS"`
|
||||
- Between two timestamps: `journalctl --since "start-time" --until "end-time"`
|
||||
- **Output Formatting**: Adjust output format for better readability or specific needs:
|
||||
- JSON format: `journalctl -o json-pretty`
|
||||
- Verbose format: `journalctl -o verbose`
|
||||
- **Export Logs**: Save logs for further analysis or reporting:
|
||||
- `journalctl > logs.txt` or `journalctl -u service-name > service_logs.txt`
|
||||
74
docs/tech_docs/linux/linux-tools.md
Normal file
74
docs/tech_docs/linux/linux-tools.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Advanced Document and Media Manipulation Tools Guide
|
||||
|
||||
This guide delves into a selection of powerful tools for document and media manipulation, focusing on applications in various formats, especially PDF. It provides detailed descriptions, practical use cases, and additional notes for each tool, making it a comprehensive resource for advanced users.
|
||||
|
||||
## Comprehensive Image and PDF Manipulation Tools
|
||||
|
||||
### ImageMagick
|
||||
- **Description**: A robust image processing suite. Excels in batch processing, complex image manipulation tasks.
|
||||
- **Use Cases**: Batch resizing or format conversion of images, creating image thumbnails, applying batch effects.
|
||||
- **Additional Notes**: Command-line based; extensive documentation and community examples available.
|
||||
|
||||
### Ghostscript
|
||||
- **Purpose**: A versatile interpreter for PostScript and PDF formats.
|
||||
- **Capabilities**: High-quality conversion and processing of PDFs, PostScript to PDF conversion, PDF printing.
|
||||
- **Additional Notes**: Often used in combination with other tools for enhanced PDF manipulation.
|
||||
|
||||
## Document Conversion and Management Suites
|
||||
|
||||
### LibreOffice/OpenOffice
|
||||
- **Functionality**: Comprehensive office suites with powerful command-line conversion tools.
|
||||
- **Key Uses**: Automating document conversion (e.g., DOCX to PDF), batch processing of office documents.
|
||||
- **Additional Notes**: Supports macros and scripts for complex automation tasks.
|
||||
|
||||
### Calibre
|
||||
- **Known For**: A one-stop e-book management system.
|
||||
- **Conversion Capabilities**: Converts between numerous e-book formats, effective for managing and converting digital libraries.
|
||||
- **Additional Notes**: Includes an e-book reader and editor for comprehensive e-book management.
|
||||
|
||||
## Specialized Tools for Technical and Academic Writing
|
||||
|
||||
### TeX/LaTeX
|
||||
- **Application**: Advanced typesetting systems for producing professional and academic documents.
|
||||
- **PDF Generation**: Creates high-quality PDFs, ideal for research papers, theses, and books.
|
||||
- **Additional Notes**: Steep learning curve but unparalleled in formatting capabilities.
|
||||
|
||||
## Multimedia and Graphics Enhancement Tools
|
||||
|
||||
### FFmpeg
|
||||
- **Primary Use**: A leading multimedia framework for video and audio processing.
|
||||
- **PDF-Related Tasks**: Creating video summaries in PDF, extracting frames as images for PDF conversion.
|
||||
- **Additional Notes**: Command-line based with extensive options, widely used in video editing and conversion.
|
||||
|
||||
### Inkscape
|
||||
- **Type**: A feature-rich vector graphics editor.
|
||||
- **PDF Functionality**: Detailed editing of PDFs, vector graphics creation and manipulation within PDFs.
|
||||
- **Additional Notes**: GUI-based with support for extensions and add-ons.
|
||||
|
||||
## Advanced Publishing and Text Processing
|
||||
|
||||
### Scribus
|
||||
- **Nature**: Professional desktop publishing software.
|
||||
- **Specialty**: Designing and exporting high-quality, print-ready documents and PDFs.
|
||||
- **Additional Notes**: Offers CMYK color support, ICC color management, and versatile PDF creation options.
|
||||
|
||||
### Asciidoctor
|
||||
- **Role**: Fast text processor and publishing tool for AsciiDoc format.
|
||||
- **Formats**: Converts to HTML, EPUB3, PDF, DocBook, and more with ease.
|
||||
- **Additional Notes**: Lightweight and fast, suitable for docs, books, and web publishing.
|
||||
|
||||
## Utility Tools for Documentation and PDF Editing
|
||||
|
||||
### Docutils
|
||||
- **Purpose**: Converts reStructuredText into various formats.
|
||||
- **Supported Formats**: Produces clean HTML, LaTeX for PDF conversion, man-pages, and XML.
|
||||
- **Additional Notes**: Part of the Python Docutils package, widely used in technical documentation.
|
||||
|
||||
### PDFtk
|
||||
- **Function**: A versatile toolkit for all kinds of PDF editing.
|
||||
- **Features**: Combines, splits, rotates, watermarks, and compresses PDF files.
|
||||
- **Additional Notes**: Useful for both simple and complex PDF manipulation tasks.
|
||||
|
||||
## Conclusion
|
||||
|
||||
This expanded guide offers detailed insights into each tool, making it a valuable resource for tasks ranging from simple file conversion to complex document creation and editing. It caters to a broad spectrum of needs in the realm of document and media manipulation, especially for users looking to delve deeper into the potential of these tools.
|
||||
52
docs/tech_docs/linux/linux-troubleshooting.md
Normal file
52
docs/tech_docs/linux/linux-troubleshooting.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Comprehensive Linux Troubleshooting Tools Guide
|
||||
|
||||
This guide provides an overview of key packages and their included tools for effective troubleshooting in Linux environments, specifically tailored for RHEL and Debian-based distributions.
|
||||
|
||||
## Tools Commonly Included in Most Linux Distributions
|
||||
|
||||
- **GNU Coreutils**: A collection of basic file, shell, and text manipulation utilities. Key tools include:
|
||||
- `df`: Reports file system disk space usage.
|
||||
- `du`: Estimates file space usage.
|
||||
|
||||
- **Util-linux**: A suite of essential utilities for system administration. Key tools include:
|
||||
- `dmesg`: Examines or controls the kernel ring buffer.
|
||||
|
||||
- **IPUtils**: Provides tools for network diagnostics. Key tools include:
|
||||
- `ping`: Checks connectivity with hosts.
|
||||
- `traceroute`: Traces the route taken by packets to reach a network host.
|
||||
|
||||
## RHEL (Red Hat Enterprise Linux) and Derivatives
|
||||
|
||||
- **Procps-ng**: Offers utilities that provide information about processes. Key tools include:
|
||||
- `top`: Displays real-time system summary and task list.
|
||||
- `vmstat`: Reports virtual memory statistics.
|
||||
|
||||
- **Net-tools**: A collection of programs for controlling the network subsystem of the Linux kernel. Includes:
|
||||
- `netstat`: Shows network connections, routing tables, and interface statistics.
|
||||
|
||||
- **IPRoute**: Modern replacement for net-tools. Key utility:
|
||||
- `ss`: Investigates sockets.
|
||||
|
||||
- **Sysstat**: Contains utilities to monitor system performance and usage. Notable tools:
|
||||
- `iostat`: Monitors system I/O device loading.
|
||||
- `sar`: Collects and reports system activity information.
|
||||
|
||||
- **EPEL Repository** (for tools not included by default):
|
||||
- `htop`: An interactive process viewer, enhanced version of `top`.
|
||||
|
||||
## Debian and Derivatives
|
||||
|
||||
- **Procps**: Similar to procps-ng in RHEL, it provides process monitoring utilities. Key tools include:
|
||||
- `top`: For real-time process monitoring.
|
||||
- `vmstat`: For reporting virtual memory statistics.
|
||||
|
||||
- **Net-tools**: As with RHEL, includes essential networking tools like `netstat`.
|
||||
|
||||
- **IPRoute2**: A collection of utilities for controlling and monitoring various aspects of networking in the Linux kernel, featuring:
|
||||
- `ss`: A utility for inspecting sockets.
|
||||
|
||||
- **Sysstat**: Similar to its usage in RHEL, includes tools like `iostat` and `sar` for performance monitoring.
|
||||
|
||||
## Conclusion
|
||||
|
||||
This guide emphasizes the importance of familiarizing oneself with the tools included in standard Linux packages. Whether you are operating in a RHEL or Debian-based environment, understanding the capabilities of these tools and their respective packages is crucial for effective troubleshooting and system monitoring.
|
||||
42
docs/tech_docs/linux/pdf-tools.md
Normal file
42
docs/tech_docs/linux/pdf-tools.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Guide to PDF and PostScript Tools
|
||||
|
||||
This guide provides an overview of three key tools used for handling PDF and PostScript files: Ghostscript, MuPDF, and PDF.js. Each tool has unique features and typical use cases.
|
||||
|
||||
## Ghostscript
|
||||
|
||||
### Role
|
||||
- A versatile tool for handling PDF and PostScript (PS) files.
|
||||
- Used for rendering, converting, and processing these file types.
|
||||
|
||||
### Typical Uses
|
||||
- **PDF and PostScript Rendering**: Renders pages from PDF and PS files to bitmap formats for previewing and printing.
|
||||
- **File Conversion**: Converts between PDF and PostScript formats and to other image formats like JPEG, PNG.
|
||||
- **Processing and Analysis**: Analyzes, modifies, and creates PDF and PS files.
|
||||
- **Integration**: Often integrated into other applications to provide PDF/PS processing capabilities.
|
||||
|
||||
## MuPDF
|
||||
|
||||
### Role
|
||||
- Lightweight software developed by Artifex Software for viewing PDF, XPS, and eBook documents.
|
||||
- Known for its high performance and simpler licensing.
|
||||
|
||||
### Typical Uses
|
||||
- **PDF and XPS Viewing**: Primary use as a viewer for PDF and XPS files, suitable for desktop and mobile applications.
|
||||
- **Annotations and Form Filling**: Supports interactive features in PDFs.
|
||||
- **Cross-Platform Compatibility**: Works across various platforms, including Windows, Linux, macOS, and mobile OS.
|
||||
|
||||
## PDF.js
|
||||
|
||||
### Role
|
||||
- An open-source PDF viewer developed by Mozilla, implemented entirely in JavaScript.
|
||||
- Designed for web-based PDF viewing.
|
||||
|
||||
### Typical Uses
|
||||
- **Web-based PDF Viewing**: Displays PDF files within web browsers, ideal for web applications.
|
||||
- **Cross-Browser Compatibility**: Works across different web browsers without the need for specific PDF plugins.
|
||||
- **Interactive Features**: Supports hyperlinks, annotations, and form fields in PDFs.
|
||||
- **Customization and Integration**: Can be customized and integrated into web applications for a seamless user experience.
|
||||
|
||||
---
|
||||
|
||||
Each tool serves a distinct role in managing and presenting PDF and document content, catering to different needs and platforms.
|
||||
64
docs/tech_docs/linux/ssh-agent.md
Normal file
64
docs/tech_docs/linux/ssh-agent.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# Guide to Creating an SSH Agent and Alias
|
||||
|
||||
Creating an SSH agent and setting up an alias simplifies the process of managing SSH keys, especially for keys with passphrases. Here's how to set it up on a Unix-like system.
|
||||
|
||||
## Step 1: Starting the SSH Agent
|
||||
|
||||
1. **Start the SSH Agent**:
|
||||
Open your terminal and run:
|
||||
```bash
|
||||
eval "$(ssh-agent -s)"
|
||||
```
|
||||
This starts the SSH agent and sets the necessary environment variables.
|
||||
|
||||
## Step 2: Adding Your SSH Key to the Agent
|
||||
|
||||
1. **Add Your SSH Key**:
|
||||
If you have a default SSH key, add it to the agent:
|
||||
```bash
|
||||
ssh-add
|
||||
```
|
||||
For a key with a different name or location, specify the path:
|
||||
```bash
|
||||
ssh-add ~/.ssh/your_key_name
|
||||
```
|
||||
Enter your passphrase when prompted.
|
||||
|
||||
## Step 3: Creating an Alias for Starting the Agent
|
||||
|
||||
1. **Edit Your Shell Profile**:
|
||||
Depending on your shell, edit `~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`:
|
||||
```bash
|
||||
nano ~/.bashrc
|
||||
```
|
||||
|
||||
2. **Add Alias**:
|
||||
Add this line to your profile:
|
||||
```bash
|
||||
alias startssh='eval "$(ssh-agent -s)" && ssh-add'
|
||||
```
|
||||
Save and exit the editor.
|
||||
|
||||
3. **Reload Your Profile**:
|
||||
Apply the changes:
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
```
|
||||
Or reopen your terminal.
|
||||
|
||||
## Step 4: Using the Alias
|
||||
|
||||
- **Start SSH Agent and Add Keys**:
|
||||
Simply type in your terminal:
|
||||
```bash
|
||||
startssh
|
||||
```
|
||||
This command starts the SSH agent and adds your keys.
|
||||
|
||||
## Additional Tips
|
||||
|
||||
- **Automating the Process**: You can add the `eval` and `ssh-add` command directly to your profile for automation.
|
||||
- **SSH Agent Forwarding**: Use `-A` option with `ssh` for agent forwarding, but be cautious of security implications.
|
||||
- **Security Note**: Keep your private SSH keys secure and only add them to trusted machines.
|
||||
|
||||
This guide outlines the steps for setting up an SSH agent and creating a convenient alias, making it easier to manage SSH keys with passphrases.
|
||||
78
docs/tech_docs/linux/z.md
Normal file
78
docs/tech_docs/linux/z.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# Guide for Installing and Using `z` on Debian-based Systems
|
||||
|
||||
`z` is a command-line tool that helps you track and jump to your most frequently used directories. This guide provides instructions for installing and using `z` on Debian-based systems like Ubuntu.
|
||||
|
||||
## Installation
|
||||
|
||||
### Step 1: Download the `z` Script
|
||||
|
||||
First, download the `z` script using `wget`:
|
||||
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/rupa/z/master/z.sh -O ~/z.sh
|
||||
```
|
||||
|
||||
This command saves the `z` script in your home directory.
|
||||
|
||||
### Step 2: Include the Script in Bash Configuration
|
||||
|
||||
Include the `z` script in your `.bashrc` file to ensure it's sourced every time a new shell session starts.
|
||||
|
||||
Open `.bashrc` with a text editor, for example:
|
||||
|
||||
```bash
|
||||
nano ~/.bashrc
|
||||
```
|
||||
|
||||
Add the following line at the end of the file:
|
||||
|
||||
```bash
|
||||
. ~/z.sh
|
||||
```
|
||||
|
||||
### Step 3: Reload Your Shell Configuration
|
||||
|
||||
To apply the changes, reload your `.bashrc`:
|
||||
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
After installing `z`, it will start tracking the directories you visit. The more you use it, the smarter it gets in predicting your navigation patterns.
|
||||
|
||||
### Basic Commands
|
||||
|
||||
- To jump to a directory: `z <part_of_directory_name>`
|
||||
|
||||
```bash
|
||||
z project
|
||||
```
|
||||
|
||||
This command will jump to a directory that matches 'project' in its path, based on your navigation history.
|
||||
|
||||
- To view the list of tracked directories: `z -l`
|
||||
|
||||
```bash
|
||||
z -l
|
||||
```
|
||||
|
||||
- To jump to a directory with a ranking above a specific threshold: `z -r <rank> <part_of_directory_name>`
|
||||
|
||||
```bash
|
||||
z -r 10 project
|
||||
```
|
||||
|
||||
- To jump to a directory accessed more recently than the given time: `z -t <part_of_directory_name>`
|
||||
|
||||
```bash
|
||||
z -t project
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Ensure the `z.sh` script is correctly downloaded and the path in your `.bashrc` is correct.
|
||||
- For more advanced usage or troubleshooting, visit the `z` project page on GitHub.
|
||||
|
||||
With `z`, you can significantly speed up your directory navigation in the terminal. Happy coding!
|
||||
Reference in New Issue
Block a user