Skip to content

Getting Started

Get sbsh up and running in minutes. This guide covers installation, basic configuration, and your first terminal session.

Installation

sbsh is available for Linux, macOS, and FreeBSD. See the Installation section for platform-specific instructions.

Quick Install

# Set your platform (defaults shown)
export OS=linux        # Options: linux, darwin, freebsd
export ARCH=amd64      # Options: amd64, arm64

# Install sbsh
curl -L -o sbsh https://github.com/eminwux/sbsh/releases/download/v0.6.0/sbsh-${OS}-${ARCH} && \
chmod +x sbsh && \
sudo install -m 0755 sbsh /usr/local/bin/sbsh && \
sudo ln -f /usr/local/bin/sbsh /usr/local/bin/sb

Autocomplete Setup

Enable command completion for bash:

cat >> ~/.bashrc <<EOF
source <(sbsh autocomplete bash)
source <(sb autocomplete bash)
EOF

For zsh, add to ~/.zshrc:

cat >> ~/.zshrc <<EOF
source <(sbsh autocomplete zsh)
source <(sb autocomplete zsh)
EOF

Your First Terminal

Start a terminal with the default profile:

$ sbsh
To detach, press ^] twice
[sbsh-35af93de] user@host:~/projects$

You're now in an sbsh terminal! The terminal ID (35af93de) is shown in the prompt.

Detach from Terminal

Press Ctrl-] twice to detach. The terminal keeps running:

[sbsh-35af93de] user@host:~/projects$ # Press Ctrl-] twice
Detached
$  # Back to your shell, but terminal is still running

List Active Terminals

$ sb get terminals
ID        NAME           PROFILE  CMD                           STATUS
bbb4b457  quick_samwise  default  /bin/bash --norc --noprofile  Ready

Reattach to a Terminal

$ sb attach quick_samwise
[sbsh-bbb4b457] user@host:~/projects$ # Back where you left off!

Using Profiles

Profiles define terminal environments declaratively. Start a terminal with a profile:

$ sbsh -p k8s-default
# Automatically configures kubectl context, shows cluster status

List available profiles:

$ sb get profiles
NAME              TARGET  ENVVARS  CMD
k8s-default       local   4 vars   /bin/bash
terraform-prd     local   2 vars   /bin/bash
docker-container  local   0 vars   /usr/bin/docker run ...

See the Profiles Guide for creating your own profiles.

Next Steps