diff --git a/adoc/terminal-velocity/backup b/adoc/terminal-velocity/backup new file mode 100644 index 0000000..f370296 --- /dev/null +++ b/adoc/terminal-velocity/backup @@ -0,0 +1,100 @@ += How to Get WSL2 with Ubuntu Running—Fast and Dirty + +Alright, listen up. You’ve got a Windows machine and dreams of running Linux without dealing with dual-boot nightmares or spinning up a resource-hogging VM. Enter WSL2—your ticket to running Ubuntu seamlessly, like a hacker in a sci-fi flick. Here’s how you get it up and running, no fluff, just action. + +== Step 1: Enable WSL (Windows Subsystem for Linux) + +First things first, open your terminal. No, not PowerPoint, your terminal. Hit `Win+X` and select *Terminal (Admin)*. Then, fire this off: + +[source,bash] +---- +wsl --install +---- + +This command does the heavy lifting: enabling WSL, installing the kernel, and grabbing a default Linux distribution. If you’re lucky, this step might already give you Ubuntu. + +== Step 2: Upgrade to WSL2 + +If Windows decides to hand you WSL1 like it’s 2018, upgrade it manually: + +[source,bash] +---- +wsl --set-default-version 2 +---- + +WSL2 is where the magic happens—full Linux kernel, better performance, and actual compatibility with modern tools. + +== Step 3: Install Ubuntu + +If Ubuntu didn’t install during Step 1, snag it manually. Open the *Microsoft Store* (I know, gross) and search for “Ubuntu.” Pick your flavor—`Ubuntu 20.04`, `22.04`, whatever fits your vibe. Click *Get* and let it download. + +When it’s done, open it from the Start menu or run: + +[source,bash] +---- +wsl -d Ubuntu +---- + +== Step 4: Set Up Your Ubuntu Environment + +You’re in. First boot might feel sluggish—it’s setting up the filesystem. Follow the prompts to create your Linux username and password. Remember, this isn’t your Windows password; it’s your Linux alter ego. + +Next, update everything: + +[source,bash] +---- +sudo apt update && sudo apt upgrade -y +---- + +== Step 5: Optimize and Customize + +You want speed and power? Install your essentials. Start with these: + +- *Git* for version control: ++ +[source,bash] +---- +sudo apt install git +---- + +- *Build Essentials* for development: ++ +[source,bash] +---- +sudo apt install build-essential +---- + +- *Oh My Zsh* for terminal bling: ++ +[source,bash] +---- +sudo apt install zsh && sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +---- + +== Step 6: Integration with Windows + +Want seamless access to your Windows files? They’re right here in `/mnt/c`. Need a GUI for your Linux apps? Install an X server like *VcXsrv* and run graphical apps on your Windows desktop. + +== Step 7: Set WSL2 as Default + +Future-proof yourself by making WSL2 the default for all new Linux distros: + +[source,bash] +---- +wsl --set-default-version 2 +---- + +== Step 8: Test the Setup + +Make sure everything’s running smooth. Run something hardcore, like: + +[source,bash] +---- +htop +---- + +Or clone a repo and flex your Git skills. If it works, congratulations—you’re now running Linux on Windows like a boss. + +--- + +That’s it. You’re in the game now. No excuses, no delays. Time to start building, hacking, or whatever it is you do best. diff --git a/adoc/terminal-velocity/get-git-github.adoc b/adoc/terminal-velocity/get-git-github.adoc new file mode 100644 index 0000000..91b34c9 --- /dev/null +++ b/adoc/terminal-velocity/get-git-github.adoc @@ -0,0 +1,97 @@ +If you're serious about coding, collaborating, or hacking (the good kind), you need a GitHub account. GitHub isn't just a platform for software development—it's a global repository of knowledge, code, and collaboration. For hackers, it's an invaluable tool for both learning and sharing. Let's get you started. + +== Why GitHub matters to hackers + +- *Learn from the best*: GitHub hosts millions of open-source projects. Dive into repositories from industry giants or individual coders solving unique problems. Explore everything from cutting-edge AI models to security tools and exploits. + +- *Version control mastery*: understanding `git` and version control is a must for any hacker. GitHub is the perfect place to practice these skills in real-world scenarios. + +- *Collaborate and contribute*: join open-source projects, contribute code, and learn from community feedback. It's the ultimate way to build your reputation and skills. + +- *Showcase your skills*: use GitHub as your portfolio. Potential collaborators, employers, or even other hackers will look at your repositories to see what you're capable of. + +- *Explore hidden gems*: GitHub isn't just code. It's a treasure trove of scripts, configs, and knowledge that hackers can leverage for learning and inspiration. + +- *Host your tools*: publish your own scripts, utilities, or tools. Sharing your work solidifies your place in the hacker community. + +[NOTE] +==== +You don't have to use GitHub, you can <> instead—eventually. +==== + +== Get a GitHub account + +Everyone starts with a GitHub account. Here's the part where you have to be thirteen or older. + +=== Sign up + +. Visit https://github.com. +. Click on *Sign Up*. +. Enter a username (pick something unique and memorable), email, and password. + +[IMPORTANT] +==== +Choose a username that matches your local system's account name on WSL2, Linux, or macOS. Consistency across environments reduces confusion and simplifies setup. +==== + +=== Install Git and GitHub CLI + +The `git` and `gh` commands are two of the most important that you will use, sometimes hundreds of times a day. + +==== For macOS + +Install Git and GitHub CLI with Homebrew: + +[source,bash] +---- +brew install git gh +---- + +==== For Linux/WSL2 + +Update your system and install Git and GitHub CLI: + +[source,bash] +---- +sudo apt update && sudo apt install -y git gh +---- + +==== Verify installations + +[source,bash] +---- +git --version +gh --version +---- + +=== Authenticate with GitHub CLI + +Use the GitHub CLI tool to authenticate your account securely: + +[source,bash] +---- +gh auth login +---- + +Choose HTTPS your preferred authentication method. + +Follow the prompts to log in and configure access. Your web browser should be opened automatically. + +[NOTE] +==== +This is one of the reasons we installed `wslu` earlier on WSL2 on Windows since it allows the web browser to be automatically opened by the `gh auth login` command. +==== + +== GitHub tips for hackers + +- *Fork and tweak*: fork repositories of tools or code you admire, tweak them, and make them yours. + +- *Follow interesting developers*: keep up with others who are building tools or hacking on problems that interest you. + +- *Discover awesome lists*: search for curated "awesome lists" on GitHub to find new tools, frameworks, and libraries. + +- *Get ideas for own dot files and scripts*: everyone shares their personal home directory configurations. You'll start yours next. + +== The hacker’s perspective + +GitHub isn't just for developers—it's for hackers, thinkers, and creators. It's a playground, a library, and a stage all in one. Whether you're contributing to open-source security tools, learning from codebases, or building your own projects, GitHub is where it all happens. Get an account, dive in, and start hacking (ethically, of course). diff --git a/adoc/terminal-velocity/index.adoc b/adoc/terminal-velocity/index.adoc index 31ab11f..80edabd 100644 --- a/adoc/terminal-velocity/index.adoc +++ b/adoc/terminal-velocity/index.adoc @@ -88,7 +88,7 @@ include::get-wezterm.adoc[] [[github]] = Get Git and GitHub -_In development..._ +include::get-git-github.adoc[] [[dotfiles]] = Start a dot files repo diff --git a/adoc/terminal-velocity/manage-software/winget.adoc b/adoc/terminal-velocity/manage-software/winget.adoc index 26e9864..cc829ef 100644 --- a/adoc/terminal-velocity/manage-software/winget.adoc +++ b/adoc/terminal-velocity/manage-software/winget.adoc @@ -1,10 +1,15 @@ == Windows: winget -Windows finally has a native package manager: *winget* (Windows Package Manager). It simplifies the process of installing, updating, and managing software directly from the command line, just like package managers on Unix-like systems. Here’s how you can master the basics. +Windows finally has a native package manager: `winget` (Windows Package Manager). It simplifies the process of installing, updating, and managing software directly from the command line, just like package managers on Unix-like systems. Here’s how you can master the basics. + +[NOTE] +==== +We'll only use `winget` to get WezTerm in this book since we are using WSL2 on Windows, but if you were to prefer Git-Bash `winget install --id git.git` would do it. +==== === Installing winget -Most modern versions of Windows 10 and 11 already have *winget* installed. To check, open PowerShell or Command Prompt and run: +Most modern versions of Windows 10 and 11 already have `winget` installed. To check, open PowerShell or Command Prompt and run: [source,powershell] ---- @@ -15,6 +20,8 @@ If you see a version number, you’re good to go. If not, install it via the *Mi === Common winget commands +Here are some of the `winget` command that you will use most often. + ==== Search for a package Find the package you want by searching the repository: @@ -28,7 +35,7 @@ Example: [source,powershell] ---- -winget search --id microsoft.visualstudiocode +winget search --id github.cli ---- ==== Install a package @@ -44,7 +51,7 @@ Example: [source,powershell] ---- -winget install --id microsoft.visualstudiocode +winget install --id github.cli ---- ==== List installed packages @@ -69,7 +76,7 @@ Example: [source,powershell] ---- -winget upgrade --id microsoft.visualstudiocode +winget upgrade --id github.cli ---- Or, update everything at once: @@ -92,7 +99,7 @@ Example: [source,powershell] ---- -winget uninstall --id microsoft.visualstudiocode +winget uninstall --id github.cli ---- ==== Show package details @@ -106,23 +113,17 @@ winget show --id === Advanced winget tips -- **View Command Help**: -+ -Not sure about a specific command? Use the help flag: -+ +- **View Command Help**: not sure about a specific command? Use the help flag: + [source,powershell] ---- winget --help ---- -- **Add Third-Party Repositories**: -+ -winget supports additional repositories, giving you access to even more packages. Check out the official documentation for setup instructions. +- **Add third-party repositories**: winget supports additional repositories, giving you access to even more packages. Check out the official documentation for setup instructions. + +- **Silent installs**: some packages support silent installation. To avoid unnecessary prompts during installation, add: -- **Silent Installs**: -+ -Some packages support silent installation. To avoid unnecessary prompts during installation, add: -+ [source,powershell] ---- --silent @@ -130,10 +131,10 @@ Some packages support silent installation. To avoid unnecessary prompts during i === Benefits of winget -*Unified Package Management*: Manage all your software installations and updates from one tool. +- *Unified Package Management*: manage all your software installations and updates from one tool. -*Simplified Workflow*: No need to download installers or navigate through GUI wizards. +- *Simplified Workflow*: no need to download installers or navigate through GUI wizards. -*Cross-Compatibility*: Works seamlessly with Windows 10 and 11. +- *Cross-Compatibility*: works seamlessly with Windows 10 and 11. With winget, Windows users finally have a powerful tool to simplify software management. Whether you’re a developer or just looking to streamline your setup, winget brings the convenience of Linux-style package management to the Windows ecosystem. diff --git a/docs/terminal-velocity/index.html b/docs/terminal-velocity/index.html index 6e4b227..e90f390 100644 --- a/docs/terminal-velocity/index.html +++ b/docs/terminal-velocity/index.html @@ -543,7 +543,14 @@

Terminal Velocity

  • Why WezTerm?
  • -
  • Get Git and GitHub
  • +
  • Get Git and GitHub + +
  • Start a dot files repo
  • Configure WezTerm terminal
  • Learn shell basics
  • @@ -1494,12 +1501,26 @@

    Windows: winget

    -

    Windows finally has a native package manager: winget (Windows Package Manager). It simplifies the process of installing, updating, and managing software directly from the command line, just like package managers on Unix-like systems. Here’s how you can master the basics.

    +

    Windows finally has a native package manager: winget (Windows Package Manager). It simplifies the process of installing, updating, and managing software directly from the command line, just like package managers on Unix-like systems. Here’s how you can master the basics.

    +
    +
    + + + + + +
    + + +
    +

    We’ll only use winget to get WezTerm in this book since we are using WSL2 on Windows, but if you were to prefer Git-Bash winget install --id git.git would do it.

    +
    +

    Installing winget

    -

    Most modern versions of Windows 10 and 11 already have winget installed. To check, open PowerShell or Command Prompt and run:

    +

    Most modern versions of Windows 10 and 11 already have winget installed. To check, open PowerShell or Command Prompt and run:

    @@ -1576,7 +1600,7 @@
    -
    winget upgrade --id microsoft.visualstudiocode
    +
    winget upgrade --id github.cli
    -
    winget uninstall --id microsoft.visualstudiocode
    +
    winget uninstall --id github.cli
    @@ -1624,46 +1648,45 @@

    Adv
    • -

      View Command Help:

      -
      -

      Not sure about a specific command? Use the help flag:

      +

      View Command Help: not sure about a specific command? Use the help flag:

      +
    • +
    winget --help
    - +
    +
    • -

      Add Third-Party Repositories:

      -
      -

      winget supports additional repositories, giving you access to even more packages. Check out the official documentation for setup instructions.

      -
      +

      Add third-party repositories: winget supports additional repositories, giving you access to even more packages. Check out the official documentation for setup instructions.

    • -

      Silent Installs:

      -
      -

      Some packages support silent installation. To avoid unnecessary prompts during installation, add:

      +

      Silent installs: some packages support silent installation. To avoid unnecessary prompts during installation, add:

      +
    • +
    --silent
    - - -

    Benefits of winget

    -
    -

    Unified Package Management: Manage all your software installations and updates from one tool.

    -
    -
    -

    Simplified Workflow: No need to download installers or navigate through GUI wizards.

    -
    -
    -

    Cross-Compatibility: Works seamlessly with Windows 10 and 11.

    +
    +
      +
    • +

      Unified Package Management: manage all your software installations and updates from one tool.

      +
    • +
    • +

      Simplified Workflow: no need to download installers or navigate through GUI wizards.

      +
    • +
    • +

      Cross-Compatibility: works seamlessly with Windows 10 and 11.

      +
    • +

    With winget, Windows users finally have a powerful tool to simplify software management. Whether you’re a developer or just looking to streamline your setup, winget brings the convenience of Linux-style package management to the Windows ecosystem.

    @@ -1794,7 +1817,175 @@

    Why WezTerm?

    Get Git and GitHub

    -

    In development…​

    +

    If you’re serious about coding, collaborating, or hacking (the good kind), you need a GitHub account. GitHub isn’t just a platform for software development—it’s a global repository of knowledge, code, and collaboration. For hackers, it’s an invaluable tool for both learning and sharing. Let’s get you started.

    +
    +
    +

    Why GitHub matters to hackers

    +
    +
      +
    • +

      Learn from the best: GitHub hosts millions of open-source projects. Dive into repositories from industry giants or individual coders solving unique problems. Explore everything from cutting-edge AI models to security tools and exploits.

      +
    • +
    • +

      Version control mastery: understanding git and version control is a must for any hacker. GitHub is the perfect place to practice these skills in real-world scenarios.

      +
    • +
    • +

      Collaborate and contribute: join open-source projects, contribute code, and learn from community feedback. It’s the ultimate way to build your reputation and skills.

      +
    • +
    • +

      Showcase your skills: use GitHub as your portfolio. Potential collaborators, employers, or even other hackers will look at your repositories to see what you’re capable of.

      +
    • +
    • +

      Explore hidden gems: GitHub isn’t just code. It’s a treasure trove of scripts, configs, and knowledge that hackers can leverage for learning and inspiration.

      +
    • +
    • +

      Host your tools: publish your own scripts, utilities, or tools. Sharing your work solidifies your place in the hacker community.

      +
    • +
    +
    +
    + + + + + +
    + + +
    +

    You don’t have to use GitHub, you can setup Gitea instead—eventually.

    +
    +
    +
    +
    +
    +

    Get a GitHub account

    +
    +

    Everyone starts with a GitHub account. Here’s the part where you have to be thirteen or older.

    +
    +
    +

    Sign up

    +
    +
      +
    1. +

      Visit https://github.com.

      +
    2. +
    3. +

      Click on Sign Up.

      +
    4. +
    5. +

      Enter a username (pick something unique and memorable), email, and password.

      +
    6. +
    +
    +
    + + + + + +
    + + +
    +

    Choose a username that matches your local system’s account name on WSL2, Linux, or macOS. Consistency across environments reduces confusion and simplifies setup.

    +
    +
    +
    +
    +
    +

    Install Git and GitHub CLI

    +
    +

    The git and gh commands are two of the most important that you will use, sometimes hundreds of times a day.

    +
    +
    +
    For macOS
    +
    +

    Install Git and GitHub CLI with Homebrew:

    +
    +
    +
    +
    brew install git gh
    +
    +
    +
    +
    +
    For Linux/WSL2
    +
    +

    Update your system and install Git and GitHub CLI:

    +
    +
    +
    +
    sudo apt update && sudo apt install -y git gh
    +
    +
    +
    +
    +
    Verify installations
    +
    +
    +
    git --version
    +gh --version
    +
    +
    +
    +
    +
    +

    Authenticate with GitHub CLI

    +
    +

    Use the GitHub CLI tool to authenticate your account securely:

    +
    +
    +
    +
    gh auth login
    +
    +
    +
    +

    Choose HTTPS your preferred authentication method.

    +
    +
    +

    Follow the prompts to log in and configure access. Your web browser should be opened automatically.

    +
    +
    + + + + + +
    + + +
    +

    This is one of the reasons we installed wslu earlier on WSL2 on Windows since it allows the web browser to be automatically opened by the gh auth login command.

    +
    +
    +
    +
    +
    +
    +

    GitHub tips for hackers

    +
    +
      +
    • +

      Fork and tweak: fork repositories of tools or code you admire, tweak them, and make them yours.

      +
    • +
    • +

      Follow interesting developers: keep up with others who are building tools or hacking on problems that interest you.

      +
    • +
    • +

      Discover awesome lists: search for curated "awesome lists" on GitHub to find new tools, frameworks, and libraries.

      +
    • +
    • +

      Get ideas for own dot files and scripts: everyone shares their personal home directory configurations. You’ll start yours next.

      +
    • +
    +
    +
    +
    +

    The hacker’s perspective

    +
    +

    GitHub isn’t just for developers—it’s for hackers, thinkers, and creators. It’s a playground, a library, and a stage all in one. Whether you’re contributing to open-source security tools, learning from codebases, or building your own projects, GitHub is where it all happens. Get an account, dive in, and start hacking (ethically, of course).

    +
    @@ -2292,7 +2483,7 @@

    Gitea alternative to GitHub