Skip to content

Commit

Permalink
move to all bash flow code
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxrob committed Dec 19, 2024
1 parent 9e415ab commit b889d37
Show file tree
Hide file tree
Showing 70 changed files with 1,093 additions and 1,989 deletions.
2 changes: 2 additions & 0 deletions adoc/autodidactic/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ include::strong-opinions-weakly-held.adoc[]

include::cv-vs-resume.adoc[]

include::work-with-good-people.adoc[]

= Purpose

include::motivation.adoc[]
Expand Down
3 changes: 3 additions & 0 deletions adoc/autodidactic/work-with-good-people.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
== Work with good people

> People don't quit their jobs; they quit their coworkers.
4 changes: 2 additions & 2 deletions adoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
:icons: font
:xrefstyle: short

Here you'll find my perpetually unfinished books. I make no promises. I have a job.
Here you'll find my perpetually unfinished books.

- link:terminal-velocity[*Terminal Velocity*] +
_Boost your coding, hacking, and learning with a Unix or Linux terminal_
_Boost your coding, hacking, and learning with the fastest human-computer interface_

- link:autodidactic[*Autodidactic*] +
_Keys to success as a modern knowledge warrior_
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
== Windows WSL2

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 virtual machine or dual-booting every time. 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.

=== Enable WSL

First things first, open PowerShell. No, not PowerPoint, your terminal. Hit `Win` and start typing `powershell`. 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, which should be Ubuntu. You will probably have to restart your computer.

=== 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.

=== Install Ubuntu into WSL2

If Ubuntu didn't install during Step 1, snag it manually. Open the *Microsoft Store* (I know, gross) and search for "Ubuntu." When it's done, open it from the Start menu or run:

[source,bash]
----
wsl -d Ubuntu
----

=== Hacker's perspective

WSL2 isn't just fast—it's a game-changer for anyone running Linux on Windows. It ditches the clunky syscall translation of WSL1 and fires up a real Linux kernel inside a stripped-down virtual machine, delivering near-native speed and full compatibility. It's like hacking two systems at once—Windows and Linux—without rebooting or splitting your workflow. Files, networks, and apps flow seamlessly between the two worlds, letting you script, code, and test with zero friction. Add in GPU acceleration and container support, and WSL2 turns your Windows box into a double agent: a Linux powerhouse hiding in plain sight.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[get-unix-linux]]
== Get Unix or Linux

Let's make this short. If you have a Mac you're done. If you have Windows, install WSL2 and you're in the game. That's it. Both of these are mandatory learning for any hacker. Add them to your `TODO` lists now.

include::whats-your-distro.adoc[]

include::mac-is-unix.adoc[]

include::get-wsl2-on-windows.adoc[]

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
== Mac _is_ Unix
=== Mac _is_ Unix

Let's clear something up right now: if you're using a Mac, you're already halfway to the promised land. macOS isn't just Unix-based—it's _**certified Unix**_. That's right, your shiny aluminum rectangle is running on the world's largest Unix distribution. Feel powerful yet? You should.

macOS traces its lineage back to BSD (Berkeley Software Distribution), one of the OG Unix offshoots. It's like the refined, Ivy-League sibling of Linux. Behind the polished GUI is a terminal waiting to get its hands dirty. Fire it up, and you've got access to all the Unix tools hackers and coders swear by—`ls`, `grep`, `awk`, you name it. It's a full-time Unix machine moonlighting as a consumer-friendly OS.

And here's the kicker: Apple pays to keep it certified. That means when you're typing commands in your Mac terminal, you're not just running "like" Unix—you're running the real deal. It's the same foundation that powers servers, supercomputers, and everything in between. The same philosophy of small, composable tools, the same file hierarchy, the same command-line DNA.

=== Hacker's perspective
==== Hacker's perspective

So why does this Mac stuff matter? Because it means if you've got a Mac, you already own one of the best Unix environments out there. You don't need to dual-boot Linux, spin up a VM, or SSH into a remote box just to get started. It's all right there, preinstalled, waiting for you to discover it. Sure, Linux might feel more hardcore—and we'll get to that—but don't let anyone tell you your Mac can't play with the 1337. It already is. Only a time-wasting moron would challenge that. Unix was a thing way before Linux was a pipe dream and it still is. Torvalds admits he never would have made Linux had he known BSD was a thing. Yet here we are.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[start-using-terminal]]
= Start using terminal
[[set-up-a-terminal]]
= Set up a terminal

Forget the noise, the guides, the endless rabbit holes of config tweaks. All of that? It can wait. Right now, we're here to do one thing: get your terminal up and running. Nothing fancy. No frills. Just power, raw and ready.
Forget the noise, the guides, the endless rabbit holes of config tweaks. All of that? It can wait. Right now, we're here to do one thing: get your terminal up and running on the computer you have. Nothing fancy. No frills. Just power, raw and ready.

This isn't about perfection; it's about initiation. You don't need the perfect configs, just enough to get you started. First, we open the door. Later, we'll learn everything you need to grok to hack your configs to your heart's content.

Expand All @@ -11,6 +11,11 @@ include::learn-launcher.adoc[]

include::learn-alt-tab.adoc[]

include::get-unix-linux/index.adoc[]

include::package-management/index.adoc[]



// get-git-github.adoc
// get-wezterm.adoc
Expand Down
64 changes: 64 additions & 0 deletions adoc/terminal-velocity/_old/set-up-a-terminal/install-wslu.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
== Install wslu

Running Linux on WSL2 is solid, but let's be real—without wslu, it's like bringing a knife to a gunfight. `wslu` is the toolkit you didn't know you needed. It bridges the gap between Linux and Windows, giving you seamless integration to blur the lines between the two systems. Want to open a file in Notepad from WSL? Done. Need a Windows app to handle a Linux file? No problem. This is how you make WSL more than just a sandbox—it becomes a weapon.

=== What Is wslu?

`wslu` stands for WSL Utilities, a set of command-line tools designed to connect WSL and Windows. With commands like `wslview`, `wslupath`, and `wslvar`, you get superpowers to interact with the Windows file system, environment variables, and applications—all without leaving the Linux terminal.

=== Step-by-Step Installation

Let's get wslu installed so you can stop pretending WSL is just Linux Lite.

==== 1. Update Your Linux Distro

First things first: make sure your WSL2 Linux distro is up-to-date.

[source,bash]
----
sudo apt update && sudo apt upgrade -y
----

==== 2. Add the wslu Repository

wslu isn't bundled with most distros, so you'll need to add its repository manually:

[source, bash]
----
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:wslutilities/wslu
sudo apt update
----

=== 3. Install wslu
Now for the good part:
```bash
sudo apt install wslu -y
```

=== 4. Verify the Installation
Check that everything's installed and ready:
```bash
wslview --version
```
You should see the installed version pop up. That's how you know you're in business.

== What Can You Do with wslu?
Here's how wslu flips the script on your workflow:
- **wslview**: Open files or URLs in Windows apps directly from WSL. Need to edit a config in Notepad? Just run:
```bash
wslview config.txt
```
- **wslupath**: Translate Linux paths into Windows paths. Perfect for file-sharing across environments.
```bash
wslupath /home/user/file.txt
```
- **wslvar**: Access Windows environment variables directly from Linux. No more guesswork.
```bash
wslvar USERPROFILE
```

== The Power of Integration
Installing wslu makes WSL2 more than just a Linux playground. It turns it into a bridge, a unified environment where you can flow seamlessly between Linux and Windows. It's the missing link, the glue that binds your dual-system setup into a single, unstoppable machine.

So, what are you waiting for? Install wslu, and turn your WSL2 into the hacker's dream it was meant to be.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
== Learn Alt-Tab for window switching
== Alt-Tab for window switching

The `Alt + Tab` shortcut is a universal skill that works across operating systems, allowing you to switch between open windows quickly and efficiently. It's one of the most basic yet powerful tools to enhance productivity. No additional graphical window manager (like `i3`) is needed if you have already mastered this one skill.

Expand Down
Loading

0 comments on commit b889d37

Please sign in to comment.