SSH

SSH is a protocol for accessing a terminal remotely. For SSH to work, the remote machine needs to have an OpenSSH instance running and listening for connections, and port 22 must be allowed through any VPNs or firewalls between the client and host machines. An SSH client is also needed, be it any UNIX system (using the ssh command), or a Windows server using a client such as PuTTY. OpenSSH Client Connect to a Remote Server Connect Using a Password ssh <user>@<ip> > <password> ssh root@192.168.1.133 > Ctrl+D # Disconnect After connecting to a server for the first time, the fingerprint of that server is stored in the ~/.ssh/known-hosts file. ...

3 min · 490 words · TrudeEH

Terminal Multiplexer [TMUX]

Overview tmux is a multiplexer that, among other things, is able to: Preserve a terminal session if it is closed or lost. Access an old session from a new terminal window. Connect to a remote session and save its state once disconnected. Split the terminal into multiple tabs and panes. Components Sessions (Only one tmux session can be used at a time. Similar to workspaces.) Windows (A session contains windows. These behave like tabs in other programs.) Panes (A split in the window, each with its own terminal instance.) ...

3 min · 610 words · TrudeEH

Transistors

Transistors are electronic components that behave like a switch, or amplifier. Schematic .--.,-- Collector Base --(--|<) `--`'-- Emitter Examples Switch If the base pin is provided with energy, the transistor allows current to flow in the main circuit. Amplifier Altering the voltage given to the base pin allows us to control a larger voltage in the main circuit. Types of Transistor NPN An NPN transistor combines the base pin and collector pin. ...

1 min · 109 words · TrudeEH

Version Control [GIT]

Git is a version control system first developed by Linus Torvalds. It facilitates collaboration on large projects, keeps track of changes, and allows mistakes to be rolled back into a previous state. Configure Git Git uses a hierarchy of configuration files: System: (/etc/gitconfig) Configuration for all users in a system. Global: (~/.gitconfig) Configure Git for all project of the current user. Local: (.git/config) Configure Git for the current project. Worktree: (.git/config.worktree) Configure part of a project. # Check if user name and email are set. git config --get user.name git config --get user.email # If not, set those values. git config --add --global user.name "username" git config --add --global user.email "email@example.com" git config --add --global init.defaultBranch main # GitHub's default git config --unset example.key # Remove a configuration value git config --unset-all example.key # Remove all instances of a configuration key git config --remove-section section # Remove an entire section # Rebase on pull by default to keep a linear history git config --global pull.rebase true Create a Repository Git stores all project information in the .git directory. This includes branches, commits, and metadata. ...

10 min · 2093 words · TrudeEH

WSL2

Windows’ WSL allows for installing a Linux subsystem on a Windows host. WSL2 enhances WSL with support for launching GUI apps as if they were regular Windows programs (or any X.org window). Install WSL2 On recent WSL versions, this process is quite simple: wsl --list --online # See available distros wsl --install -d <distro> # Select & Install distro wsl --set-default-version 2 # Set WSL 2 as the default version If the previous steps fail, WSL can still be installed manually: ...

3 min · 484 words · TrudeEH