├── LICENSE ├── README.md ├── ansible └── README.md ├── docker ├── README.md ├── Swarm │ └── README.md ├── build │ └── README.md └── compose │ └── README.md ├── fio └── README.md ├── gcc └── README.md ├── git ├── README.md └── commit_misconfig_fix.md ├── gitlab ├── README.md ├── gitlabctl.md └── postres.md ├── go └── README.md ├── gpg └── README.md ├── kestra └── README.md ├── kubectl └── README.md ├── linux ├── debian │ └── README.md ├── iptables │ └── README.md ├── logrorate │ └── config.md ├── rocky │ └── README.md └── systemd │ └── cache_service.md ├── nmap └── README.md ├── phoronix ├── README.md └── source_build.md ├── powershell └── README.md ├── proxmox └── README.md ├── python ├── README.md └── pycharm_install_steps.md ├── scripts ├── battery_monitor.sh ├── clean_keychain.sh ├── clean_memory.sh ├── clear_mem_cache.sh ├── discharge_monitor.sh └── update_keychain.sh ├── ssh └── README.md ├── ssl └── README.md ├── terraform └── README.md ├── wazuh └── README.md └── wsl └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Alprojects 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 🄲🄷🄴🄰🅃-🅂🄷🄴🄴🅃
3 |

4 | -------------------------------------------------------------------------------- /ansible/README.md: -------------------------------------------------------------------------------- 1 | ## **Ansible** 2 | 3 | | Command | Description | 4 | |------------------------------------------------|------------------------------------------------------------| 5 | | `ansible --version` | Show the Ansible version and installation details | 6 | | `ansible-inventory --list` | List the hosts and groups in the inventory | 7 | | `ansible -m ping` | Test the connection to a host using the ping module | 8 | | `ansible all -m setup` | Gather facts from all hosts in the inventory | 9 | | `ansible all -m copy -a "src=/local/path dest=/remote/path"` | Copy a file from local to remote hosts | 10 | | `ansible-playbook ` | Run a playbook | 11 | | `ansible-vault encrypt ` | Encrypt a file using Ansible Vault | 12 | | `ansible-vault decrypt ` | Decrypt a previously encrypted file | 13 | | `ansible-vault edit ` | Edit an encrypted file | 14 | | `ansible-doc ` | Display documentation for a specific module | 15 | 16 | 17 | ## **Playbook Management** 18 | 19 | | Command | Description | 20 | |------------------------------------------------|------------------------------------------------------------| 21 | | `ansible-playbook --check` | Perform a dry run of the playbook without making changes | 22 | | `ansible-playbook --syntax-check` | Perform a syntax check of the playbook | 23 | | `ansible-playbook --tags ` | Run only tasks tagged with a specific tag | 24 | | `ansible-playbook --list-tasks` | List all tasks in the playbook | 25 | 26 | 27 | ## **Ad-hoc Commands** 28 | 29 | | Command | Description | 30 | |------------------------------------------------|------------------------------------------------------------| 31 | | `ansible all -a "/bin/echo hello"` | Run a command on all hosts in the inventory | 32 | | `ansible all -m yum -a "name=httpd state=present"` | Install Apache on all hosts using the yum module | 33 | | `ansible all -m service -a "name=httpd state=started"` | Start the Apache service on all hosts | 34 | 35 | 36 | ## **Inventory Management** 37 | 38 | | Command | Description | 39 | |------------------------------------------------|------------------------------------------------------------| 40 | | `ansible-inventory --graph` | Display the inventory graph | 41 | | `ansible-inventory --list -i ` | List the inventory in JSON format from a specific file | 42 | | `ansible-inventory --host ` | Show the inventory details for a specific host | 43 | 44 | 45 | ## **Ansible Vault** 46 | 47 | | Command | Description | 48 | |------------------------------------------------|------------------------------------------------------------| 49 | | `ansible-vault create ` | Create a new encrypted file | 50 | | `ansible-vault encrypt ` | Encrypt an existing file | 51 | | `ansible-vault decrypt ` | Decrypt a file | 52 | | `ansible-vault rekey ` | Change the password for an encrypted file | 53 | 54 | 55 | ## **Roles and Galaxy** 56 | 57 | | Command | Description | 58 | |------------------------------------------------|------------------------------------------------------------| 59 | | `ansible-galaxy init ` | Create a new role skeleton | 60 | | `ansible-galaxy install ` | Install a role from Ansible Galaxy | 61 | | `ansible-galaxy list` | List all installed roles | 62 | | `ansible-galaxy remove ` | Remove an installed role | 63 | 64 | 65 | -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | ## ***Networking*** 2 | | Command | Description | 3 | | ----------------------------------------------------- | ----------------------------------------------- | 4 | | `docker network ls` | List all Docker networks | 5 | | `docker network create ` | Create a new Docker network | 6 | | `docker network connect ` | Connect a container to a network | 7 | | `docker network disconnect ` | Disconnect a container from a network | 8 | | `docker network inspect ` | Display detailed information on a specific network | 9 | | `docker network rm ` | Remove a Docker network | 10 | | `docker network prune` | Remove all unused networks | 11 | | `docker run --network ` | Run a container on a specific network | 12 | | `docker network create --driver bridge ` | Create a bridge network | 13 | 14 | 15 | ## ***Volumes*** 16 | | Command | Description | 17 | | -------------------------------------------- | ---------------------------------------------------- | 18 | | `docker volume ls` | List all Docker volumes | 19 | | `docker volume create ` | Create a new Docker volume | 20 | | `docker volume rm ` | Remove a Docker volume | 21 | | `docker volume prune` | Remove all unused volumes | 22 | | `docker run -v :/path ` | Attach a volume to a container | 23 | | `docker inspect ` | Show details of a Docker volume | 24 | | `docker volume inspect ` | Inspect volume details (mountpoint, usage, etc.) | 25 | | `docker volume create --driver ` | Create a volume with a specific driver| 26 | 27 | 28 | ## ***Executing Commands in Containers*** 29 | | Command | Description | 30 | | -------------------------------------------- | ---------------------------------------------------- | 31 | | `docker exec -it ` | Execute a command inside a running container | 32 | | `docker exec -it /bin/bash` | Open a bash shell in a running container | 33 | | `docker exec -it /bin/sh` | Open a shell in a running container (if bash not available)| 34 | | `docker run -it /bin/bash` | Run a container and immediately access its shell | 35 | | `docker run -d ` | Run a container in detached mode | 36 | 37 | 38 | ## ***Image*** 39 | | Command | Description | 40 | | -------------------------------------------- | ---------------------------------------------------- | 41 | | `docker rmi ` | Remove a specific Docker image | 42 | | `docker image prune` | Remove all unused images | 43 | | `docker build -t ` | Build a Docker image from a Dockerfile | 44 | | `docker tag ` | Tag an image with a new name | 45 | | `docker save -o .tar `| Save an image to a tar archive | 46 | | `docker load -i .tar` | Load an image from a tar archive | 47 | | `docker push ` | Push an image to a Docker registry | 48 | | `docker commit ` | Create an image from a container's changes | 49 | | `docker export > .tar` | Export a container’s filesystem as a tar archive | 50 | 51 | 52 | ## ***Container*** 53 | | Command | Description | 54 | | -------------------------------------------- | ---------------------------------------------------- | 55 | | `docker start $(docker ps -a -q)` | Start all stopped containers | 56 | | `docker start ` | Start a specific container | 57 | | `docker stop ` | Stop a specific running container | 58 | | `docker restart ` | Restart a specific container | 59 | | `docker rm ` | Remove a specific container | 60 | | `docker container prune` | Remove all stopped containers | 61 | | `docker pause ` | Pause a running container | 62 | | `docker unpause ` | Unpause a paused container | 63 | | `docker update ` | Update resource limits of a running container | 64 | | `docker wait ` | Block until a container stops and then print its exit code | 65 | | `docker kill ` | Kill a running container | 66 | 67 | 68 | ## ***Inspecting & Debugging*** 69 | | Command | Description | 70 | | -------------------------------------------- | ---------------------------------------------------- | 71 | | `docker logs ` | Show logs of a specific container | 72 | | `docker inspect ` | Inspect detailed information about a container | 73 | | `docker stats ` | Show real-time statistics for a container | 74 | | `docker attach ` | Attach to a running container's input/output | 75 | | `docker events` | Get real-time events from the Docker daemon | 76 | | `docker diff ` | Inspect changes made to a container’s filesystem | 77 | | `docker top ` | Display the processes running inside a container | 78 | | `docker system df` | Show Docker disk usage (images, containers, etc.) | 79 | 80 | 81 | ## ***Basic*** 82 | | Command | Description | 83 | | -------------------------------------------- | ---------------------------------------------------- | 84 | | `docker --version` | Show Docker version | 85 | | `docker pull ` | Pull an image from a Docker registry | 86 | | `docker run ` | Run a container from an image | 87 | | `docker ps` | List all running containers | 88 | | `docker ps -a` | List all containers (running and stopped) | 89 | | `docker images` | List all Docker images on the system | 90 | | `docker search ` | Search Docker Hub for images | 91 | | `docker rename ` | Rename an existing container | 92 | | `docker history ` | Show history of an image (layers) | 93 | 94 | 95 | -------------------------------------------------------------------------------- /docker/Swarm/README.md: -------------------------------------------------------------------------------- 1 | ## ***Swarm Management*** 2 | | Command | Description | 3 | | -------------------------------------------- | ---------------------------------------------------- | 4 | | `docker swarm init` | Initialize a new Swarm | 5 | | `docker swarm join --token :` | Join a node to an existing Swarm | 6 | | `docker swarm leave --force` | Forcefully leave the Swarm (for managers) | 7 | | `docker swarm update --autolock=true` | Enable autolocking for Swarm cluster | 8 | | `docker swarm unlock` | Unlock a locked Swarm | 9 | | `docker swarm unlock-key` | Manage the unlock key for autolocking | 10 | | `docker swarm update --dispatcher-heartbeat ` | Adjust heartbeat intervals between Swarm managers and workers | 11 | 12 | 13 | ## ***Service Networking*** 14 | | Command | Description | 15 | | -------------------------------------------- | ---------------------------------------------------- | 16 | | `docker network create --driver overlay ` | Create an overlay network for Swarm services| 17 | | `docker network ls` | List all networks in the Swarm | 18 | | `docker service update --network-add ` | Attach a service to a network | 19 | | `docker network inspect ` | Inspect an overlay network | 20 | | `docker network rm ` | Remove a network | 21 | | `docker service create --network ` | Create a service attached to a network | 22 | 23 | 24 | ## ***Basic Commands*** 25 | | Command | Description | 26 | | -------------------------------------------- | ---------------------------------------------------- | 27 | | `docker swarm init` | Initialize a new Swarm cluster | 28 | | `docker swarm join --token :` | Join a Swarm as a worker or manager using the token | 29 | | `docker swarm leave` | Leave the Swarm (for a worker node) | 30 | | `docker swarm leave --force` | Force a manager to leave the Swarm | 31 | | `docker node ls` | List all nodes in the Swarm | 32 | | `docker node inspect ` | Inspect a specific node | 33 | | `docker node rm ` | Remove a node from the Swarm | 34 | | `docker swarm update --task-history-limit ` | Update Swarm settings like task history | 35 | 36 | 37 | ## ***Service Management*** 38 | | Command | Description | 39 | | -------------------------------------------- | ---------------------------------------------------- | 40 | | `docker service create --name ` | Create a new service in the Swarm | 41 | | `docker service ls` | List all services running in the Swarm | 42 | | `docker service inspect ` | Inspect a specific service in the Swarm | 43 | | `docker service scale =` | Scale a service to a specified number of replicas | 44 | | `docker service ps ` | List tasks associated with a service | 45 | | `docker service rm ` | Remove a service from the Swarm | 46 | | `docker service logs ` | View logs of a specific service | 47 | | `docker service update --image ` | Update a service to use a new image | 48 | 49 | 50 | ## ***Backup & Restore*** 51 | | Command | Description | 52 | | -------------------------------------------- | ---------------------------------------------------- | 53 | | `docker swarm unlock-key --rotate` | Rotate the unlock key for the Swarm | 54 | | `docker node update --availability drain ` | Drain a node before backing up | 55 | | `docker service update --force ` | Force update a service to refresh its configuration | 56 | | `docker node demote ` | Demote a manager to worker for cluster safety | 57 | | `docker service rollback ` | Rollback a service to its previous version | 58 | 59 | 60 | ## ***Node Management*** 61 | | Command | Description | 62 | | -------------------------------------------- | ---------------------------------------------------- | 63 | | `docker node promote ` | Promote a worker node to manager | 64 | | `docker node demote ` | Demote a manager node to worker | 65 | | `docker node ls` | List all nodes in the Swarm | 66 | | `docker node update --availability drain ` | Set a node to "drain" mode (won't run new tasks)| 67 | | `docker node update --availability active ` | Set a node to "active" mode | 68 | | `docker node update --label-add key=value ` | Add or update a label on a node | 69 | | `docker node rm ` | Remove a node from the Swarm | 70 | 71 | 72 | ## ***Task Management*** 73 | | Command | Description | 74 | | -------------------------------------------- | ---------------------------------------------------- | 75 | | `docker service ps ` | List tasks running in a specific service | 76 | | `docker inspect ` | Inspect a specific task | 77 | | `docker node ps ` | List tasks running on a specific node | 78 | | `docker service scale =` | Scale a service up or down by number of replicas | 79 | | `docker service update --force ` | Force update of a running service | 80 | | `docker service rollback ` | Roll back to the previous version of a service | 81 | 82 | 83 | ## ***Troubleshooting & Logs*** 84 | | Command | Description | 85 | | -------------------------------------------- | ---------------------------------------------------- | 86 | | `docker service logs ` | View logs for a specific service | 87 | | `docker node inspect ` | Inspect detailed information about a node | 88 | | `docker service ps ` | List the running tasks for a service | 89 | | `docker inspect ` | Inspect a specific task within a service | 90 | | `docker events` | Get real-time events from the Docker daemon | 91 | | `docker node ls` | List all nodes in the Swarm | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /docker/build/README.md: -------------------------------------------------------------------------------- 1 | | Base Image | Size | Command | Description | 2 | |-----------------------|-------|-------------------------------|-----------------------------------------------------------| 3 | | Alpine (arm64) | ~5MB | `FROM alpine:latest` | Arm based, optimized for security & resource efficiency. | 4 | | Debian Slim (amd64) | ~22MB | `FROM debian:bullseye-slim` | minimal, stripped down to the essentials | 5 | | Ubuntu Minimal (amd64)| ~29MB | `FROM ubuntu:20.04` | A lightweight, official Ubuntu image with minimal | 6 | 7 | -------------------------------------------------------------------------------- /docker/compose/README.md: -------------------------------------------------------------------------------- 1 | ## ***Environment Management*** 2 | | Command | Description | 3 | | -------------------------------------------- | ---------------------------------------------------- | 4 | | `docker-compose config` | Validate and view Compose configuration | 5 | | `docker-compose --env-file ` | Specify an environment file to use | 6 | | `docker-compose run -e =` | Set environment variables for a one-time command | 7 | | `docker-compose exec -e =` | Set environment variables for an exec command | 8 | | `docker-compose config --resolve-image-digests` | Resolve image digests instead of using tag-based references 9 | 10 | 11 | ## ***Networking*** 12 | | Command | Description | 13 | | -------------------------------------------- | ---------------------------------------------------- | 14 | | `docker-compose up --scale =` | Scale up/down a service | 15 | | `docker-compose ps` | List containers defined in the Compose file | 16 | | `docker-compose port ` | Display the public-facing port of a specific service | 17 | | `docker-compose down --volumes` | Remove networks created by `docker-compose up` | 18 | | `docker-compose config --services` | List all services in the Compose configuration file | 19 | | `docker-compose config --volumes` | List all volumes in the Compose configuration file | 20 | 21 | 22 | ## ***Service Management*** 23 | | Command | Description | 24 | | -------------------------------------------- | ---------------------------------------------------- | 25 | | `docker-compose scale =` | Scale a service to a specified number of containers| 26 | | `docker-compose logs ` | View logs for a specific service | 27 | | `docker-compose logs -f` | Tail logs of all services defined in the Compose file| 28 | | `docker-compose run ` | Run a one-time command on a service | 29 | | `docker-compose kill ` | Force stop a specific service | 30 | | `docker-compose rm ` | Remove a stopped service container | 31 | | `docker-compose exec ` | Execute a command inside a running service container| 32 | 33 | 34 | ## ***Volumes*** 35 | | Command | Description | 36 | | -------------------------------------------- | ---------------------------------------------------- | 37 | | `docker-compose up -d ` | Start a service with a mounted volume in detached mode | 38 | | `docker-compose down --volumes` | Remove all volumes used by the services | 39 | | `docker-compose run --rm -v :` | Run a one-time container with a specified volume | 40 | | `docker-compose up -v` | Recreate containers with attached volumes | 41 | | `docker-compose logs -f --tail=100` | View the last 100 logs with real-time updates | 42 | 43 | 44 | 45 | ## ***Inspecting & Debugging*** 46 | | Command | Description | 47 | | -------------------------------------------- | ---------------------------------------------------- | 48 | | `docker-compose ps` | List all containers with their status | 49 | | `docker-compose logs ` | View logs for a specific service | 50 | | `docker-compose logs -f` | Tail logs for all services | 51 | | `docker-compose top` | Display processes running inside the containers | 52 | | `docker-compose config` | Validate and view the Compose file configuration | 53 | | `docker-compose config --services` | List all services in the Compose file | 54 | | `docker-compose config --volumes` | List all volumes in the Compose file | 55 | | `docker-compose config -q` | Check if the Compose file is valid | 56 | | `docker-compose exec /bin/bash` | Open a bash shell in a running container | 57 | 58 | 59 | 60 | ## ***Basic*** 61 | | Command | Description | 62 | | -------------------------------------------- | ---------------------------------------------------- | 63 | | `docker-compose --version` | Display Docker Compose version | 64 | | `docker-compose up` | Create and start containers from a Compose file | 65 | | `docker-compose up -d` | Start containers in detached mode | 66 | | `docker-compose down` | Stop and remove containers, networks, images, and volumes | 67 | | `docker-compose start` | Start existing services defined in the Compose file | 68 | | `docker-compose stop` | Stop running services without removing them | 69 | | `docker-compose restart` | Restart services | 70 | 71 | 72 | 73 | 74 | ## ***Building & Images*** 75 | | Command | Description | 76 | | -------------------------------------------- | ---------------------------------------------------- | 77 | | `docker-compose build` | Build or rebuild services | 78 | | `docker-compose build --no-cache` | Build without using cache | 79 | | `docker-compose up --build` | Build and start the services | 80 | | `docker-compose pull` | Pull service images defined in the Compose file | 81 | | `docker-compose push` | Push service images to a registry | 82 | | `docker-compose images` | List all images used by the services | 83 | 84 | 85 | 86 | ## ***System Management*** 87 | | Command | Description | 88 | | -------------------------------------------- | ---------------------------------------------------- | 89 | | `docker-compose pause` | Pause all running services | 90 | | `docker-compose unpause` | Unpause paused services | 91 | | `docker-compose stop` | Stop all services | 92 | | `docker-compose start` | Start all services | 93 | | `docker-compose restart` | Restart all services | 94 | | `docker-compose down --rmi all` | Remove all services and their images | 95 | | `docker-compose version` | Show Docker Compose version information | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /fio/README.md: -------------------------------------------------------------------------------- 1 | ## fio (flexible I/O Tester) 2 | 3 | - ***what this test is doing: reads/writes for 60 seconds and then outputting the amount of data read/wrote*** 4 | - ***what this test is not doing: testing a single read/write cycle for the size of the file*** 5 | - ***Wiki: https://fio.readthedocs.io/en/latest/fio_doc.html*** 6 | 7 | ## ***Benchmarks:*** 8 | 9 | | Command | Description | 10 | | ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | 11 | | `fio --name=rand_read --directory=/mnt --ioengine=libaio --rw=randread --bs=4k --direct=1 --size=1G --numjobs=4 --time_based --runtime=60 --group_reporting` | 4K Random Read | 12 | | `fio --name=rand_write --directory=/mnt --ioengine=libaio --rw=randwrite --bs=4k --direct=1 --size=1G --numjobs=4 --time_based --runtime=60 --group_reporting` | 4K Random Write | 13 | | `fio --name=concurrent_read --directory=/mnt --ioengine=libaio --rw=read --bs=4k --direct=1 --size=1G --numjobs=4 --iodepth=32 --time_based --runtime=60 --group_reporting` | Concurrent I/O Depth Read | 14 | | `fio --name=concurrent_write --directory=/mnt --ioengine=libaio --rw=write --bs=4k --direct=1 --size=1G --numjobs=4 --iodepth=32 --time_based --runtime=60 --group_reporting` | Concurrent I/O Depth Write | 15 | | `fio --name=seq_read --directory=/mnt --ioengine=libaio --rw=read --bs=128k --direct=1 --size=1G --numjobs=1 --time_based --runtime=60 --group_reporting` | Sequential Read (128KB Block) | 16 | | `fio --name=seq_write --directory=/mnt --ioengine=libaio --rw=write --bs=128k --direct=1 --size=1G --numjobs=1 --time_based --runtime=60 --group_reporting` | Sequential Write (128KB Block) | 17 | | `fio --name=seq_read_write --ioengine=libaio --rw=readwrite --bs=1m --direct=1 --size=10G --numjobs=1 --time_based --runtime=60 --group_reporting` | Large Sequential Read/Write (1M) | 18 | | `fio --name=rand_read_write --ioengine=libaio --rw=randrw --bs=4k --direct=1 --size=10G --numjobs=4 --time_based --runtime=60 --group_reporting` | Large Random Read/Write (4K) | 19 | | `fio --name=vm_clone_sim --ioengine=libaio --rw=write --bs=4k --direct=1 --size=10G --numjobs=4 --time_based --runtime=60 --group_reporting` | Proxmox VM Clone (10GB) | 20 | | `fio --name=random_rw --ioengine=libaio --rw=randrw --bs=4k --direct=1 --size=1G --numjobs=4 --runtime=60 --group_reporting --directory=/mnt/nfs` | VM Simulation Random Read/Write | 21 | | `fio --name=seq_read --ioengine=libaio --rw=read --bs=1M --direct=1 --size=2G --numjobs=4 --runtime=60 --group_reporting --directory=/mnt/nfs` | VM Simulation Large Sequential Read| 22 | | `fio --name=seq_write --ioengine=libaio --rw=write --bs=1M --direct=1 --size=2G --numjobs=4 --runtime=60 --group_reporting --directory=/mnt/nfs` | VM Simulation Large Sequential Write | 23 | 24 | 25 | -------------------------------------------------------------------------------- /gcc/README.md: -------------------------------------------------------------------------------- 1 | ## **GCC** 2 | 3 | 4 | ### **Linking Options** 5 | | Command | Description | 6 | |------------------------------------------------|------------------------------------------------------------| 7 | | `gcc .c -L -l`| Link with a specific library located in a directory | 8 | | `gcc .c -lm` | Link with the math library (`libm`) | 9 | | `gcc .c -static` | Create a statically linked executable | 10 | | `gcc .c -shared` | Create a shared library (dynamic library, `.so` file) | 11 | | `gcc -o -l` | Link with a specified library while generating an output executable| 12 | 13 | 14 | ### **Error Handling** 15 | | Command | Description | 16 | |------------------------------------------------|------------------------------------------------------------| 17 | | `gcc -fsyntax-only .c` | Check the code for syntax errors without generating an object or binary file | 18 | | `gcc -Wall .c` | Enable all common warnings | 19 | | `gcc -Werror .c` | Treat warnings as errors (stop compilation) | 20 | 21 | ### **Cross-Compiling** 22 | | Command | Description | 23 | |------------------------------------------------|------------------------------------------------------------| 24 | | `gcc -target= .c` | Cross-compile for a specific target architecture (e.g., ARM, x86_64) | 25 | | `gcc --sysroot=` | Specify the system root when cross-compiling | 26 | 27 | 28 | 29 | ### **Miscellaneous** 30 | | Command | Description | 31 | |------------------------------------------------|------------------------------------------------------------| 32 | | `gcc -v` | Show detailed version and compilation steps | 33 | | `gcc --help` | Show help for GCC commands | 34 | | `gcc -o .c -pipe` | Use pipes rather than temporary files for intermediate steps| 35 | | `gcc -x ` | Treat input file as the specified language (e.g., `c`, `c++`)| 36 | 37 | 38 | 39 | 40 | ### **Basic GCC Commands** 41 | | Command | Description | 42 | |------------------------------------------------|------------------------------------------------------------| 43 | | `gcc .c` | Compile a C source file into an executable (default `a.out`)| 44 | | `gcc -o .c` | Compile and specify the output file name | 45 | | `gcc -c .c` | Compile the source code to an object file (no linking) | 46 | | `gcc .c .c` | Compile multiple C files and link them together | 47 | | `gcc .c -o ` | Compile and specify output executable | 48 | | `g++ .cpp` | Compile a C++ source file | 49 | | `g++ -o .cpp` | Compile C++ and specify the output executable | 50 | 51 | 52 | ### **Debugging Options** 53 | | Command | Description | 54 | |------------------------------------------------|------------------------------------------------------------| 55 | | `gcc -g .c` | Compile with debugging information (for use with GDB) | 56 | | `gcc -ggdb .c` | Include additional debug information for GDB | 57 | | `gcc -Wall .c` | Enable most common warnings | 58 | | `gcc -Werror .c` | Treat warnings as errors (stop compilation if warnings are present) | 59 | | `gcc -pedantic .c` | Issue all warnings required by strict ISO C/C++ standard | 60 | 61 | 62 | 63 | ### **Compiling and Linking Separately** 64 | | Command | Description | 65 | |------------------------------------------------|------------------------------------------------------------| 66 | | `gcc -c .c -o .o` | Compile source code into object file without linking | 67 | | `gcc -c .c -o .o` | Compile another source file | 68 | | `gcc .o .o -o ` | Link object files to create an executable | 69 | 70 | 71 | 72 | ### **Optimization Options** 73 | | Command | Description | 74 | |------------------------------------------------|------------------------------------------------------------| 75 | | `gcc -O0 .c` | No optimization (default) | 76 | | `gcc -O1 .c` | Optimize for performance without increasing compilation time | 77 | | `gcc -O2 .c` | Optimize more, including costly optimizations | 78 | | `gcc -O3 .c` | Maximum optimization, including aggressive performance tuning | 79 | | `gcc -Os .c` | Optimize for size (minimize code size) | 80 | 81 | 82 | 83 | 84 | ### **Preprocessing Options** 85 | | Command | Description | 86 | |------------------------------------------------|------------------------------------------------------------| 87 | | `gcc -E .c` | Run the preprocessor only, without compiling | 88 | | `gcc -I ` | Add a directory to the list of paths to search for header files | 89 | | `gcc -D` | Define a macro in the code being compiled | 90 | | `gcc -U` | Undefine a macro | 91 | | `gcc -include ` | Include a header file before all others | 92 | 93 | 94 | 95 | ### **C++ Specific Options (g++)** 96 | | Command | Description | 97 | |------------------------------------------------|------------------------------------------------------------| 98 | | `g++ -std=c++11 .cpp` | Compile C++ code with C++11 standard support | 99 | | `g++ -std=c++17 .cpp` | Compile C++ code with C++17 standard support | 100 | | `g++ -fno-exceptions .cpp` | Disable exception handling | 101 | | `g++ -fno-rtti .cpp` | Disable runtime type identification | 102 | 103 | 104 | ### **Multithreading Options** 105 | | Command | Description | 106 | |------------------------------------------------|------------------------------------------------------------| 107 | | `gcc -pthread .c` | Compile with POSIX threads support (for multithreading) | 108 | | `gcc -fopenmp .c` | Compile with OpenMP support for parallel processing | 109 | 110 | 111 | 112 | 113 | ### **Compiling Large Projects** 114 | | Command | Description | 115 | |------------------------------------------------|------------------------------------------------------------| 116 | | `gcc @options_file` | Read additional command-line options from a file | 117 | | `gcc -M .c` | Output a makefile-style dependency list | 118 | 119 | 120 | ### **Profiling and Performance Analysis** 121 | | Command | Description | 122 | |------------------------------------------------|------------------------------------------------------------| 123 | | `gcc -pg .c` | Enable profiling with `gprof` | 124 | | `gprof gmon.out` | Generate profiling report using `gprof` | 125 | 126 | 127 | 128 | 129 | 130 | 131 | ### **Common File Extensions** 132 | - **`.c`**: C source file 133 | - **`.cpp`**: C++ source file 134 | - **`.h`**: C/C++ header file 135 | - **`.o`**: Object file (output of compilation but not yet linked) 136 | - **`.a`**: Static library 137 | - **`.so`**: Shared library (for dynamic linking) 138 | 139 | 140 | ### **Makefile Integration** 141 | 142 | - GCC is often used in conjunction with **Makefiles** to automate the compilation process, especially for larger projects. Makefiles allow you to specify dependencies, compilation flags, and multiple steps to manage complex projects. 143 | 144 | A simple **Makefile** example: 145 | ```makefile 146 | CC=gcc 147 | CFLAGS=-Wall -g 148 | 149 | all: myprogram 150 | 151 | myprogram: main.o lib.o 152 | $(CC) -o myprogram main.o lib.o 153 | 154 | main.o: main.c 155 | $(CC) $(CFLAGS) -c main.c 156 | 157 | lib.o: lib.c 158 | $(CC) $(CFLAGS) -c lib.c 159 | 160 | clean: 161 | rm -f *.o myprogram 162 | -------------------------------------------------------------------------------- /git/README.md: -------------------------------------------------------------------------------- 1 | ## **Git** 2 | 3 | ### **Project and Repository Management** 4 | | Command | Description | 5 | |------------------------------------------------|------------------------------------------------------------| 6 | | `git clone ` | Clone a GitLab repository to your local machine | 7 | | `git init` | Initialize a new local repository | 8 | | `git remote add origin ` | Add a remote repository for your project | 9 | | `git push -u origin ` | Push a local branch to GitLab and set upstream tracking | 10 | | `git pull` | Fetch changes from the remote repository and merge them | 11 | | `git fetch` | Fetch changes from the remote repository without merging | 12 | | `git branch` | List all branches | 13 | | `git branch ` | Create a new branch | 14 | | `git checkout ` | Switch to a specific branch | 15 | | `git checkout -b ` | Create and switch to a new branch | 16 | | `git merge ` | Merge a branch into the current branch | 17 | | `git rebase ` | Rebase the current branch onto another branch | 18 | | `git push origin --delete ` | Delete a branch in the remote repository | 19 | | `git tag ` | Create a new tag | 20 | | `git push origin ` | Push a tag to the remote repository | 21 | | `git tag -d ` | Delete a local tag | 22 | | `git push origin :refs/tags/` | Delete a remote tag | 23 | | `git log` | Show the commit history | 24 | | `git show ` | Show the details of a specific commit | 25 | | `git diff` | Show changes between commits or working directory changes | 26 | | `git status` | Show the current status of the working directory | 27 | -------------------------------------------------------------------------------- /git/commit_misconfig_fix.md: -------------------------------------------------------------------------------- 1 | ## **user filter branch to fix** 2 | 3 | ```sh 4 | git filter-branch --env-filter ' 5 | WRONG_EMAIL="alporjects1@proton.me" 6 | NEW_NAME="alprojects1" 7 | NEW_EMAIL="alprojects1@proton.me" 8 | 9 | if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ] 10 | then 11 | export GIT_COMMITTER_NAME="$NEW_NAME" 12 | export GIT_COMMITTER_EMAIL="$NEW_EMAIL" 13 | fi 14 | if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ] 15 | then 16 | export GIT_AUTHOR_NAME="$NEW_NAME" 17 | export GIT_AUTHOR_EMAIL="$NEW_EMAIL" 18 | fi 19 | ' -- --all 20 | ``` 21 | ## **force push to all branches & tags** 22 | 23 | ```sh 24 | git push --force --tags origin 'refs/heads/*' 25 | ``` 26 | -------------------------------------------------------------------------------- /gitlab/README.md: -------------------------------------------------------------------------------- 1 | ## **GitLab** 2 | 3 | ### **User and Access Management** 4 | | Command | Description | 5 | |------------------------------------------------|------------------------------------------------------------| 6 | | `Add SSH Key in GitLab UI` | Add your SSH key in GitLab for authentication | 7 | | `git remote set-url origin git@:/.git` | Set SSH-based GitLab remote URL| 8 | | `Invite Collaborators` | Invite users to collaborate on a project via GitLab UI | 9 | | `Set Permissions` | Set user permissions (Guest, Reporter, Developer, Maintainer) in GitLab UI | 10 | | `Remove Users` | Remove users from a project or group via GitLab UI| 11 | 12 | 13 | 14 | ### **GitLab Container Registry** 15 | | Command | Description | 16 | |------------------------------------------------|------------------------------------------------------------| 17 | | `docker login registry.gitlab.com` | Log in to GitLab Container Registry | 18 | | `docker push registry.gitlab.com///:` | Push Docker image to GitLab Container Registry | 19 | | `docker pull registry.gitlab.com///:` | Pull Docker image from GitLab Container Registry | 20 | | `View Container Registry in GitLab UI` | View and manage container images in the GitLab UI | 21 | 22 | 23 | 24 | ### **Merge Requests and Code Review** 25 | | Command | Description | 26 | |------------------------------------------------|------------------------------------------------------------| 27 | | `git checkout -b ` | Create a new feature branch for the merge request | 28 | | `git push origin ` | Push the feature branch to GitLab | 29 | | `Create Merge Request in GitLab UI` | Create a new merge request from the feature branch | 30 | | `Assign Reviewers` | Assign reviewers for code review | 31 | | `Resolve Merge Conflicts` | Resolve conflicts in a merge request | 32 | | `Approve Merge Request` | Approve the merge request after reviewing | 33 | | `git fetch origin merge-requests//head:` | Check out a merge request locally | 34 | | `git merge --no-ff ` | Merge with no fast-forwarding, preserving history | 35 | 36 | 37 | 38 | ### **GitLab Environment Variables** 39 | | Command | Description | 40 | |------------------------------------------------|------------------------------------------------------------| 41 | | `Set Environment Variables in GitLab UI` | Set environment variables for use in CI/CD pipelines | 42 | | `Use CI/CD Variables in .gitlab-ci.yml` | Reference environment variables in the `.gitlab-ci.yml` file | 43 | | `Use Protected Variables` | Use protected variables that are only available in protected branches | 44 | | `gitlab-ci-token` | CI token used to authenticate and trigger pipelines | 45 | 46 | 47 | ### **GitLab Security and Compliance** 48 | | Command | Description | 49 | |------------------------------------------------|------------------------------------------------------------| 50 | | `Configure SAST in .gitlab-ci.yml` | Set up Static Application Security Testing (SAST) | 51 | | `Configure DAST in .gitlab-ci.yml` | Set up Dynamic Application Security Testing (DAST) | 52 | | `Configure Dependency Scanning in .gitlab-ci.yml` | Set up Dependency Scanning for your project | 53 | | `View Vulnerability Report in GitLab UI` | View vulnerabilities found during security scans | 54 | | `Resolve Vulnerabilities` | Address and resolve security vulnerabilities | 55 | 56 | 57 | ### **GitLab Pages** 58 | | Command | Description | 59 | |------------------------------------------------|------------------------------------------------------------| 60 | | `Configure GitLab Pages` | Configure GitLab Pages in `.gitlab-ci.yml` to deploy static sites| 61 | | `Custom Domain for GitLab Pages` | Set up a custom domain for GitLab Pages | 62 | | `TLS Certificates for GitLab Pages` | Set up TLS certificates for secure GitLab Pages | 63 | | `Deploy GitLab Pages` | Automatically deploy GitLab Pages using the CI/CD pipeline | 64 | 65 | 66 | 67 | ### **GitLab CI/CD Pipelines** 68 | | Command | Description | 69 | |------------------------------------------------|------------------------------------------------------------| 70 | | `.gitlab-ci.yml` | Define CI/CD pipeline stages and jobs in this file | 71 | | `gitlab-runner register` | Register a new GitLab Runner | 72 | | `gitlab-runner start` | Start the GitLab Runner | 73 | | `gitlab-runner stop` | Stop the GitLab Runner | 74 | | `gitlab-runner verify` | Verify the GitLab Runner | 75 | | `gitlab-runner unregister` | Unregister a GitLab Runner | 76 | | `gitlab-runner list` | List all registered GitLab Runners | 77 | | `gitlab-runner exec ` | Execute a CI job locally with a specific executor | 78 | | `gitlab-runner --help` | Show help for GitLab Runner commands | 79 | 80 | 81 | ### **GitLab Group and Project Management** 82 | | Command | Description | 83 | |------------------------------------------------|------------------------------------------------------------| 84 | | `Create Group in GitLab UI` | Create a new group in GitLab | 85 | | `Create Project in GitLab UI` | Create a new project in GitLab under a group or user | 86 | | `Add Project to Group` | Add a project to a specific group | 87 | | `Transfer Project` | Transfer a project to another group or user | 88 | | `Archive Project` | Archive a project that is no longer active | 89 | | `Fork Project` | Fork an existing project to make independent changes | 90 | | `Delete Project` | Permanently delete a project from GitLab | 91 | 92 | 93 | 94 | ### **Backup and Restore** 95 | | Command | Description | 96 | |------------------------------------------------|------------------------------------------------------------| 97 | | `gitlab-backup create` | Create a backup of the GitLab instance | 98 | | `gitlab-backup restore BACKUP=timestamp` | Restore a GitLab instance from a backup | 99 | | `gitlab-rake gitlab:check` | Check the health of the GitLab instance | 100 | 101 | 102 | 103 | ### **GitLab Issues and Boards** 104 | | Command | Description | 105 | |------------------------------------------------|------------------------------------------------------------| 106 | | `Create Issue in GitLab UI` | Create a new issue for your project | 107 | | `Assign Issue` | Assign an issue to a specific user | 108 | | `Set Due Date` | Set a due date for an issue | 109 | | `Use Labels` | Use labels to categorize issues | 110 | | `Move Issue to Another Board` | Move an issue to a different board | 111 | | `Close Issue` | Close an issue when it is resolved | 112 | 113 | -------------------------------------------------------------------------------- /gitlab/gitlabctl.md: -------------------------------------------------------------------------------- 1 | ## GitLab-ctl 2 | 3 | | Command | Description | 4 | |-----------------------------------------|-------------| 5 | | `gitlab-ctl status` | Display the current status of all GitLab services. | 6 | | `gitlab-ctl start` | Start all GitLab services. | 7 | | `gitlab-ctl stop` | Stop all GitLab services. | 8 | | `gitlab-ctl restart` | Restart all GitLab services. | 9 | | `gitlab-ctl reconfigure` | Rebuild GitLab configuration files and restart services as necessary. | 10 | | `gitlab-ctl tail` | Tail logs for all GitLab services. | 11 | | `gitlab-ctl hup puma` | Reload Puma to apply configuration changes with minimal downtime. | 12 | | `gitlab-ctl deploy-page up` | Display a "Deploy in progress" page to restrict user access during maintenance. | 13 | | `gitlab-ctl deploy-page down` | Remove the "Deploy in progress" page to restore user access after maintenance. | 14 | | `gitlab-ctl show-config` | Display the configuration that would be generated by `reconfigure`. | 15 | | `gitlab-ctl cleanse` | Delete all GitLab data and start from scratch. | 16 | | `gitlab-ctl uninstall` | Uninstall GitLab services while preserving data. | 17 | | `gitlab-ctl pg-upgrade` | Upgrade the PostgreSQL database to the latest supported version. | 18 | | `gitlab-ctl revert-pg-upgrade` | Revert to the previous version of the PostgreSQL database. | 19 | | `gitlab-ctl set-replication-password` | Set the database replication password. | 20 | | `gitlab-ctl registry-garbage-collect` | Run garbage collection for the Container Registry. | 21 | | `gitlab-ctl backup-etc` | Backup GitLab configuration files. | 22 | | `gitlab-ctl renew-le-certs` | Renew existing Let's Encrypt certificates. | 23 | | `gitlab-ctl geo-replication-pause` | Pause Geo replication processes. | 24 | | `gitlab-ctl geo-replication-resume` | Resume Geo replication processes. | 25 | | `gitlab-ctl set-geo-primary-node` | Designate the current node as the Geo primary. | 26 | | `gitlab-ctl replicate-geo-database` | Replicate the Geo database. | 27 | | `gitlab-ctl pgb-console` | Connect to the PgBouncer console. | 28 | | `gitlab-ctl pgb-resume` | Send the "resume" command to PgBouncer. | 29 | | `gitlab-ctl pgb-suspend` | Send the "suspend" command to PgBouncer. | 30 | | `gitlab-ctl pgb-notify` | Notify PgBouncer of an update to its database. | 31 | | `gitlab-ctl pgb-kill` | Send the "kill" command to PgBouncer. | 32 | | `gitlab-ctl consul` | Interact with the GitLab Consul cluster. | 33 | | `gitlab-ctl praefect` | Interact with the Gitaly cluster. | 34 | | `gitlab-ctl patroni` | Interact with Patroni for PostgreSQL high availability. | 35 | | `gitlab-ctl get-postgresql-primary` | Get connection details to the PostgreSQL primary node. | 36 | | `gitlab-ctl remove-accounts` | Delete all users and groups used by the GitLab package. | 37 | | `gitlab-ctl reset-grafana` | Reset Grafana to its initial state by removing the data directory. | 38 | | `gitlab-ctl set-grafana-password` | Reset the admin password for Grafana. | 39 | | `gitlab-ctl upgrade` | Run migrations after a package upgrade. | 40 | | `gitlab-ctl upgrade-check` | Check if the upgrade is acceptable. | 41 | | `gitlab-ctl check-config` | Check for any deprecated configurations in `gitlab.rb`. | 42 | | `gitlab-ctl diff-config` | Compare the user configuration with the package's available configuration. | 43 | | `gitlab-ctl get-redis-master` | Get connection details to the Redis master node. | 44 | | `gitlab-ctl rotate-secrets` | Rotate the secrets file (`gitlab-secrets.json`). | 45 | -------------------------------------------------------------------------------- /gitlab/postres.md: -------------------------------------------------------------------------------- 1 | ## PostgreSQL Commands and Configurations 2 | 3 | | Command/Configuration | Description | 4 | |---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------- | 5 | | `sudo gitlab-psql -d gitlabhq_production` | Access the GitLab PostgreSQL database as a superuser. | 6 | | `sudo gitlab-rails dbconsole` | Access the GitLab PostgreSQL database as the application user. | 7 | | `gitlab-ctl pg-upgrade` | Upgrade the packaged PostgreSQL server to a later version. | 8 | | `/opt/gitlab/embedded/bin/postgres --single -D /var/opt/gitlab/postgresql/data gitlabhq_production` | Place the database in single-user mode for maintenance tasks. | 9 | | `gitlab-ctl stop` | Stop GitLab services, often used before performing database maintenance. | 10 | | `gitlab-ctl start` | Start GitLab services after maintenance or configuration changes. | 11 | | `gitlab-ctl reconfigure` | Apply configuration changes, including those related to the PostgreSQL database. | 12 | | `gitlab-ctl restart postgresql` | Restart the PostgreSQL service within GitLab. | 13 | | `gitlab-ctl pg-upgrade -V ` | Upgrade to a specific PostgreSQL version (e.g., `gitlab-ctl pg-upgrade -V 14` for PostgreSQL 14). | 14 | | `gitlab-ctl revert-pg-upgrade -V ` | Revert to a previous PostgreSQL version if needed. | 15 | | `gitlab-ctl deploy-page up` | Display a "Deploy in progress" page to restrict user access during maintenance. | 16 | | `gitlab-ctl deploy-page down` | Remove the "Deploy in progress" page to restore user access after maintenance. | 17 | | `gitlab-ctl deploy-page status` | Check the status of the deploy page. | 18 | | `gitlab-ctl reconfigure` | Apply configuration changes after modifying `/etc/gitlab/gitlab.rb`. | 19 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL to apply configuration changes. | 20 | | `gitlab-ctl pg-upgrade -V ` | Upgrade PostgreSQL to a specific version. | 21 | | `gitlab-ctl revert-pg-upgrade -V ` | Revert PostgreSQL to a previous version if needed. | 22 | | `gitlab-ctl repmgr standby setup MASTER_NODE_NAME` | Recreate secondary nodes in a PostgreSQL HA cluster after an upgrade. | 23 | | `gitlab-ctl repmgr cluster show` | Display the status of the PostgreSQL HA cluster. | 24 | | `gitlab-ctl replicate-geo-database --slot-name=SECONDARY_SLOT_NAME --host=PRIMARY_HOST_NAME --sslmode=verify-ca` | Restart database replication on a Geo secondary database after an upgrade.| 25 | | `gitlab-ctl reconfigure` | Reconfigure GitLab to update the `pg_hba.conf` file after replicating the Geo database. | 26 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL after reconfiguring GitLab. | 27 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the Geo primary database. | 28 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the Geo secondary database and tracking database. | 29 | | `gitlab-ctl reconfigure` | Reconfigure GitLab on the Geo secondary database to update the `pg_hba.conf` file. | 30 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL on the Geo secondary database after reconfiguring GitLab. | 31 | | `gitlab-ctl reconfigure` | Reconfigure GitLab after modifying the `postgresql['version']` setting in `/etc/gitlab/gitlab.rb`. | 32 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL after reconfiguring GitLab. | 33 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the primary node in a PostgreSQL HA cluster. | 34 | | `gitlab-ctl repmgr standby setup MASTER_NODE_NAME` | Recreate secondary nodes in a PostgreSQL HA cluster after upgrading the primary node. | 35 | | `gitlab-ctl repmgr cluster show` | Display the status of the PostgreSQL HA cluster after upgrading. | 36 | | `gitlab-ctl reconfigure` | Reconfigure GitLab after modifying the `postgresql['max_replication_slots']` setting in `/etc/gitlab/gitlab.rb`.| 37 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL after reconfiguring GitLab. | 38 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the Geo primary database. | 39 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the Geo secondary database and tracking database. | 40 | | `gitlab-ctl replicate-geo-database --slot-name=SECONDARY_SLOT_NAME --host=PRIMARY_HOST_NAME --sslmode=verify-ca` | Restart database replication on the Geo secondary database after upgrading PostgreSQL.| 41 | | `gitlab-ctl reconfigure` | Reconfigure GitLab on the Geo secondary database to update the `pg_hba.conf` file after replicating the Geo database. | 42 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL on the Geo secondary database after reconfiguring GitLab. | 43 | | `gitlab-ctl reconfigure` | Reconfigure GitLab after modifying the `postgresql['version']` setting in `/etc/gitlab/gitlab.rb`. | 44 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL after reconfiguring GitLab. | 45 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the primary node in a PostgreSQL HA cluster. | 46 | | `gitlab-ctl repmgr standby setup MASTER_NODE_NAME` | Recreate secondary nodes in a PostgreSQL HA cluster after upgrading the primary node. | 47 | | `gitlab-ctl repmgr cluster show` | Display the status of the PostgreSQL HA cluster after upgrading. | 48 | | `gitlab-ctl reconfigure` | Reconfigure GitLab after modifying the `postgresql['max_replication_slots']` setting in `/etc/gitlab/gitlab.rb`. | 49 | | `gitlab-ctl restart postgresql` | Restart PostgreSQL after reconfiguring GitLab. | 50 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the Geo primary database. | 51 | | `gitlab-ctl pg-upgrade` | Upgrade PostgreSQL on the Geo secondary database and tracking database. | 52 | 53 | 54 | -------------------------------------------------------------------------------- /go/README.md: -------------------------------------------------------------------------------- 1 | ### **Cross Compilation** 2 | | Command | Description | 3 | |---------------------------------------------|---------------------------------------------------------------| 4 | | `GOOS=linux GOARCH=amd64 go build` | Compile for Linux on AMD64 architecture | 5 | | `GOOS=windows GOARCH=amd64 go build` | Compile for Windows on AMD64 architecture | 6 | | `GOOS=darwin GOARCH=arm64 go build` | Compile for macOS on ARM64 architecture | 7 | | `GOARCH=arm64 go build` | Compile for ARM64 architecture (general use) | 8 | | `GOOS=linux GOARCH=arm GOARM=7 go build` | Cross-compile for ARMv7 architecture (Raspberry Pi) | 9 | 10 | 11 | ### **Running and Debugging** 12 | | Command | Description | 13 | |---------------------------------------------|---------------------------------------------------------------| 14 | | `go run -race example.go` | Run the program with race detection | 15 | | `go run -gcflags "-N -l" example.go` | Run the program without optimizations for debugging | 16 | | `dlv debug example.go` | Run the Go program in the Delve debugger | 17 | 18 | 19 | 20 | 21 | ### **Compilation and Build Options** 22 | | Command | Description | 23 | |---------------------------------------------|---------------------------------------------------------------| 24 | | `go build` | Compile the current project | 25 | | `go build -o example` | Build the current project and name the output binary | 26 | | `go build -v` | Enable verbose output during the build | 27 | | `go build -x` | Show all the commands executed during the build | 28 | | `go build -race` | Enable race detection (useful for concurrent programs) | 29 | | `go build -ldflags "-s -w"` | Compile with optimizations for smaller binary size | 30 | 31 | 32 | ### **Go Basic** 33 | | Command | Description | 34 | |---------------------------------------------|---------------------------------------------------------------| 35 | | `go run example.go` | Compile and run a Go program without creating a binary | 36 | | `go build example.go` | Compile a Go program into a binary | 37 | | `go install example.go` | Compile and install the program into `$GOPATH/bin` | 38 | | `./example` | Run the compiled binary program | 39 | | `go fmt example.go` | Format the code according to Go standards | 40 | | `go test` | Run tests in the current Go project | 41 | 42 | ### **Go Clean Up** 43 | | Command | Description | 44 | |---------------------------------------------|---------------------------------------------------------------| 45 | | `go clean` | Remove object files, binaries, and cached build information | 46 | | `go clean -cache` | Clear the build cache | 47 | | `go clean -modcache` | Clear the module download cache | 48 | | `go clean -testcache` | Clear the test result cache | 49 | 50 | 51 | ### **Go Module Management** 52 | | Command | Description | 53 | |---------------------------------------------|---------------------------------------------------------------| 54 | | `go mod init example` | Initialize a new Go module in the current directory | 55 | | `go mod tidy` | Clean up unused modules and add missing dependencies | 56 | | `go mod download` | Download all dependencies specified in `go.mod` | 57 | | `go mod vendor` | Copy dependencies to the `vendor` directory | 58 | | `go get ` | Add or update a dependency | 59 | | `go list -m all` | List all modules in the current project | 60 | 61 | 62 | ### **Testing and Benchmarking** 63 | | Command | Description | 64 | |---------------------------------------------|---------------------------------------------------------------| 65 | | `go test` | Run unit tests in the current package | 66 | | `go test -v` | Run tests in verbose mode | 67 | | `go test -cover` | Run tests and display code coverage | 68 | | `go test -bench .` | Run benchmark tests | 69 | | `go test -race` | Run tests with race condition detection | 70 | | `go test -run ` | Run only the specified test function | 71 | | `go test -coverprofile=coverage.out` | Generate coverage report in a file | 72 | | `go tool cover -html=coverage.out` | View coverage report in HTML | 73 | 74 | 75 | 76 | 77 | ### **Go Code Management** 78 | | Command | Description | 79 | |---------------------------------------------|---------------------------------------------------------------| 80 | | `go fmt ./...` | Format all Go files in the current module and submodules | 81 | | `go vet ./...` | Check for suspicious constructs or potential issues | 82 | | `go generate` | Execute `go:generate` directives in the code | 83 | | `golangci-lint run` | Run a linting tool like `golangci-lint` on the project | 84 | 85 | 86 | 87 | ### **Package Management** 88 | | Command | Description | 89 | |---------------------------------------------|---------------------------------------------------------------| 90 | | `go get github.com/pkg/errors` | Download and install a package or module | 91 | | `go list` | List available packages and dependencies | 92 | | `go mod graph` | Display the module dependency graph | 93 | 94 | 95 | 96 | ### **Go Documentation and Tools** 97 | | Command | Description | 98 | |---------------------------------------------|---------------------------------------------------------------| 99 | | `go doc fmt` | View documentation for a Go package | 100 | | `go doc -all` | View all documentation in the current package | 101 | | `go env` | Print Go environment variables | 102 | | `go tool pprof cpu.prof` | Run pprof to analyze CPU profiling data | 103 | | `go tool trace trace.out` | Analyze and view a trace of program execution | 104 | 105 | 106 | 107 | 108 | ### **Miscellaneous** 109 | | Command | Description | 110 | |---------------------------------------------|---------------------------------------------------------------| 111 | | `go version` | Print the installed Go version | 112 | | `go env GOPATH` | Display the current `GOPATH` | 113 | | `go env GOROOT` | Display the location of the Go installation | 114 | | `go help` | Display help information for Go commands | 115 | 116 | -------------------------------------------------------------------------------- /gpg/README.md: -------------------------------------------------------------------------------- 1 | ## **GPG** 2 | 3 | ### **Managing Trust and Expiration** 4 | | Command | Description | 5 | |---------------------------------------------------------------|---------------------------------------------------------| 6 | | `gpg --edit-key ` | Open a key for editing (change trust level, etc.) | 7 | | `gpg --edit-key expire` | Change the expiration date of a key | 8 | | `gpg --trust-model always -r -e file.txt` | Encrypt a file with a trusted recipient without prompts | 9 | 10 | 11 | ### **Encrypting and Decrypting Files** 12 | | Command | Description | 13 | |---------------------------------------------------------------|---------------------------------------------------------| 14 | | `gpg -e -r file.txt` | Encrypt a file for a specified recipient | 15 | | `gpg -d file.txt.gpg` | Decrypt an encrypted file | 16 | | `gpg -c file.txt` | Encrypt a file with a symmetric cipher (password-based) | 17 | | `gpg -d file.txt.gpg -o decrypted_file.txt` | Decrypt a file and output to a specified file | 18 | 19 | 20 | ### **Key Management** 21 | | Command | Description | 22 | |---------------------------------------------------------------|---------------------------------------------------------| 23 | | `gpg --gen-key` | Generate a new GPG key pair | 24 | | `gpg --list-keys` | List all public keys in the keyring | 25 | | `gpg --list-secret-keys` | List all private keys in the keyring | 26 | | `gpg --delete-key ` | Delete a public key from the keyring | 27 | | `gpg --delete-secret-key ` | Delete a private key from the keyring | 28 | | `gpg --export -a > public_key.asc` | Export a public key to a file | 29 | | `gpg --export-secret-keys -a > private_key.asc` | Export a private key to a file | 30 | | `gpg --import ` | Import a public or private key from a file | 31 | 32 | 33 | ### **Generate and Manage Revocation Certificates** 34 | | Command | Description | 35 | |---------------------------------------------------------------|---------------------------------------------------------| 36 | | `gpg --output revoke.asc --gen-revoke ` | Generate a revocation certificate for a key | 37 | | `gpg --import revoke.asc` | Import a revocation certificate to revoke a key | 38 | | `gpg --delete-key ` | Delete a revoked public key from the keyring | 39 | 40 | 41 | ### **Keyserver Management** 42 | | Command | Description | 43 | |---------------------------------------------------------------|---------------------------------------------------------| 44 | | `gpg --keyserver --send-keys ` | Upload a public key to a keyserver | 45 | | `gpg --keyserver --recv-keys ` | Retrieve a public key from a keyserver | 46 | | `gpg --refresh-keys` | Refresh keys from the keyserver | 47 | 48 | 49 | ### **Signing and Verifying Files** 50 | | Command | Description | 51 | |---------------------------------------------------------------|---------------------------------------------------------| 52 | | `gpg --sign file.txt` | Create a digital signature for a file | 53 | | `gpg --clearsign file.txt` | Create a clear-text signature for a file | 54 | | `gpg --detach-sign file.txt` | Create a detached signature for a file | 55 | | `gpg --verify file.txt.gpg` | Verify a signed file | 56 | | `gpg --verify file.sig file.txt` | Verify a detached signature against the file | 57 | -------------------------------------------------------------------------------- /kestra/README.md: -------------------------------------------------------------------------------- 1 | ## **Kestra** 2 | 3 | 4 | ### **Debezium Integration (PostgreSQL/MySQL)** 5 | | Command | Description | 6 | |----------------------------------|-------------------------------------------------------------------------------| 7 | | `kestra debezium capture` | Capture changes from a PostgreSQL or MySQL database using Debezium. | 8 | | `kestra debezium trigger` | Trigger actions based on database change events. | 9 | 10 | 11 | ### **Fivetran Integration** 12 | | Command | Description | 13 | |----------------------------------|-------------------------------------------------------------------------------| 14 | | `kestra fivetran sync ` | Start a sync operation for a specific Fivetran connector. | 15 | | `kestra fivetran status ` | Check the sync status of a Fivetran connector. | 16 | 17 | 18 | ### **Google Cloud Integration** 19 | | Command | Description | 20 | |----------------------------------|-------------------------------------------------------------------------------| 21 | | `kestra gcs list` | List objects in a Google Cloud Storage bucket. | 22 | | `kestra gcs download ` | Download an object from a Google Cloud Storage bucket. | 23 | | `kestra gcs upload ` | Upload a file to a Google Cloud Storage bucket. | 24 | | `kestra bigquery query` | Run a BigQuery query. | 25 | | `kestra bigquery load` | Load data into a BigQuery table. | 26 | | `kestra pubsub publish` | Publish a message to a Google Cloud Pub/Sub topic. | 27 | | `kestra pubsub consume` | Consume messages from a Pub/Sub subscription. | 28 | 29 | 30 | ### **Common Miscellaneous Commands** 31 | | Command | Description | 32 | |----------------------------------|-------------------------------------------------------------------------------| 33 | | `kestra encrypt ` | Encrypt sensitive data using Kestra's built-in encryption tool. | 34 | | `kestra decrypt ` | Decrypt previously encrypted data. | 35 | | `kestra http request` | Make an HTTP request from a Kestra task. | 36 | | `kestra ssh command ` | Run a command on a remote server via SSH. | 37 | 38 | 39 | ### **Git Integration** 40 | | Command | Description | 41 | |----------------------------------|-------------------------------------------------------------------------------| 42 | | `kestra git clone ` | Clone a Git repository to the local machine. | 43 | | `kestra git pull` | Pull the latest changes from a Git repository. | 44 | | `kestra git push` | Push local commits to the remote Git repository. | 45 | 46 | 47 | ### **Docker Integration** 48 | | Command | Description | 49 | |----------------------------------|-------------------------------------------------------------------------------| 50 | | `kestra docker build ` | Build a Docker image from a specified path. | 51 | | `kestra docker push ` | Push a Docker image to a remote repository. | 52 | | `kestra docker run ` | Run a Docker container from a specified image. | 53 | 54 | 55 | ### **SFTP Integration** 56 | | Command | Description | 57 | |----------------------------------|-------------------------------------------------------------------------------| 58 | | `kestra sftp upload ` | Upload a file to an SFTP server. | 59 | | `kestra sftp download ` | Download a file from an SFTP server. | 60 | | `kestra sftp list ` | List files in a directory on the SFTP server. | 61 | 62 | 63 | ### **FTPS Integration** 64 | | Command | Description | 65 | |----------------------------------|-------------------------------------------------------------------------------| 66 | | `kestra ftps upload ` | Upload a file to an FTPS server. | 67 | | `kestra ftps download ` | Download a file from an FTPS server. | 68 | | `kestra ftps list ` | List files in a directory on the FTPS server. | 69 | 70 | 71 | ### **Elasticsearch Integration** 72 | | Command | Description | 73 | |----------------------------------|-------------------------------------------------------------------------------| 74 | | `kestra es search` | Perform a search query on an Elasticsearch cluster. | 75 | | `kestra es index` | Index a document in Elasticsearch. | 76 | | `kestra es bulk` | Perform a bulk operation in Elasticsearch. | 77 | | `kestra es scroll` | Scroll through search results for large datasets. | 78 | 79 | 80 | ### **Dbt Integration** 81 | | Command | Description | 82 | |----------------------------------|-------------------------------------------------------------------------------| 83 | | `kestra dbt run` | Run a DBT model. | 84 | | `kestra dbt test` | Run tests in a DBT project. | 85 | | `kestra dbt compile` | Compile DBT models without running them. | 86 | 87 | 88 | ### **Kestra Task Management** 89 | | Command | Description | 90 | |----------------------------------|-------------------------------------------------------------------------------| 91 | | `kestra task create ` | Create a task from a YAML file. | 92 | | `kestra task run ` | Manually run a specific task. | 93 | | `kestra task list` | List all tasks available in the system. | 94 | 95 | -------------------------------------------------------------------------------- /kubectl/README.md: -------------------------------------------------------------------------------- 1 | ## ***Kubectl*** 2 | ### **Contexts & Configuration** 3 | | Command | Description | 4 | |--------------------------------------------------------------------------------|------------------------------------------------------------| 5 | | `kubectl config set-context --namespace= --cluster= --user=` | Set all context properties | 6 | | `kubectl config set-context --namespace=` | Set the namespace for a context | 7 | | `kubectl config set-context --cluster=` | Set the cluster for a context | 8 | | `kubectl config set-context --user=` | Set the user for a context | 9 | | `kubectl config use-context ` | Change the current context | 10 | | `kubectl config current-context` | Show the current context | 11 | | `kubectl config get-contexts` | List all contexts in the kubeconfig file | 12 | | `kubectl config view` | Show the current kubeconfig file | 13 | | `kubectl config delete-context ` | Delete a context | 14 | 15 | 16 | ### **Service Management** 17 | | Command | Description | 18 | |------------------------------------------------|------------------------------------------------------------| 19 | | `kubectl get svc` | List all services in the current namespace | 20 | | `kubectl describe svc ` | Show details about a specific service | 21 | | `kubectl expose pod --port= --target-port=` | Expose a pod as a new service| 22 | | `kubectl expose deployment --port= --target-port=` | Expose a deployment as a service| 23 | | `kubectl delete svc ` | Delete a specific service | 24 | 25 | 26 | ### **Secrets and ConfigMaps** 27 | | Command | Description | 28 | |------------------------------------------------|------------------------------------------------------------| 29 | | `kubectl get secrets` | List all secrets in the current namespace | 30 | | `kubectl describe secret ` | Show detailed information about a secret | 31 | | `kubectl create secret generic --from-literal==` | Create a new secret from literal values| 32 | | `kubectl create secret docker-registry --docker-username= --docker-password= --docker-email=` | Create a secret for Docker registry authentication | 33 | | `kubectl delete secret ` | Delete a specific secret | 34 | | `kubectl get configmaps` | List all ConfigMaps in the current namespace | 35 | | `kubectl describe configmap ` | Show detailed information about a ConfigMap | 36 | | `kubectl create configmap --from-file=` | Create a ConfigMap from a file | 37 | | `kubectl delete configmap ` | Delete a specific ConfigMap | 38 | 39 | 40 | 41 | ### **Access Control and RBAC** 42 | | Command | Description | 43 | |------------------------------------------------|------------------------------------------------------------| 44 | | `kubectl get roles` | List all roles in the current namespace | 45 | | `kubectl describe role ` | Show detailed information about a role | 46 | | `kubectl create role --verb=get,list --resource=pods` | Create a role with specific permissions | 47 | | `kubectl delete role ` | Delete a specific role | 48 | | `kubectl get rolebindings` | List all role bindings in the current namespace | 49 | | `kubectl describe rolebinding ` | Show details about a role binding | 50 | | `kubectl create rolebinding --role= --user=` | Bind a role to a user| 51 | | `kubectl delete rolebinding `| Delete a specific role binding | 52 | 53 | 54 | 55 | 56 | ### **Cluster Management** 57 | | Command | Description | 58 | |------------------------------------------------|------------------------------------------------------------| 59 | | `kubectl cluster-info` | Display addresses of the master and services | 60 | | `kubectl get nodes` | List all nodes in the cluster | 61 | | `kubectl describe node ` | Show details about a specific node | 62 | | `kubectl cordon ` | Mark a node as unschedulable | 63 | | `kubectl uncordon ` | Mark a node as schedulable again | 64 | | `kubectl drain ` | Drain a node in preparation for maintenance | 65 | | `kubectl get namespaces` | List all namespaces in the cluster | 66 | | `kubectl get services` | List all services in the cluster | 67 | | `kubectl describe service ` | Show detailed information about a service | 68 | | `kubectl get endpoints` | List all endpoints in the cluster | 69 | | `kubectl describe endpoints ` | Show details about the endpoints of a service | 70 | | `kubectl get deployments` | List all deployments in the cluster | 71 | | `kubectl describe deployment `| Show details about a specific deployment | 72 | | `kubectl scale deployment --replicas=` | Scale a deployment to a specified number of replicas| 73 | | `kubectl rollout status deployment/` | Check the status of a deployment rollout | 74 | | `kubectl get events` | List all events in the cluster | 75 | | `kubectl top node` | Display resource (CPU/memory) usage of nodes | 76 | | `kubectl top pod` | Display resource (CPU/memory) usage of pods | 77 | 78 | 79 | 80 | ### **Namespace Management** 81 | | Command | Description | 82 | |------------------------------------------------|------------------------------------------------------------| 83 | | `kubectl create namespace ` | Create a new namespace | 84 | | `kubectl delete namespace ` | Delete a namespace | 85 | | `kubectl get namespaces` | List all namespaces in the cluster | 86 | | `kubectl config set-context --current --namespace=` | Set the default namespace for the current context| 87 | 88 | 89 | ### **Pod Management** 90 | | Command | Description | 91 | |------------------------------------------------|------------------------------------------------------------| 92 | | `kubectl get pods` | List all pods in the current namespace | 93 | | `kubectl get pods --all-namespaces` | List all pods in all namespaces | 94 | | `kubectl describe pod ` | Show details about a specific pod | 95 | | `kubectl logs ` | Show logs from a specific pod | 96 | | `kubectl logs -c ` | Show logs from a specific container in a pod | 97 | | `kubectl exec -it -- ` | Execute a command in a running pod | 98 | | `kubectl port-forward :` | Forward a port from a pod to your local machine | 99 | | `kubectl delete pod ` | Delete a specific pod | 100 | | `kubectl get pod -o yaml` | Get the detailed YAML description of a specific pod | 101 | | `kubectl attach -c `| Attach to a running container inside a pod | 102 | | `kubectl exec --kill -s ` | Send a signal to a container in a pod | 103 | 104 | 105 | ### **Resource Management** 106 | | Command | Description | 107 | |------------------------------------------------|------------------------------------------------------------| 108 | | `kubectl get ` | List all resources of a specific type | 109 | | `kubectl describe ` | Show detailed information about a specific resource | 110 | | `kubectl edit ` | Edit a resource | 111 | | `kubectl delete ` | Delete a specific resource | 112 | | `kubectl apply -f ` | Apply a configuration file | 113 | | `kubectl delete -f ` | Delete resources from a configuration file | 114 | | `kubectl create -f ` | Create resources from a configuration file | 115 | | `kubectl patch --patch ` | Apply a patch to a resource | 116 | | `kubectl rollout restart deployment/` | Restart a deployment | 117 | 118 | 119 | -------------------------------------------------------------------------------- /linux/debian/README.md: -------------------------------------------------------------------------------- 1 | ## ***Network*** 2 | 3 | | Command | Description | 4 | | ------------------------------------------- | ------------------------------------------------------------- | 5 | | `ifconfig` | Show network interfaces and IP addresses | 6 | | `ip addr` | Show IP addresses and network interfaces | 7 | | `ping ` | Send ICMP echo requests to test connectivity | 8 | | `traceroute ` | Trace the route packets take to a network host | 9 | | `netstat -tuln` | Show open ports and listening services | 10 | | `ss -tuln` | Show open ports and listening services (modern replacement for netstat) | 11 | | `dig ` | Query DNS records for a domain | 12 | | `host ` | Lookup DNS information about a domain | 13 | | `nslookup ` | Query DNS records for a domain | 14 | | `scp ` | Securely copy files between hosts using SSH | 15 | | `ssh ` | Connect to a remote host using SSH | 16 | | `iptables -L` | List firewall rules | 17 | | `ufw status` | Check the status of UFW firewall | 18 | 19 | ## ***Systemd*** 20 | 21 | | Command | Description | 22 | | -------------------------------------------------- | --------------------------------------------------------- | 23 | | `systemctl isolate multi-user.target` | Switch to multi-user mode temporarily | 24 | | `systemctl set-default multi-user.target` | Set multi-user mode as the default boot target | 25 | | `systemctl start ` | Start a service | 26 | | `systemctl stop ` | Stop a service | 27 | | `systemctl enable ` | Enable a service to start on boot | 28 | | `systemctl disable ` | Disable a service from starting on boot | 29 | | `systemctl restart ` | Restart a running service | 30 | | `systemctl reload ` | Reload service configuration without restarting | 31 | | `systemctl status ` | Show the status of a service | 32 | | `systemctl daemon-reload` | Reload systemd manager configuration | 33 | | `systemctl list-units --type=service` | List all active services | 34 | | `systemctl show ` | Show detailed properties of a service | 35 | | `journalctl -xe` | Show logs for systemd services | 36 | | `systemctl mask ` | Prevent a service from starting | 37 | | `systemctl unmask ` | Unmask a previously masked service | 38 | | `systemctl reboot` | Reboot the system | 39 | | `systemctl poweroff` | Power off the system | 40 | | `systemctl suspend` | Suspend the system (put it into sleep mode) | 41 | | `systemctl hibernate` | Hibernate the system | 42 | | `systemctl default` | Switch to the default target (usually graphical.target) | 43 | | `systemctl isolate rescue.target` | Switch the system to single-user rescue mode | 44 | | `systemctl cat ` | Display the content of a service unit file | 45 | | `systemctl reset-failed` | Reset the "failed" state of all units | 46 | | `systemctl disable --now ` | Disable and stop a service immediately | 47 | 48 | ## ***Filesystem*** 49 | 50 | | Command | Description | 51 | | ------------------------------------------- | ------------------------------------------------------------- | 52 | | `df -h` | Display disk space usage in human-readable format | 53 | | `du -sh ` | Show the size of a directory in a human-readable format | 54 | | `mount ` | Mount a device to a directory | 55 | | `umount ` | Unmount a device | 56 | | `lsblk` | List information about block devices | 57 | | `blkid` | Get information about block devices (UUID, type, etc.) | 58 | | `mkfs.ext4 ` | Format a device as ext4 filesystem | 59 | | `fsck ` | Check and repair filesystem errors | 60 | | `tune2fs -l ` | List filesystem attributes | 61 | | `resize2fs ` | Resize ext2/ext3/ext4 filesystem | 62 | | `dd if= of=` | Copy a file or create a disk image | 63 | | `rsync -av ` | Synchronize files and directories between two locations | 64 | | `ln -s ` | Create a symbolic link | 65 | 66 | 67 | ## ***Process*** 68 | 69 | | Command | Description | 70 | | ------------------------------------------- | ------------------------------------------------------------- | 71 | | `ps aux` | Show all running processes | 72 | | `top` | Display dynamic real-time information about running processes | 73 | | `htop` | Interactive process viewer (if installed) | 74 | | `kill ` | Terminate a process by process ID | 75 | | `killall ` | Kill all processes by name | 76 | | `nice -n ` | Start a process with a given priority | 77 | | `renice ` | Change the priority of an existing process | 78 | | `pkill ` | Send a signal to processes based on a name pattern | 79 | | `bg ` | Resume a stopped job in the background | 80 | | `fg ` | Bring a background job to the foreground | 81 | 82 | 83 | ## ***Package*** (Debian-based) 84 | 85 | | Command | Description | 86 | | ------------------------------------------- | ------------------------------------------------------------ | 87 | | `apt update` | Update the package list | 88 | | `apt upgrade` | Upgrade installed packages to the latest version | 89 | | `apt install ` | Install a new package | 90 | | `apt remove ` | Remove a package | 91 | | `apt purge ` | Remove a package and its configuration files | 92 | | `dpkg -i ` | Install a package manually from a .deb file | 93 | | `apt search ` | Search for a package | 94 | | `apt show ` | Show information about a package | 95 | | `apt list --installed` | List all installed packages | 96 | | `dpkg --get-selections` | List installed packages | 97 | | `apt autoremove` | Remove unused packages | 98 | -------------------------------------------------------------------------------- /linux/iptables/README.md: -------------------------------------------------------------------------------- 1 | ## ***Managing INPUT Chain Rules*** 2 | | Command | Description | 3 | | -------------------------------------------- | ---------------------------------------------------- | 4 | | `iptables -A INPUT -p tcp --dport -j ACCEPT` | Allow incoming TCP connections on a specific port| 5 | | `iptables -A INPUT -p udp --dport -j ACCEPT` | Allow incoming UDP connections on a specific port| 6 | | `iptables -A INPUT -s -j ACCEPT` | Allow traffic from a specific IP address | 7 | | `iptables -A INPUT -i -j ACCEPT` | Allow traffic from a specific network interface | 8 | | `iptables -A INPUT -p icmp -j ACCEPT` | Allow ICMP (ping) requests | 9 | | `iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT` | Allow incoming traffic for established connections| 10 | | `iptables -A INPUT -p tcp --dport -j DROP` | Drop all incoming traffic on a specific port | 11 | | `iptables -A INPUT -j DROP` | Drop all incoming traffic (default deny rule) | 12 | 13 | 14 | ## ***Managing OUTPUT Chain Rules*** 15 | | Command | Description | 16 | | -------------------------------------------- | ---------------------------------------------------- | 17 | | `iptables -A OUTPUT -p tcp --dport -j ACCEPT` | Allow outgoing TCP connections on a specific port| 18 | | `iptables -A OUTPUT -p udp --dport -j ACCEPT` | Allow outgoing UDP connections on a specific port| 19 | | `iptables -A OUTPUT -p icmp -j ACCEPT` | Allow outgoing ICMP (ping) requests | 20 | | `iptables -A OUTPUT -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT` | Allow new and established outgoing connections| 21 | | `iptables -A OUTPUT -j DROP` | Drop all outgoing traffic (default deny rule) | 22 | 23 | 24 | ## ***NAT & Masquerading*** 25 | | Command | Description | 26 | | -------------------------------------------- | ---------------------------------------------------- | 27 | | `iptables -t nat -A POSTROUTING -o -j MASQUERADE` | Enable NAT masquerading for outgoing traffic| 28 | | `iptables -t nat -A PREROUTING -p tcp --dport -j DNAT --to-destination ` | Redirect incoming traffic to another IP| 29 | | `iptables -t nat -A POSTROUTING -s -o -j SNAT --to-source ` | Change the source IP for outgoing packets| 30 | | `iptables -t nat -L` | List all NAT rules | 31 | | `iptables -t nat -F` | Flush all NAT rules | 32 | 33 | 34 | ## ***Logging & Monitoring*** 35 | | Command | Description | 36 | | -------------------------------------------- | ---------------------------------------------------- | 37 | | `iptables -A INPUT -p tcp --dport -j LOG --log-prefix "TCP_IN: "` | Log incoming TCP traffic on a specific port| 38 | | `iptables -A OUTPUT -p udp --dport -j LOG --log-prefix "UDP_OUT: "` | Log outgoing UDP traffic on a specific port| 39 | | `iptables -A FORWARD -j LOG --log-prefix "FORWARD_DROP: "` | Log all forwarded traffic | 40 | | `dmesg | grep "TCP_IN"` | View logged incoming traffic | 41 | | `iptables -nvL` | Display packet and byte counters for all rules | 42 | 43 | 44 | ## ***Managing FORWARD Chain Rules*** 45 | | Command | Description | 46 | | -------------------------------------------- | ---------------------------------------------------- | 47 | | `iptables -A FORWARD -p tcp --dport -j ACCEPT` | Allow forwarding of TCP traffic on a specific port| 48 | | `iptables -A FORWARD -s -j ACCEPT` | Allow traffic forwarding from a specific IP address | 49 | | `iptables -A FORWARD -d -j ACCEPT` | Allow traffic forwarding to a specific IP address | 50 | | `iptables -A FORWARD -p tcp --dport -j DROP` | Drop forwarded TCP traffic on a specific port | 51 | | `iptables -A FORWARD -j DROP` | Drop all forwarded traffic (default deny rule) | 52 | 53 | 54 | ## ***Basic*** 55 | | Command | Description | 56 | | -------------------------------------------- | ---------------------------------------------------- | 57 | | `iptables -L` | List all active firewall rules | 58 | | `iptables -F` | Flush all firewall rules (clear all rules) | 59 | | `iptables -X` | Delete all custom chains | 60 | | `iptables -Z` | Zero all packet and byte counters | 61 | | `iptables -P INPUT ACCEPT` | Set default policy for the INPUT chain to ACCEPT | 62 | | `iptables -P OUTPUT ACCEPT` | Set default policy for the OUTPUT chain to ACCEPT | 63 | | `iptables -P FORWARD ACCEPT` | Set default policy for the FORWARD chain to ACCEPT | 64 | | `iptables -S` | List all rules in a table format | 65 | 66 | 67 | ## ***Saving & Restoring IPtables Rules*** 68 | | Command | Description | 69 | | -------------------------------------------- | ---------------------------------------------------- | 70 | | `iptables-save > /etc/iptables/rules.v4` | Save current IPv4 rules to a file | 71 | | `iptables-restore < /etc/iptables/rules.v4` | Restore IPv4 rules from a saved file | 72 | | `iptables-save > /etc/iptables/rules.v6` | Save current IPv6 rules to a file | 73 | | `iptables-restore < /etc/iptables/rules.v6` | Restore IPv6 rules from a saved file | 74 | -------------------------------------------------------------------------------- /linux/logrorate/config.md: -------------------------------------------------------------------------------- 1 | ***config*** 2 | ```sh 3 | 1) sudo nano /etc/logrotate.d/clear_mem_cache 4 | /var/log/clear_mem_cache.log { 5 | weekly # Rotate logs weekly 6 | rotate 4 # Keep logs for 4 weeks 7 | compress # Compress rotated logs 8 | delaycompress # Delay compression for one rotation cycle 9 | missingok # Ignore errors if log is missing 10 | notifempty # Do not rotate if log is empty 11 | create 640 root root # Set permissions for new log file 12 | maxsize 50M # Limit log size to 50MB per file 13 | } 14 | ``` 15 | ***Checks*** 16 | ```sh 17 | 1) sudo logrotate -d /etc/logrotate.d/clear_mem_cache 18 | 2) sudo logrotate -f /etc/logrotate.d/clear_mem_cache **force it** 19 | 3) ls -lh /var/log/clear_mem_cache.log* **should see entry** 20 | ``` 21 | -------------------------------------------------------------------------------- /linux/rocky/README.md: -------------------------------------------------------------------------------- 1 | ## ***Network Management*** 2 | | Command | Description | 3 | | -------------------------------------------- | ---------------------------------------------------- | 4 | | `nmcli con show` | Show all network connections | 5 | | `nmcli con edit ` | Edit a specific network connection | 6 | | `nmcli> set ipv4.addresses ` | Set the IPv4 address | 7 | | `nmcli> set ipv4.gateway ` | Set the default IPv4 gateway | 8 | | `nmcli> set ipv4.dns ` | Set the DNS servers | 9 | | `nmcli> save` | Save changes to the network configuration | 10 | | `nmcli> quit` | Exit nmcli interactive mode | 11 | | `sudo nmcli connection up ` | Bring up the network connection | 12 | | `nmcli con mod ipv4.addresses ` | Modify the IP address persistently | 13 | | `nmcli con add con-name ifname type ethernet ip4 gw4 ` | Add a new network connection with specified IP and gateway | 14 | | `nmcli con mod ipv4.dns ""` | Modify the DNS servers for the connection | 15 | | `nmcli con mod connection.autoconnect yes` | Set the connection to autoconnect on boot | 16 | | `nmcli con down && nmcli con up ` | Restart a connection with new settings | 17 | | `systemctl restart NetworkManager` | Restart the NetworkManager service | 18 | | `ip addr show ` | Show IP address information for a specific interface | 19 | 20 | 21 | ## ***Firewalld*** 22 | | Command | Description | 23 | | -------------------------------------------- | ---------------------------------------------------- | 24 | | `firewall-cmd --state` | Check the state of the firewall | 25 | | `firewall-cmd --list-all` | List all current firewall rules | 26 | | `firewall-cmd --add-port=/tcp` | Open a specific TCP port | 27 | | `firewall-cmd --remove-port=/tcp` | Close a specific TCP port | 28 | | `firewall-cmd --add-service=` | Allow a service through the firewall (e.g., HTTP, SSH) | 29 | | `firewall-cmd --reload` | Reload the firewall rules | 30 | | `firewall-cmd --add-masquerade` | Enable masquerading for NAT | 31 | | `firewall-cmd --zone=public --add-interface=` | Bind an interface to a specific firewall zone| 32 | | `firewall-cmd --permanent --add-port=/tcp` | Add a port permanently to the firewall rules | 33 | | `firewall-cmd --permanent --remove-port=/tcp` | Remove a port permanently from the firewall rules| 34 | | `firewall-cmd --permanent --add-service=` | Allow a service permanently through the firewall | 35 | 36 | 37 | ## ***Add & Remove IPs*** 38 | | Command | Description | 39 | | -------------------------------------------- | ---------------------------------------------------- | 40 | | `nmcli con mod +ipv4.addresses ` | Add an IPv4 address to the connection | 41 | | `nmcli con mod -ipv4.addresses ` | Remove an IPv4 address from the connection| 42 | | `nmcli con show ` | Show detailed information about the connection | 43 | | `ip addr add dev ` | Add a temporary IP address | 44 | | `ip addr del dev ` | Remove a temporary IP address | 45 | | `ip addr show ` | Show all IP addresses associated with an interface | 46 | 47 | 48 | ## ***DNF Package Management*** 49 | | Command | Description | 50 | | -------------------------------------------- | ---------------------------------------------------- | 51 | | `dnf update` | Update all packages on the system | 52 | | `dnf upgrade` | Upgrade packages to the latest version | 53 | | `dnf install ` | Install a new package | 54 | | `dnf remove ` | Remove a package from the system | 55 | | `dnf search ` | Search for a package in the repositories | 56 | | `dnf info ` | Show information about a package | 57 | | `dnf list installed` | List all installed packages | 58 | | `dnf autoremove` | Remove unused dependencies | 59 | | `dnf clean all` | Clear the DNF cache | 60 | | `dnf check-update` | Check for available updates without applying them | 61 | | `dnf history` | Show the DNF history of transactions | 62 | | `dnf repolist` | List all enabled repositories | 63 | 64 | 65 | ## ***System Management*** 66 | | Command | Description | 67 | | -------------------------------------------- | ---------------------------------------------------- | 68 | | `systemctl status ` | Show the status of a system service | 69 | | `systemctl start ` | Start a system service | 70 | | `systemctl stop ` | Stop a system service | 71 | | `systemctl restart ` | Restart a system service | 72 | | `systemctl enable ` | Enable a service to start on boot | 73 | | `systemctl disable ` | Disable a service from starting on boot | 74 | | `systemctl mask ` | Mask a service to prevent it from starting | 75 | | `systemctl unmask ` | Unmask a previously masked service | 76 | | `systemctl daemon-reload` | Reload systemd manager configuration | 77 | | `journalctl -xe` | View the systemd logs for troubleshooting | 78 | | `shutdown now` | Shutdown the system immediately | 79 | | `reboot` | Reboot the system | 80 | 81 | 82 | -------------------------------------------------------------------------------- /linux/systemd/cache_service.md: -------------------------------------------------------------------------------- 1 | ***Service*** 2 | ```sh 3 | 1) nano /etc/systemd/system/clear_mem_cache.service 4 | 5 | [Unit] 6 | Description=Run mem-cache script 7 | Documentation=https://man7.org/linux/man-pages/man5/proc.5.html 8 | Wants=clear_mem_cache.timer 9 | 10 | [Service] 11 | Type=oneshot 12 | ExecStart=/scripts/clear_mem_cache.sh 13 | ``` 14 | ***Timer*** 15 | ```sh 16 | 2) nano /etc/systemd/system/clear_mem_cache.timer 17 | 18 | [Unit] 19 | Description=Run clear_mem_cache.service periodically 20 | 21 | [Timer] 22 | OnCalendar=weekly 23 | Persistent=true 24 | AccuracySec=1min 25 | 26 | [Install] 27 | WantedBy=timers.target 28 | ``` 29 | ***Start*** 30 | ```sh 31 | 1) sudo systemctl daemon-reload 32 | 2) sudo systemctl enable clear_mem_cache.timer 33 | 3) sudo systemctl start clear_mem_cache.timer 34 | ``` 35 | ***Checks*** 36 | ```sh 37 | 1) systemctl list-timers --all | grep clear_mem_cache 38 | 2) sudo systemctl start clear_mem_cache.service 39 | 3) cat /var/log/syslog | grep clear_mem_cache **if logs are setup** 40 | ``` 41 | -------------------------------------------------------------------------------- /nmap/README.md: -------------------------------------------------------------------------------- 1 | ## **Nmap** 2 | 3 | 4 | ### **Useful Scanning Combinations** 5 | | Command | Description | 6 | |------------------------------------------------|------------------------------------------------------------| 7 | | `nmap -sS -O -T4 ` | Stealth SYN scan with OS detection | 8 | | `nmap -A -T4 ` | Aggressive scan with OS detection, version, script scanning, and traceroute | 9 | | `nmap -sP ` | Ping sweep to find live hosts in a subnet | 10 | 11 | 12 | ### **Service and Version Detection** 13 | | Command | Description | 14 | |------------------------------------------------|------------------------------------------------------------| 15 | | `nmap -sV ` | Detect service versions | 16 | | `nmap -sV --version-intensity `| Set version intensity (0 to 9, default is 7) | 17 | | `nmap -A ` | Detect OS, version, scripts, and traceroute | 18 | 19 | 20 | ### **Script Scanning (NSE)** 21 | | Command | Description | 22 | |------------------------------------------------|------------------------------------------------------------| 23 | | `nmap --script ` | Run a specific NSE script | 24 | | `nmap --script default ` | Run default NSE scripts | 25 | | `nmap --script vuln ` | Run vulnerability detection scripts | 26 | | `nmap --script http-enum ` | Enumerate web server directories and services | 27 | | `nmap --script smb-enum-shares ` | Enumerate SMB shares on a target | 28 | | `nmap --script dns-brute ` | Perform DNS brute force | 29 | | `nmap --script ftp-anon ` | Check for anonymous FTP access | 30 | | `nmap --script-args ` | Pass arguments to scripts | 31 | | `nmap --script-help ` | Get help for a specific NSE script | 32 | 33 | 34 | ### **Firewall and IDS/IPS Evasion** 35 | | Command | Description | 36 | |------------------------------------------------|------------------------------------------------------------| 37 | | `nmap -f ` | Fragment packets | 38 | | `nmap -D RND:10 ` | Use decoys for scanning to obscure the real source | 39 | | `nmap -S ` | Spoof the source IP | 40 | | `nmap -g ` | Use a specific source port for the scan | 41 | | `nmap --source-port ` | Use a specific source port (e.g., 80) | 42 | | `nmap --data-length ` | Append random data to the packets to evade detection | 43 | 44 | 45 | ### **Port Scanning** 46 | | Command | Description | 47 | |------------------------------------------------|------------------------------------------------------------| 48 | | `nmap -p 80 ` | Scan a specific port | 49 | | `nmap -p 1-100 ` | Scan a range of ports | 50 | | `nmap -p- ` | Scan all 65535 ports | 51 | | `nmap --top-ports ` | Scan the top ports (most common services) | 52 | | `nmap --exclude-ports ` | Exclude certain ports from scanning | 53 | 54 | 55 | 56 | ### **Output Options** 57 | | Command | Description | 58 | |------------------------------------------------|------------------------------------------------------------| 59 | | `nmap -oN ` | Normal output to a file | 60 | | `nmap -oX .xml` | Output results in XML format | 61 | | `nmap -oG ` | Output results in grepable format | 62 | | `nmap -oA ` | Output results in all formats (normal, XML, grepable) | 63 | | `nmap -v ` | Increase verbosity | 64 | | `nmap -vv ` | Double verbosity | 65 | | `nmap -d ` | Enable debugging output | 66 | 67 | 68 | 69 | ### **Operating System Detection** 70 | | Command | Description | 71 | |------------------------------------------------|------------------------------------------------------------| 72 | | `nmap -O ` | Detect the operating system of the target | 73 | | `nmap --osscan-limit ` | Limit OS detection to promising targets | 74 | | `nmap --osscan-guess ` | Make a guess if OS detection is inconclusive | 75 | 76 | 77 | 78 | ### **Timing and Performance** 79 | | Command | Description | 80 | |------------------------------------------------|------------------------------------------------------------| 81 | | `nmap -T0 ` | Paranoid scan (very slow, evades IDS) | 82 | | `nmap -T1 ` | Sneaky scan (slow) | 83 | | `nmap -T2 ` | Polite scan (reduced load on the network) | 84 | | `nmap -T3 ` | Normal scan (default timing) | 85 | | `nmap -T4 ` | Aggressive scan (faster, but more detectable) | 86 | | `nmap -T5 ` | Insane scan (fastest, highly detectable) | 87 | | `nmap --max-retries ` | Set the maximum number of retries | 88 | | `nmap --max-rate ` | Limit scan rate to packets per second | 89 | | `nmap --min-rate ` | Set a minimum packet rate | 90 | 91 | 92 | ### **Network and Host Discovery** 93 | | Command | Description | 94 | |------------------------------------------------|------------------------------------------------------------| 95 | | `nmap -sn ` | Ping scan, just discover live hosts | 96 | | `nmap -PE ` | ICMP echo request to discover hosts | 97 | | `nmap -PP ` | ICMP timestamp request to discover hosts | 98 | | `nmap -PS ` | TCP SYN ping on a specific port | 99 | | `nmap -PA ` | TCP ACK ping on a specific port | 100 | | `nmap -PU ` | UDP ping on a specific port | 101 | | `nmap -PR ` | ARP discovery on local network | 102 | 103 | 104 | ### **Basic Scanning** 105 | | Command | Description | 106 | |------------------------------------------------|------------------------------------------------------------| 107 | | `nmap ` | Basic scan on a single target | 108 | | `nmap ` | Scan multiple targets | 109 | | `nmap ` | Scan a range of IP addresses | 110 | | `nmap ` | Scan a whole subnet | 111 | | `nmap -iL ` | Scan targets listed in a file | 112 | | `nmap -p ` | Scan specific ports | 113 | | `nmap -p 80,443 ` | Scan multiple ports | 114 | | `nmap -p- ` | Scan all 65535 ports | 115 | | `nmap -F ` | Fast scan (fewer ports) | 116 | | `nmap -sL ` | List targets without scanning | 117 | 118 | 119 | ### **Topology and Visualization** 120 | | Command | Description | 121 | |------------------------------------------------|------------------------------------------------------------| 122 | | `nmap --iflist` | Show network interfaces and routes | 123 | | `nmap --packet-trace ` | Show all sent and received packets | 124 | 125 | 126 | ### **Traceroute** 127 | | Command | Description | 128 | |------------------------------------------------|------------------------------------------------------------| 129 | | `nmap --traceroute ` | Trace the route to the target | 130 | 131 | 132 | ### **Scanning Techniques** 133 | | Command | Description | 134 | |------------------------------------------------|------------------------------------------------------------| 135 | | `nmap -sS ` | Stealth scan (SYN scan) | 136 | | `nmap -sT ` | TCP connect scan | 137 | | `nmap -sU ` | UDP scan | 138 | | `nmap -sN ` | TCP Null scan | 139 | | `nmap -sF ` | TCP FIN scan | 140 | | `nmap -sX ` | Xmas scan | 141 | | `nmap -sA ` | TCP ACK scan | 142 | | `nmap -sW ` | TCP Window scan | 143 | | `nmap -sM ` | TCP Maimon scan | 144 | 145 | 146 | 147 | ### **Scan Random Hosts** 148 | | Command | Description | 149 | |------------------------------------------------|------------------------------------------------------------| 150 | | `nmap -iR ` | Scan random hosts | 151 | 152 | 153 | ### **IPv6 Scanning** 154 | | Command | Description | 155 | |------------------------------------------------|------------------------------------------------------------| 156 | | `nmap -6 ` | Scan using IPv6 | 157 | -------------------------------------------------------------------------------- /phoronix/README.md: -------------------------------------------------------------------------------- 1 | ## **Phoronix Test Suite** 2 | 3 | 4 | 5 | ### **Utilities** 6 | | Command | Description | 7 | |------------------------------------------------|------------------------------------------------------------| 8 | | `phoronix-test-suite gui` | Launch the GUI version of the Phoronix Test Suite | 9 | | `phoronix-test-suite phx-results-viewer` | Launch the graphical results viewer | 10 | | `phoronix-test-suite result-file-info ` | Display details about a result file | 11 | 12 | 13 | ### **OpenBenchmarking.org Integration** 14 | | Command | Description | 15 | |------------------------------------------------|------------------------------------------------------------| 16 | | `phoronix-test-suite openbenchmarking` | Upload results to OpenBenchmarking.org | 17 | | `phoronix-test-suite openbenchmarking-run` | Run tests on OpenBenchmarking.org | 18 | | `phoronix-test-suite benchmark-id ` | Run a benchmark test using an OpenBenchmarking.org ID | 19 | 20 | 21 | ### **Testing Parameters** 22 | | Command | Description | 23 | |------------------------------------------------|------------------------------------------------------------| 24 | | `phoronix-test-suite set-test-parameter ` | Set a parameter for a specific test | 25 | | `phoronix-test-suite show-test-parameters ` | Show the parameters for a specific test | 26 | 27 | 28 | ### **Automated Testing and Scripting** 29 | | Command | Description | 30 | |------------------------------------------------|------------------------------------------------------------| 31 | | `phoronix-test-suite batch-setup` | Setup the Phoronix Test Suite for automated testing | 32 | | `phoronix-test-suite batch-run ` | Run a test automatically without user intervention | 33 | | `phoronix-test-suite repeat ` | Run a test multiple times | 34 | 35 | 36 | ### **Benchmark Results** 37 | | Command | Description | 38 | |------------------------------------------------|------------------------------------------------------------| 39 | | `phoronix-test-suite result-file-to-pdf ` | Convert a test result to a PDF format | 40 | | `phoronix-test-suite list-results` | List all saved results | 41 | | `phoronix-test-suite result-file-info ` | View detailed information about a result file | 42 | | `phoronix-test-suite remove-result `| Remove a specific result file | 43 | | `phoronix-test-suite upload-result ` | Upload the result to OpenBenchmarking.org | 44 | | `phoronix-test-suite merge-results ` | Merge two result files | 45 | | `phoronix-test-suite view-result ` | View a specific result | 46 | 47 | 48 | ### **Test Execution** 49 | | Command | Description | 50 | |------------------------------------------------|------------------------------------------------------------| 51 | | `phoronix-test-suite run` | Run an interactive test | 52 | | `phoronix-test-suite batch-run ` | Run a non-interactive test with default options | 53 | | `phoronix-test-suite batch-run ` | Run a non-interactive suite | 54 | | `phoronix-test-suite repeat `| Repeat a test a specific number of times | 55 | 56 | 57 | ### **Benchmark and Comparison** 58 | | Command | Description | 59 | |------------------------------------------------|------------------------------------------------------------| 60 | | `phoronix-test-suite benchmark` | Benchmark a test or suite interactively | 61 | | `phoronix-test-suite compare ` | Compare two result files | 62 | | `phoronix-test-suite compare-results` | Compare the results of multiple tests | 63 | | `phoronix-test-suite show-comparison ` | Show a comparison in detail | 64 | 65 | 66 | ### **Suites and Profiles** 67 | | Command | Description | 68 | |------------------------------------------------|------------------------------------------------------------| 69 | | `phoronix-test-suite list-suites` | List all available test suites | 70 | | `phoronix-test-suite run ` | Run a test suite | 71 | | `phoronix-test-suite run --suite-validation` | Validate the suite configuration | 72 | | `phoronix-test-suite list-installed-suites` | List all installed suites | 73 | 74 | 75 | ### **Remote Testing** 76 | | Command | Description | 77 | |------------------------------------------------|------------------------------------------------------------| 78 | | `phoronix-test-suite remote` | Setup for remote Phoronix Test Suite usage | 79 | | `phoronix-test-suite remote-run` | Run a test remotely | 80 | | `phoronix-test-suite remote-list` | List available remote systems | 81 | | `phoronix-test-suite remote-connect ` | Connect to a remote system | 82 | 83 | 84 | ### **Basic Commands** 85 | | Command | Description | 86 | |------------------------------------------------|------------------------------------------------------------| 87 | | `phoronix-test-suite list-available-tests` | List all available tests | 88 | | `phoronix-test-suite list-available-suites` | List all available test suites | 89 | | `phoronix-test-suite list-installed-tests` | List all installed tests | 90 | | `phoronix-test-suite install ` | Install a specific test | 91 | | `phoronix-test-suite remove ` | Remove a specific test | 92 | | `phoronix-test-suite run ` | Run a specific test | 93 | | `phoronix-test-suite run ` | Run a test suite | 94 | | `phoronix-test-suite run