diff --git a/Z_Linux_Installations_101/Cron_Examples/git_sync.sh b/Z_Linux_Installations_101/Cron_Examples/git_sync.sh new file mode 100644 index 0000000..6ad5c74 --- /dev/null +++ b/Z_Linux_Installations_101/Cron_Examples/git_sync.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Define the base directory where the repositories are/will be located +BASE_DIR="/home/jalcocert/Desktop/GIT_SYNC/GITEA" + +# Ensure the base directory exists +mkdir -p "$BASE_DIR" + +# Define repository URLs - GITEA +REPO1_URL="http://192.168.3.200:3033/fossengineer/FOSSENGINEER.git" +REPO2_URL="http://192.168.3.200:3033/fossengineer/Py_Stocks.git" + +# Define local directories (relative to BASE_DIR) where you want to pull the repositories +REPO1_DIR="${BASE_DIR}/FOSSENGINEER" +REPO2_DIR="${BASE_DIR}/Py_Stocks" + +# Function to pull or clone a repository +pull_or_clone() { + local repo_url=$1 + local repo_dir=$2 + + # Check if the directory exists and is a git repository + if [ -d "$repo_dir/.git" ]; then + echo "Updating $repo_dir from $repo_url" + git -C "$repo_dir" pull + else + echo "Cloning $repo_url into $repo_dir" + git clone "$repo_url" "$repo_dir" + fi +} + +# Pull or clone each repository +pull_or_clone "$REPO1_URL" "$REPO1_DIR" +pull_or_clone "$REPO2_URL" "$REPO2_DIR" + +echo "Operation completed." diff --git a/Z_Linux_Installations_101/Cron_Examples/git_sync_uptimekuma.py b/Z_Linux_Installations_101/Cron_Examples/git_sync_uptimekuma.py new file mode 100644 index 0000000..403b821 --- /dev/null +++ b/Z_Linux_Installations_101/Cron_Examples/git_sync_uptimekuma.py @@ -0,0 +1,88 @@ +import requests +import datetime +from pathlib import Path +import subprocess + +# Repositories to update: (URL, local directory name) +REPOSITORIES = [ + ("http://192.168.3.200:3033/fossengineer/FOSSENGINEER.git", "FOSSENGINEER"), + ("http://192.168.3.200:3033/fossengineer/Py_Stocks.git", "Py_Stocks"), +] + +BASE_DIR = "/home/jalcocert/Desktop/GIT_SYNC/GITEA3" +UPTIME_KUMA_PUSH_URL = "http://192.168.3.200:3001/api/push/Xe6iHxz97X?status=up&msg=OK&ping=" #"http://uptimekuma.mydomain.com/api/push/xyz" + +def git_clone_or_pull(repo_url, local_dir): + """Clones the repo if it doesn't exist, or pulls updates if it does.""" + subprocess.run(["mkdir", "-p", str(local_dir)], check=True) + if (local_dir / ".git").exists(): + print(f"Updating existing repository in {local_dir}") + subprocess.run(["git", "-C", str(local_dir), "pull"], check=True) + else: + print(f"Cloning new repository from {repo_url} into {local_dir}") + subprocess.run(["git", "clone", repo_url, str(local_dir)], check=True) + +def update_status(): + """Sends a GET request to the Uptime Kuma monitoring endpoint.""" + try: + response = requests.get(UPTIME_KUMA_PUSH_URL) + response.raise_for_status() + print("Status update sent successfully.") + except requests.RequestException as e: + print(f"Failed to send status update to Uptime Kuma: {e}") + +def main(): + for repo_url, repo_dir in REPOSITORIES: + git_clone_or_pull(repo_url, Path(BASE_DIR) / repo_dir) + + # Send a GET request to Uptime Kuma's push URL to signal success + update_status() + +if __name__ == "__main__": + main() + + + +# import subprocess +# import requests +# import datetime + +# # Repositories to update: (URL, local directory name) +# REPOSITORIES = [ +# ("http://192.168.3.200:3033/fossengineer/FOSSENGINEER.git", "FOSSENGINEER"), +# ("http://192.168.3.200:3033/fossengineer/Py_Stocks.git", "Py_Stocks"), +# ] + +# BASE_DIR = "/home/jalcocert/Desktop/GIT_SYNC/GITEA2" +# STATUS_ENDPOINT = "http://yourserver:5000/update_status" + +# def git_clone_or_pull(repo_url, local_dir): +# """Clones the repo if it doesn't exist, or pulls updates if it does.""" +# subprocess.run(["mkdir", "-p", local_dir], check=True) +# if (local_dir / ".git").exists(): +# print(f"Updating existing repository in {local_dir}") +# subprocess.run(["git", "-C", local_dir, "pull"], check=True) +# else: +# print(f"Cloning new repository from {repo_url} into {local_dir}") +# subprocess.run(["git", "clone", repo_url, local_dir], check=True) + +# def update_status(message): +# """Sends a status update to the monitoring endpoint.""" +# try: +# response = requests.post(STATUS_ENDPOINT, data=message) +# response.raise_for_status() +# print("Status update sent successfully.") +# except requests.RequestException as e: +# print(f"Failed to send status update: {e}") + +# def main(): +# from pathlib import Path +# for repo_url, repo_dir in REPOSITORIES: +# git_clone_or_pull(repo_url, Path(BASE_DIR) / repo_dir) + +# # Update the monitoring endpoint with completion status +# now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') +# update_status(f"Git sync script completed successfully at {now}") + +# if __name__ == "__main__": +# main() diff --git a/Z_Linux_Installations_101/Cron_Examples/git_sync_v2.sh b/Z_Linux_Installations_101/Cron_Examples/git_sync_v2.sh new file mode 100644 index 0000000..c88e78b --- /dev/null +++ b/Z_Linux_Installations_101/Cron_Examples/git_sync_v2.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Define the base directory where the repositories are/will be located +BASE_DIR="/home/jalcocert/Desktop/GIT_SYNC/GITEA" + +# Ensure the base directory exists +mkdir -p "$BASE_DIR" + +# Function to pull or clone a repository +pull_or_clone() { + local repo_url=$1 + local repo_dir=$2 + + # Ensure the directory exists for the repo + mkdir -p "$repo_dir" + + # Check if the directory exists and is a git repository + if [ -d "$repo_dir/.git" ]; then + echo "Updating $repo_dir from $repo_url" + git -C "$repo_dir" pull + else + echo "Cloning $repo_url into $repo_dir" + git clone "$repo_url" "$repo_dir" + fi +} + +# Loop through the arguments two by two (URL and DIR) +while (( "$#" >= 2 )); do + repo_url=$1 + repo_dir="${BASE_DIR}/$2" + pull_or_clone "$repo_url" "$repo_dir" + # Shift by two to get to the next pair of arguments + shift 2 +done + +echo "Operation completed." \ No newline at end of file diff --git a/Z_Linux_Installations_101/Cron_Examples/readme.md b/Z_Linux_Installations_101/Cron_Examples/readme.md new file mode 100644 index 0000000..3dca968 --- /dev/null +++ b/Z_Linux_Installations_101/Cron_Examples/readme.md @@ -0,0 +1,12 @@ +* + +* v1 - hardcoded repositories +* v2 - listed repositories + +```sh +chmod +x /home/jalcocert/Desktop/GIT_SYNC/git_sync_v2.sh +/home/jalcocert/Desktop/GIT_SYNC/git_sync_v2.sh http://192.168.3.200:3033/fossengineer/FOSSENGINEER FOSSENGINEER http://192.168.3.200:3033/fossengineer/Py_Stocks Py_Stocks +``` + + +@reboot /home/jalcocert/Desktop/GIT_SYNC/git_sync_v2.sh http://192.168.3.200:3033/fossengineer/BachataMeetv2-Astro BachataMeetv2-Astro http://192.168.3.200:3033/fossengineer/CyclingThere2 CyclingThere2 >> /home/jalcocert/Desktop/GIT_SYNC/git_sync_v2.log 2>&1 diff --git a/content/_index.md b/content/_index.md index d33fe6d..f5823f9 100755 --- a/content/_index.md +++ b/content/_index.md @@ -69,7 +69,7 @@ Linux is an **open-source operating system** that is used in a variety of device subtitle="LLMs with Linux - Linux nature is Open Source - Same like these LLMs that you can use with your Laptop (no GPU required)." class="aspect-auto md:aspect-[1.1/1] max-lg:min-h-[340px]" style="background: radial-gradient(ellipse at 50% 80%,rgba(221,210,59,0.15),hsla(0,0%,100%,0));" - link="https://jalcocert.github.io/Linux/docs/linux__cloud.md/llms/" + link="https://jalcocert.github.io/Linux/docs/linux__cloud/llms/" >}} {{< hextra/feature-card diff --git a/content/docs/Arch/_index.md b/content/docs/Arch/_index.md index 8e65896..4e8aa9c 100644 --- a/content/docs/Arch/_index.md +++ b/content/docs/Arch/_index.md @@ -41,18 +41,21 @@ While Arch Linux demands a deeper understanding of Linux and requires users to c * [Pacman](https://jalcocert.github.io/Linux/docs/arch/garuda/#pacman---garuda-package-manager) -> Here you have [this Gist](https://gist.github.com/JAlcocerT/9865a045b2b86adb41fad71e4beddc06) with some usefull installs on Arch.♻️*There are similar ones for [Ubuntu](https://gist.github.com/JAlcocerT/197667ec5ec0da53e78eb58c4253a73f), even [Windows](https://gist.github.com/JAlcocerT/76f22ddf886277ef2653f82898c634d8)* ♻️. +> Here you have [**this Gist**](https://gist.github.com/JAlcocerT/9865a045b2b86adb41fad71e4beddc06) with some usefull installs on Arch.♻️*There are similar ones for [Ubuntu](https://gist.github.com/JAlcocerT/197667ec5ec0da53e78eb58c4253a73f), even [Windows](https://gist.github.com/JAlcocerT/76f22ddf886277ef2653f82898c634d8)* ♻️. ### SelfHosting with Arch If you are used to deploy your favourite Apps with [Docker](https://jalcocert.github.io/Linux/docs/debian/docker/) (or [Podman](https://jalcocert.github.io/Linux/docs/debian/podman/)), congratulations, you can use them seamlessly with Arch as you do with Debian, mac or Windows. -For example: +{{% details title="Some examples" closed="true" %}} * [Analytic Tools](https://jalcocert.github.io/Linux/docs/linux__cloud/analytics/) * Local Gen AI - [LLMs](https://jalcocert.github.io/Linux/docs/linux__cloud/llms/) * [SelfHosting](https://jalcocert.github.io/Linux/docs/linux__cloud/selfhosting/) +{{% /details %}} + + ### Benchmark with Arch ```sh diff --git a/content/docs/Arch/garuda.md b/content/docs/Arch/garuda.md index 62083f9..28a111d 100644 --- a/content/docs/Arch/garuda.md +++ b/content/docs/Arch/garuda.md @@ -28,6 +28,8 @@ Additionally, Garuda Linux also provides a graphical package manager called "Pam * The Arch Linux Package Search: +{{% details title="Its as simple as this" closed="true" %}} + Update repos with: ```sh @@ -41,6 +43,9 @@ And install packages with: sudo pacman -S firefox ``` +{{% /details %}} + + > More examples [here](https://gist.github.com/JAlcocerT/9865a045b2b86adb41fad71e4beddc06). ### Useful Repositories @@ -53,10 +58,17 @@ But the beauty is that anyone can contribute and publish their Apps at: The AUR is a **community-driven repository** that contains a wide range of software packages not available in the official Arch Linux repositories. And we, as Garuda Linux users can also benefit from the AUR. +{{% details title="More about AUR" closed="true" %}} + When you visit these websites, you can use the search functionality to look for packages by name. The AUR website is particularly useful for finding user-contributed packages that may not be in the official repositories. Once you find a package you want to install, you can note its name and use it with the pacman or yay command in the terminal, or search for it in the Pamac graphical package manager. +{{% /details %}} + + + + Remember that when installing packages from the AUR, you should follow the AUR guidelines and consider using an **AUR helper like yay** for better package management and dependency handling. Lets install yay and use it to give us an [UI to manage packages](https://aur.archlinux.org/packages/pamac-all) @@ -73,11 +85,45 @@ pamac-manager ### Gaming on Arch + +{{% details title="How to Install Games in Garuda Linux" closed="true" %}} + + +* With Steam Platform (Thanks to [Proton](https://jalcocert.github.io/Linux/docs/debian/gaming/#steam-play--proton)): + ```sh +sudo nano /etc/pacman.conf +#[multilib] +#Include=/etc/pacman.d/mirrorlist sudo pacman -Sy + sudo pacman -S steam +yay -S protonup-qt +``` + +> Dont Forget to enable Steam Play as per [this guide](https://linuxiac.com/how-to-play-games-on-arch-linux-using-steam/) + +* You also can with Lutris: + +```sh +sudo pacman -S lutris + +#example #https://lutris.net/games/ea-app/ ``` +{{% /details %}} + + +{{% details title="How to use SteamOS with Docker in Garuda Linux" closed="true" %}} + +Thanks to the project: + +{{% /details %}} + --- ## FAQ @@ -196,4 +242,11 @@ Like Debian-based distributions: Fixed releases prioritize stability and ease of maintenance but might not have the latest features as soon as they're released. -{{% /details %}} \ No newline at end of file +{{% /details %}} + + +### How to Customize Garuda + +Garuda is an impressive looking distro out of the box + +* You can get their Art-Work from [this gitlab repo](https://gitlab.com/garuda-linux/themes-and-settings/artwork/garuda-wallpapers/-/blob/master/src/garuda-wallpapers/Dr460nized%20Honeycomb.png?ref_type=heads) \ No newline at end of file diff --git a/content/docs/Debian/_index.md b/content/docs/Debian/_index.md index 78b109b..9d043b8 100644 --- a/content/docs/Debian/_index.md +++ b/content/docs/Debian/_index.md @@ -9,11 +9,22 @@ sidebar: Debian is a widely respected, stable Linux distribution known for its reliability, **extensive software repository**, and strong commitment to free and open-source software principles. -Debian provides users with a robust and well-maintained ecosystem of software packages, covering a wide range of applications and utilities. It offers multiple release branches, including the stable, testing, and unstable branches, allowing users to choose the level of stability and software freshness that suits their needs. - Debian's **package management system, [APT](https://jalcocert.github.io/Linux/docs/debian/linux_installing_apps/#apt)** (Advanced Package Tool), simplifies software installation, upgrades, and maintenance. The distribution **emphasizes system stability** and security, making it a popular choice for servers and mission-critical environments. -While Debian doesn't have the same "do-it-yourself" philosophy as [Arch Linux](https://jalcocert.github.io/Linux/docs/arch/), it provides a solid foundation for various use cases, including desktop computing, server hosting, and embedded systems. It's well-regarded for its community-driven development process and commitment to free software, making it a trusted choice for users who prioritize open-source principles and long-term support. +> Here you have a [GIST with examples](https://gist.github.com/JAlcocerT/197667ec5ec0da53e78eb58c4253a73f) ♻️ + +{{% details title="Get to Know! 🚀" closed="true" %}} + +* Debian provides users with a robust and well-maintained ecosystem of software packages, covering a wide range of applications and utilities. It offers multiple release branches, including the stable, testing, and unstable branches, allowing users to choose the level of stability and software freshness that suits their needs. + +* While Debian doesn't have the same "do-it-yourself" philosophy as [Arch Linux](https://jalcocert.github.io/Linux/docs/arch/), it provides a solid foundation for various use cases, including desktop computing, server hosting, and embedded systems. + + +{{% /details %}} + + + +> It's well-regarded for its community-driven development process and commitment to free software, making it a trusted choice for users who **prioritize open-source principles and long-term support**. + + ### And also code from an Ipad? Yes, you can with Tailscale + VSCode Server: diff --git a/content/docs/Debian/useful_tools.md b/content/docs/Debian/useful_tools.md index c754dd2..599ad62 100644 --- a/content/docs/Debian/useful_tools.md +++ b/content/docs/Debian/useful_tools.md @@ -68,6 +68,8 @@ sudo apt-get install htop #htop ``` +--- + ### Network Monitor #### Net Tools @@ -128,37 +130,47 @@ resolvectl status #see which one you want to change, ex: enp2s0 ### Crontab Tasks -Open crontab: +Make sure to install and Open crontab: ```sh +# apt install cron +# systemctl start cron +# systemctl status cron + crontab -e ``` + Update it every midnight and every restart: ```sh -0 0 * * * sudo apt update && sudo apt upgrade -@reboot sudo apt update && sudo apt upgrade +0 0 * * * #sudo apt update && sudo apt upgrade +@reboot #sudo apt update && sudo apt upgrade ``` -If your script isn’t executing, check the system log for cron events: grep cron /var/log/syslog +> You can create different [schedule expressions](https://crontab.guru/#0_22_*_*_1-5) -If you’d wish to view your scheduled tasks without editing you can use the command: +If your script isn’t executing, check the system log for cron events: grep cron /var/log/syslog +If you’d wish to **view your scheduled tasks** without editing you can use: ```sh -crontab -l +crontab -l +#crontab -u particularusername -l ``` -### Example - Install GIT and sync your repositories +> [What happens](https://www.baeldung.com/linux/crontab-scheduled-jobs-computer-shutdown) with CronTab when PC Shutdown? + +{{% details title="Example - Install GIT and sync a Github Repository" closed="true" %}} + ```sh sudo apt install git && - git clone https://github.com/jalcocert/RPi.git && - cd RPi && - git pull #to make sure its up to date (a cron task could be scheduled) - ``` +git clone https://github.com/jalcocert/RPi.git && +cd RPi && +git pull #to make sure its up to date (a cron task could be scheduled) +``` If you want to add a cron task for this, simply edit, as explained: @@ -168,7 +180,63 @@ If you want to add a cron task for this, simply edit, as explained: @reboot cd RPi && git pull ``` -> [What happens](https://www.baeldung.com/linux/crontab-scheduled-jobs-computer-shutdown) with CronTab when PC Shutdown? +{{% /details %}} + +{{% details title="Example - Sync all your [Gitea Repositories](https://fossengineer.com/selfhosting-Gitea-docker/) when PC Turn on" closed="true" %}} + +Now your imagination is the limit. + +Let's [create a script](https://github.com/JAlcocerT/Linux/blob/main/Z_Linux_Installations_101/Cron_Examples/) that when your PC is booting, it will sync a given list of repositories from your Gitea instance. + +```sh +nano git_sync.sh +``` + +If you want to add a cron task for this, simply edit, as explained: + +Make it executable: + +```sh +chmod +x /home/jalcocert/Desktop/GIT_SYNC/git_sync.sh +``` + +```sh +#@reboot /home/jalcocert/Desktop/GIT_SYNC/git_sync.sh >> /home/jalcocert/Desktop/GIT_SYNC/git_sync.log 2>&1 +@reboot /home/jalcocert/Desktop/GIT_SYNC/git_sync_v2.sh http://192.168.3.200:3033/fossengineer/FOSSENGINEER FOSSENGINEER http://192.168.3.200:3033/fossengineer/Py_Stocks Py_Stocks >> /home/jalcocert/Desktop/GIT_SYNC/git_sync_v2.log 2>&1 + +#crontab -l #verify its added +``` + +{{% /details %}} + +{{% details title="How to Manage Cron Tasks with UI" closed="true" %}} + +With Zeit - Let's add the PPA and install it in Ubuntu: + +```sh +sudo add-apt-repository ppa:blaze/main +sudo apt update +sudo apt install zeit +#zeit #UI is ready! +``` + +You can also manage Cron tasks with UI's thanks to projects like: [cronicle](https://cronicle.net/), [nodered](https://jalcocert.github.io/RPi/posts/rpi-mqtt/#node-red), n8n... + +{{% /details %}} + +{{% details title="CronTasks Status with [UptimeKuma](https://fossengineer.com/selfhosting-uptime-Kuma-docker/)" closed="true" %}} + +With the Passive Monitor - Push: + +Together with [this python script](https://github.com/JAlcocerT/Linux/blob/main/Z_Linux_Installations_101/Cron_Examples/git_sync_uptimekuma.py) and the crontab: + +```sh +@reboot /home/jalcocert/Desktop/GIT_SYNC/git_sync_uptimekuma.py +``` + +{{% /details %}} + + ### Create users @@ -270,6 +338,9 @@ Option 2: Another option would be to set a cron task with: {{% /details %}} +--- + +## Power Management ### How to lower CPU consumption? @@ -346,48 +417,93 @@ To lower CPU power consumption on an Ubuntu system, you can install and configur * https://www.reddit.com/r/CommercialAV/comments/xcfgyr/is_wakeonlan_still_your_goto_or_are_there_better/ * https://www.reddit.com/r/sysadmin/comments/s3uv8y/wake_on_lan_wol_for_dummies/ -### How to Test the network card? +--- + +## Networking + +### Network Monitor + +#### Net Tools ```sh -iperf3 -c 192.168.3.200 +sudo apt install net-tools -y ``` +Get your public ip: -{{% details title=" How to Create Custom Aliases" closed="true" %}} +```sh +curl ifconfig.me +``` +Get your local ip: -Lets edit this file: +```sh +ip address +#ip a +``` + +#### Testing DNS +* What it is my DNS on Linux? ```sh -nano ~/.bash_aliases +resolvectl status ``` -Add this line to know your public ip address by typing myip on the terminal: +* What it is the DNS of a particular Network Interface: +```sh +ifconfig +resolvectl dns wlp0s20f3 + +#change it with +#resolvectl dns wlp0s20f3 9.9.9.9 149.112.112.112 +``` + +* And now, lets test a DNS: ```sh -alias myip='curl ipinfo.io/ip' #public ip address +sudo apt install dnsutils + +#example +#nslookup google.com +#ping google.com ``` -Use this command to be able to use the new alias already in the current session +Worth to have a look: https://weberblog.net/benchmarking-dns-namebench-dnseval/ ```sh -source ~/.bashrc +cat /etc/resolv.conf ``` - -{{% /details %}} -* {{% details title=" How to Install & use TMUX" closed="true" %}} +### How to Test the network card? + +```sh +iperf3 -c 192.168.3.200 +``` + + +{{% details title="How to Install & use TMUX" closed="true" %}} Install TMUX with: @@ -397,10 +513,11 @@ apt install tmux ``` https://tmuxcheatsheet.com/ + {{% /details %}} -* Cleaning the System with UI: clean cache, monitor processes, snap packages installed, apt repositories... +{{% details title="Cleaning the System with UI: clean cache, monitor processes, snap packages installed, apt repositories.." closed="true" %}} ```sh sudo add-apt-repository ppa:oguzhaninan/stacer @@ -408,18 +525,77 @@ sudo apt-get update sudo apt-get install stacer #stacer ``` +https://tmuxcheatsheet.com/ + +{{% /details %}} + + --- ## FAQ -### Must know CLI +### Must know CLI's + +{{% details title="What's taking that much disk space?" closed="true" %}} + +```sh +du -h --max-depth=1 ~/ | sort -rh + +#sudo apt-get install ncdu +#ncdu / +``` + +{{% /details %}} + + +* For Power Management: + +{{% details title="How to turn off" closed="true" %}} ```sh systemctl suspend ``` -### Mac in Linux? +{{% /details %}} + + +* For Networking: + +{{% details title="How to know my local IP?" closed="true" %}} + +```sh +hostname -I +``` + +{{% /details %}} + + + +{{% details title="What if I need to add my IPv6 address too?" closed="true" %}} + +You can check your raspberry IPV6 with: + +```sh +ifconfig +``` +{{% /details %}} + + + +{{% details title="How to get UID and GUI" closed="true" %}} + +```sh +id pi #id +``` + +{{% /details %}} + + +### How to use mac in Linux + +{{% details title="Install Sosumi" closed="true" %}} + ```sh #https://snapcraft.io/install/sosumi/ubuntu @@ -433,14 +609,9 @@ sudo snap install sosumi > Interested in [VMs? Check this out](https://jalcocert.github.io/Linux/docs/debian/virtualization/#how-to-virtualize). -### What's taking that much disk space? -```sh -du -h --max-depth=1 ~/ | sort -rh +{{% /details %}} -#sudo apt-get install ncdu -#ncdu / -``` ### How to Clone a SSD? @@ -465,10 +636,19 @@ Be carefull with the options you choose (source device, destination...) * MemTest * prime95 +{{% details title="SSD Benchmark With [KDiskMark](https://github.com/JonMagon/KDiskMark)" closed="true" %}} + +Install it with [FlatPak](https://flathub.org/apps/io.github.jonmagon.kdiskmark): + +![KDiskMark Benchmark Example](/images/benchmarks/ssd-nvme-pcie.png) + + +{{% /details %}} + ### Screen Share with Linux -* {{% details title="With [RustDesk](https://github.com/rustdesk/rustdesk/releases)" closed="true" %}} +{{% details title="With [RustDesk](https://github.com/rustdesk/rustdesk/releases)" closed="true" %}} Install RustDesk with [Flatpak](https://jalcocert.github.io/Linux/docs/debian/linux_installing_apps/#flatpak): @@ -483,5 +663,37 @@ flatpak install rustdesk-1.2.3-x86_64.flatpak flatpak run com.rustdesk.RustDesk ``` {{% /details %}} + * Remmina, Vinagre, TigerVNC -* Guacamole with Docker \ No newline at end of file +* Guacamole with Docker + + + +{{% details title=" How to Create Custom Aliases" closed="true" %}} + + +Lets edit this file: + + +```sh +nano ~/.bash_aliases +``` + +Add this line to know your public ip address by typing myip on the terminal: + + +```sh +alias myip='curl ipinfo.io/ip' #public ip address +``` + +Use this command to be able to use the new alias already in the current session + + +```sh +source ~/.bashrc +``` + + + +{{% /details %}} \ No newline at end of file diff --git a/content/docs/Linux_&_Cloud/_index.md b/content/docs/Linux_&_Cloud/_index.md index b4dcd46..37d15e8 100644 --- a/content/docs/Linux_&_Cloud/_index.md +++ b/content/docs/Linux_&_Cloud/_index.md @@ -46,7 +46,7 @@ With the use of linux as a stable and secure operative system, the voluntary col As any decision, this has **trade-offs** to be considered: - {{% details title=" Check the Trade-Offs?" closed="true" %}} + {{% details title=" Check the Trade-Offs ✋ " closed="true" %}} * Scalability: Cloud deployment enables applications to scale quickly and easily to meet changing user demands. @@ -65,7 +65,7 @@ As any decision, this has **trade-offs** to be considered: **at a cost...** -{{% details title=" Check Which Costs" closed="true" %}} +{{% details title=" Check Which Costs 👈" closed="true" %}} * Security: Cloud deployment can pose potential security risks, especially if sensitive data is stored on the cloud. @@ -86,6 +86,6 @@ As any decision, this has **trade-offs** to be considered: ### Clouds ( & GPU Clouds) -* RunPod, Linode, Paper Space, Lambda Cloud +* RunPod, Linode, DigitalOcean, Paper Space, Lambda Cloud * vast.ai, -* GOogle Colab TPU... \ No newline at end of file +* Google Colab TPU... \ No newline at end of file diff --git a/content/docs/Linux_&_Cloud/selfhosting.md b/content/docs/Linux_&_Cloud/selfhosting.md index 4fe8152..462f9a5 100644 --- a/content/docs/Linux_&_Cloud/selfhosting.md +++ b/content/docs/Linux_&_Cloud/selfhosting.md @@ -170,11 +170,43 @@ Quick seedbox: Torrents + Mullvad -> Syncthing/Filebrowser Metube + JDownloader + Navidrome -## How to Back Up my Server? +### How to Back Up my Server? Duplicati to other location (HD / Mega, One drive, s3...) +## Windows inside Docker +Thanks to the [Dockur Project](https://github.com/dockur/windows) and by using the [Image](https://hub.docker.com/r/dockurr/windows#!) + +{{% details title=" With this Docker-Compose 👈" closed="true" %}} + +```yml +version: '3.3' + +services: + windows: + image: dockurr/windows + container_name: windows + devices: + - /dev/kvm + cap_add: + - NET_ADMIN + ports: + - "8006:8006" #UI + - "3389:3389/tcp" + - "3389:3389/udp" + stop_grace_period: 2m + restart: on-failure + volumes: + - ./data:/storage + environment: + RAM_SIZE: 8GB + CPU_CORES: 3 + DISK_SIZE: 75GB + VERSION: "win10" +``` + +{{% /details %}} --- diff --git a/content/docs/Privacy/_index.md b/content/docs/Privacy/_index.md index 7b89d82..b33f447 100644 --- a/content/docs/Privacy/_index.md +++ b/content/docs/Privacy/_index.md @@ -18,10 +18,12 @@ You already [have a secure OS](https://jalcocert.github.io/Linux/docs/debian/sec You can try with [PiHole](https://fossengineer.com/selfhosting-PiHole-docker/) -* +* With [Unbound](https://jalcocert.github.io/RPi/posts/selfh-internet-better/#unbound-dns) * * Or try [Bind9](https://hub.docker.com/r/ubuntu/bind9#!) +* [PortMaster](https://github.com/Safing/portmaster) also helps to change and visualize the network queries. + Whats my current DNS? ```sh @@ -30,8 +32,7 @@ sudo systemctl status resolvconf.service ``` {{< callout type="info" >}} -Check your DNS with: WireShark -And the DNS performance with: GRC's DNS Benchmark, Knot DNS Resolver , DNSPerf or dnsmasq +Check your DNS with: WireShark and the DNS performance with: GRC's DNS Benchmark, Knot DNS Resolver, DNSPerf or dnsmasq {{< /callout >}} @@ -41,7 +42,7 @@ And the DNS performance with: GRC's DNS Benchmark, Knot DNS Resolver , DNSPerf o ### Monitoring OutGoing Connections -* {{% details title="[OpenSnitch](https://github.com/evilsocket/opensnitch)" closed="true" %}} +{{% details title="With [OpenSnitch](https://github.com/evilsocket/opensnitch) 👇" closed="true" %}} ```sh wget https://github.com/evilsocket/opensnitch/releases/download/v1.6.5.1/python3-opensnitch-ui_1.6.5.1-1_all.deb #https://github.com/evilsocket/opensnitch/releases @@ -51,9 +52,9 @@ sudo apt install ./opensnitch*.deb ./python3-opensnitch-ui*.deb {{% /details %}} -* Douane +* [Douane](https://jalcocert.github.io/Linux/docs/privacy/#faq) * gufw (GUI for Uncomplicated Firewall) - +* [PortMaster](https://jalcocert.github.io/Linux/docs/privacy/#faq) ## Changing Bad Habits @@ -61,7 +62,7 @@ Use different tools to search: * [Whoogle!](https://fossengineer.com/selfhosting-whoogle-docker/) -* +* [SearXNG](https://jalcocert.github.io/RPi/posts/selfh-internet-better/#searxng) * Youtube Alternatives: * NewPipe / Youtube-DL https://jalcocert.github.io/RPi/posts/youtube-video-download/ * https://github.com/tubearchivist/tubearchivist @@ -95,7 +96,7 @@ You can [SelfHost your own Matrix Server](https://fossengineer.com/selfhosting-m #### Signal -{{% details title="How to Install Signal" closed="true" %}} +{{% details title="How to Install Signal 👇" closed="true" %}} You need to add the repository to your packages list, then install it: @@ -115,7 +116,7 @@ sudo apt install signal-desktop Built on top of Oxen. -{{% details title="How to Install [Session](https://getsession.org/)" closed="true" %}} +{{% details title="How to Install [Session](https://getsession.org/) 👇" closed="true" %}} Check the [latest release](https://github.com/oxen-io/session-desktop/tags) @@ -138,6 +139,60 @@ sudo apt install -f ## FAQ +{{% details title="How to Install Douane 👇" closed="true" %}} + +[Douane](https://douaneapp.com/) is a personal firewall that us to control which applications can connect to the internet. + +You can see [Douane Source Code](https://gitlab.com/douaneapp/Douane) and install as per the [instructions](https://gitlab.com/douaneapp/douane-installer) + +{{% /details %}} + +{{% details title="How to Install Portmaster 👇" closed="true" %}} + +[PortMaster](https://safing.io/) is a great [F/OSS Project](https://github.com/Safing/portmaster) that allow us to set Global & per‑App Settings. + +[Install PortMaster](https://wiki.safing.io/en/Portmaster/Install/Linux) with: + +```sh + +sudo apt update +wget https://updates.safing.io/latest/linux_amd64/packages/portmaster-installer.deb + +sudo dpkg -i portmaster-installer.deb +portmaster --version + +#sudo apt install -f + + +#sudo systemctl status portmaster +# sudo systemctl daemon-reload +# sudo systemctl enable --now portmaster + +# This will stop the portmaster until you reboot. +#sudo systemctl stop portmaster + +# This will disable automatically starting the Portmaster on boot. +#sudo systemctl disable portmaster +``` + +Or if you want, build and install: + +```sh +wget https://github.com/safing/portmaster/archive/refs/tags/v1.6.5.tar.gz +tar -zxvf v1.6.5.tar.gz #extract the contents + + +cd portmaster-1.6.5 + +make +sudo make install + +portmaster --version + +``` + +{{% /details %}} + Definitely check: * @@ -155,11 +210,15 @@ https://libreselfhosted.com/ --> * https://github.com/Ragnt/AngryOxide * https://www.youtube.com/watch?v=fc2oNY_W0YY -### TOR 🧅 +--- + +### TOR vs I2P vs LokiNet + +#### 🧅 The Onion Router - Tor is a well-established network that operates as a decentralized network of nodes (volunteer-run servers, without financial incentives) that route and encrypt traffic through multiple layers (called onion routing) to conceal the origin and destination of data. -### I2P +#### I2P I2P is primarily designed for anonymous communication and services within the I2P network itself. It's optimized for hidden services, like websites (eepsites), email, and file sharing, that are accessible only within I2P. @@ -167,14 +226,14 @@ I2P is primarily designed for anonymous communication and services within the I2 * Peer Selection: In I2P, peers are selected based on continuous performance profiling, which can lead to faster performance for the user since the network optimizes over time based on usage. -### LokiNet - +#### LokiNet [Lokinet](https://lokinet.org/) also utilizes onion routing to route and encrypt traffic, but it employs a mixnet architecture, which means that each packet of data is routed through multiple nodes in the network, similar to Tor. -https://github.com/oxen-io/lokinet/releases -{{% details title="How to Install [Latest LokiNet](https://github.com/oxen-io/lokinet/releases)" closed="true" %}} +{{% details title="How to Install [Latest LokiNet](https://github.com/oxen-io/lokinet/releases) 👇" closed="true" %}} + +Check the [latest release here](https://github.com/oxen-io/lokinet/releases) and: ```sh wget https://github.com/oxen-io/lokinet/releases/download/v0.9.11/lokinet-v0.9.11.tar.xz @@ -192,11 +251,13 @@ SNApps, or Session Network Applications, are DApps built on top of the Session n * Oxen Blockchain Explorer - https://lokiblocks.com/ * [Oxen Name System](https://docs.oxen.io/oxen-docs/using-the-oxen-blockchain/using-oxen-name-system) +--- + ### Crypto? This is not in the right place to learn big about Crypto - but [WhyCryptoCurrencies](https://whycryptocurrencies.com/) it is (and Free). -{{% details title="A couple of wallets that you can use in Linux" closed="true" %}} +{{% details title="A couple of wallets that you can use in Linux 👇" closed="true" %}} ```sh flatpak install flathub org.electrum.electrum #BTC diff --git a/content/docs/Privacy/android.md b/content/docs/Privacy/android.md index 8b8968f..4ed8237 100644 --- a/content/docs/Privacy/android.md +++ b/content/docs/Privacy/android.md @@ -158,19 +158,29 @@ https://dev.to/dotnetdreamer/using-android-phone-as-a-development-machine-3f39 ### Better Android OS +* Android alternatives: + * Ubuntu Touch + +{{% details title="Private Android with LineageOS" closed="true" %}} -* - * - * Pixels Only - https://grapheneos.org/releases +> SUpported devices list: -> How to do it - https://www.linuxfordevices.com/tutorials/openandroidinstaller-android-rom +{{% /details %}} -### Private Android with GrapheneOS - +* How to do it - https://www.linuxfordevices.com/tutorials/openandroidinstaller-android-rom +* Other custom ROMs: https://www.xda-developers.com/tag/custom-rom/ - * Other custom ROMs: https://www.xda-developers.com/tag/custom-rom/ \ No newline at end of file +{{% /details %}} + + \ No newline at end of file diff --git a/static/images/benchmarks/phoronix-test-5600g.png b/static/images/benchmarks/phoronix-test-5600g.png new file mode 100644 index 0000000..861e445 Binary files /dev/null and b/static/images/benchmarks/phoronix-test-5600g.png differ diff --git a/static/images/benchmarks/ssd-nvme-pcie.png b/static/images/benchmarks/ssd-nvme-pcie.png new file mode 100644 index 0000000..39572a7 Binary files /dev/null and b/static/images/benchmarks/ssd-nvme-pcie.png differ diff --git a/static/images/benchmarks/ssd-sata.png b/static/images/benchmarks/ssd-sata.png new file mode 100644 index 0000000..dc66561 Binary files /dev/null and b/static/images/benchmarks/ssd-sata.png differ diff --git a/static/images/benchmarks/ssd2-benchmark.png b/static/images/benchmarks/ssd2-benchmark.png new file mode 100644 index 0000000..40d1f0b Binary files /dev/null and b/static/images/benchmarks/ssd2-benchmark.png differ diff --git a/static/images/gaming-garuda1.png b/static/images/gaming-garuda1.png new file mode 100644 index 0000000..66bd5b6 Binary files /dev/null and b/static/images/gaming-garuda1.png differ diff --git a/static/images/gaming-garuda2.png b/static/images/gaming-garuda2.png new file mode 100644 index 0000000..4cd7766 Binary files /dev/null and b/static/images/gaming-garuda2.png differ