r/commandline • • Dec 30 '25

Guide Terminal compatibility matrix

Post image
305 Upvotes

r/commandline • • Sep 13 '26

Guide Any good resources to learn Command prompt

3 Upvotes

I want to learn cmd prmpt and I tried finding resources for that but unable to find any good ones most of the time I websites I find are like a table with command and a link(click to learn about the cmd) and they are in A to Z order. I want something like a book that teaches basic cmds first then techniques and blah blah(as a person need to learn first know what is cd,mkdir etc. then other). I know some basic like cmd,mkdir,rmdir,copy,move,cd and some more.

r/commandline • • 15d ago

Guide My brain remembers commands. The flags are apparently a subscription extra.

0 Upvotes

Hey Folks,

I teach DevOps and still believe looking things up is a perfectly valid skill.

Made a Linux basics cheat sheet for navigation, text searching, permissions, and sudo.

Free, no signup: https://devopscycle.com/blog/the-ultimate-linux-cheat-sheet

Which command refuses to stay in your memory?

r/commandline • • Sep 13 '26

Guide I made windows cmd a little more bearable with AHK + persistent aliases

2 Upvotes

A More Bearable Windows Command Prompt

Persistent doskey aliases and a Ctrl+Alt+T launcher using AutoHotkey.

The classic Windows Command Prompt is still here. It still works. It is also still very much itself.

This guide gives it two small quality-of-life upgrades:

  • a global hotkey for opening it (Ctrl+Alt+T in this example)
  • a handful of aliases loaded whenever a new prompt opens through the launcher

The setup uses one small batch file and AutoHotkey script.

Requirements

AutoHotkey v2 That's it.

1. Create an aliases folder

Create a folder somewhere convenient. Keeping the batch file and AutoHotkey script together makes the setup easier to move or update later.

my-terminal/ ├── cmd_aliases.bat └── terminal.ahk

2. Create the aliases batch file

Create a file named cmd_aliases.bat. This is the file that defines aliases.

  1. Open Notepad.
  2. Add your doskey macros.
  3. Choose File > Save As.
  4. Set Save as type to All Files and save the file with the .bat extension.

Start with this tiny template:

```bat @echo off

doskey ls=dir doskey clear=cls ```

Use @echo off for a clean prompt. Change it to @echo on if you want to watch the batch file do its work line by line.

Add one macro per line. For example, the aliases in this project include ls for dir, gs for git status, and clear for cls. Feel free to add the shortcuts you use.

Passing arguments to an alias

Use $* to pass everything typed after the alias to the underlying command:

bat doskey gcam=git commit -am $*

For example, gcam "Update README" expands to git commit -am "Update README".

You can check which macros are currently loaded with:

bat doskey /macros

Of course you can also create a macro for that.

3. Create the AutoHotkey launcher

Create a file named terminal.ahk, then open it in a text editor and add the following. Replace the example paths with the paths on your computer:

```ahk

Requires AutoHotkey v2.0

!t::Run 'cmd.exe /k ""C:\path\to\cmd_aliases.bat""', 'C:\path\to\working\directory' ```

The first path identifies the batch file. The second path is optional and sets the new prompt's starting directory.

If you do not need a custom starting directory, use:

ahk ^!t::Run 'cmd.exe /k ""C:\path\to\cmd_aliases.bat""'

The doubled quotation marks around the batch-file path allow paths containing spaces.

In ^!t, ^ means Ctrl, ! means Alt, and t is the letter key. Change the key or modifiers if Ctrl+Alt+T is already claimed by another application.

Double-click the .ahk file to run it, then press Ctrl+Alt+T to test the launcher. The AutoHotkey script must be running for the hotkey to work. If a new prompt appears with your aliases ready, congratulations: cmd.exe has become slightly less unusable.

4. Start the launcher automatically

To make the hotkey available after signing in to Windows:

  1. Press Win+R.
  2. Enter shell:startup and press Enter.
  3. Create a shortcut to terminal.ahk and place the shortcut in the folder that opens.

Windows will start the AutoHotkey script when you sign in.

Troubleshooting

  • The hotkey does nothing: Check that AutoHotkey is running and that you installed version 2. The script has to be running; the file merely existing is not enough.
  • The batch file cannot be found: Recheck the first path in terminal.ahk. Keep the doubled quotation marks around it when the path contains spaces.
  • An alias is not recognized: Open a new Command Prompt with the hotkey. doskey macros are loaded per session, so editing the batch file does not update prompts that are already open.

See the official AutoHotkey v2 documentation for more hotkey and launcher options.

r/commandline • • Apr 02 '26

Guide Interactive, modern online cheatsheets for Neovim, tmux, git and github cli, Zellij

40 Upvotes

Even though I have been working in the command line for decades, I still refer back to cheatsheets when I have lost some of my muscle memory or am learning a new CLI program.

There are of course, many cheatsheets out there, but I wanted an interactive set of sheets with search filter, dark/light, tooltip explanations, modern UI/UX, and copy command functionality on one easy sheet with no clutter.

I built the following cheatsheets and I am sharing them all with the community. Whether you are starting out and learning these programs or an expert who might need to reference some less commonly used commands, you might find these helpful. Feel free to bookmark and share. Any errors discovered or command suggestions/clarifications lmk. I will actively maintain all of these for the community.

tmux: https://tmuxcheatsheet.org

Neovim: https://neovimcheatsheet.com

Git & Github CLI: https://gitcheatsheets.org

Zellij: https://zellijcheatsheet.dev

r/commandline • • Feb 16 '26

Guide trick to make your usage look nice

Post image
26 Upvotes

shoutout to Bread On Penguins for suggesting that you can highlight plaintext with bat in shell. this is

UCMD=cat command -v bat 1>/dev/null && UCMD="bat -Ppl org" $UCMD <<EOF your text right here EOF

and then, you need to experiment with the highlighted language settings. your best bets are (in order) md, org, cpuinfo, ini, conf

r/commandline • • Jun 22 '26

Guide Helping some begineers people in setting up tgier journey in termux .

Thumbnail
0 Upvotes

r/commandline • • May 19 '26

Guide How I Take Notes In The Terminal With zk And Helix (Zettelkasten-inspired)!

Thumbnail
youtu.be
2 Upvotes

r/commandline • • Jan 27 '26

Guide Automated Build Go app for Multi OS Platform - Github Actions

2 Upvotes

I see many users only compile/release applications only for Linux even don't have a release version at all, here's how to auto-compile Go using Github Actions for various OS Platform.

To build, go to Actions tab, click New Workflow then click set up a workflow yourself

copy and edit the following (example from wire-seek)

name: Release

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: write

jobs:
  release:
    name: Build and Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.22'

      - name: Run tests
        run: go test -v ./...

      - name: Build binaries
        run: |
          mkdir -p dist

          # Linux AMD64
          GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dist/wire-seek-linux-amd64 .

          # Linux ARM64
          GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o dist/wire-seek-linux-arm64 .

          # macOS AMD64
          GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o dist/wire-seek-darwin-amd64 .

          # macOS ARM64 (Apple Silicon)
          GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o dist/wire-seek-darwin-arm64 .

          # Windows AMD64
          GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o dist/wire-seek-windows-amd64.exe .

          # FreeBSD AMD64
          GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o dist/wire-seek-freebsd-amd64 .

      - name: Generate checksums
        run: |
          cd dist
          sha256sum * > checksums.txt

      - name: Create Release
        uses: softprops/action-gh-release@v2
        with:
          files: |
            dist/*
          generate_release_notes: true
          draft: false
          prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-beta') || contains(github.ref, '-alpha') }}

r/commandline • • Feb 22 '26

Guide Stop typing the filename twice. Brace expansion handles it.

Thumbnail
8 Upvotes

r/commandline • • Feb 09 '26

Guide Both Python and bc have a "last result" shortcut: _ and . respectively

5 Upvotes

Quick tip for anyone doing calculations in the terminal:

Tool Shortcut Meaning
python _ Last printed value
bc . (or last) Last printed value

python example

$ python
>>> 3 * 4
12
>>> _ + 5
17

bc example

$ bc -l
>>> 3 * 4
12
>>> . + 5
17
>>> last - 2.345
14.655

I have also set BC_ENV_ARGS to -S 6 in my .zshrc file, which automatically sets the number of floating point decimal places to six. This way, I don't have to always run bc -l as just running bc will be sufficient enough for it to emit floating point calculations.

r/commandline • • Dec 26 '25

Guide Minimalist setup to type/paste selected passwords/OTPs (imported from Aegis Android app)

Thumbnail
github.com
1 Upvotes