06cTerminalInterfaces

Database Management

Mick McQuaid

University of Texas at Austin

13 May 2026

Note

  • This is an optional video, meant only for those curious about computers
  • If you regard the computer as a necessary evil, skip this, it won’t hurt your grade
  • Some people want to know more about things they can do with their computers
  • This video shows how I set up my terminal to work more efficiently
  • A lot of upfront work with the terminal is required to do this

But first,

  • I want to show you how I will operate if I’m not curious
  • There are some inefficiencies and ugliness built in to the default way of working
  • These are things that I want to remedy, since I use the computer (and mainly the terminal) all day, every day
  • I’m using a Mac and the workflow will differ a bit for Windows

The Default Way

First I open Finder and choose Applications

Then scroll down to Utilities and choose it

Then choose Terminal.app

Next I get a screen like this

If I switch to ~/courses/db/lecture, I see this

If I press Enter a few times, I see this

Now I can type in sqlite3 and work on my homework

My current approach

Instead, I click ctrl-space then k, to get this

Kitty gives me multiple windowpanes

I can zoom in on one of them

How I work

Each window

  • I usually have a text editor in the largest pane (that’s NeoVim)
  • I run other commands, such as sqlite3 in one of the small panes
  • I like having two panes so I can refer to the output of one command while typing another command
  • I like having a default set of windows, one for each class I teach, plus an admin window and a misc window

The programs

  • kitty, a terminal emulator (on Windows use command.exe or powershell)
  • bash, a shell (on windows, use the built-in shell or acquire bash)
  • blesh, a “command completion” tool for bash
  • neovim, a text editor (on Windows use Notepad++ or VScodium)
  • powerline go, a modifier for prompts and status lines
  • brew, a package manager (on Windows use Chocolatey)

Kitty

  • kitty is a terminal emulator
  • In ancient times, there was one computer for everyone in a group
  • People connected to the computer with a machine called a terminal, which had a screen and keyboard and rudimentary computer for connecting to the mainframe computer
  • Nowadays, most computers have or can acquire a program that emulates these terminals because the workflow in them was so efficient
  • They usually have a LOT more features than the old terminals but some of the same limitations

Kitty features

  • Kitty doesn’t take up much memory (I used to use iTerm2 with tmux but it took up a lot of memory)
  • Kitty works on Mac or Linux (iTerm2 only works on Mac)
  • Kitty supports tabs, tiles, scripts, remote control, good font management, cursor management, images, and more
  • I configure kitty using two files, kitty.conf and my_session.conf, both located by default in ~/.config/kitty

Bash

  • It’s not enough to have a raw terminal emulator—you also need a shell
  • On Mac, the default shell is called zsh
  • On Mac or Linux, you can choose a shell from among many possibilities, the three most popular being zsh, bash, and fish
  • On Windows, I believe there is a built-in shell you can’t get rid of, although you can also download bash or other shells to run on top of it, or you can obtain wsl2, which can run any shell of your choice
  • I have been using bash for about 25 years so, when Mac switched to zsh, I stayed with bash

What bash provides

  • Every time I press Enter, a string of characters called a prompt appears—that string and my response are interpreted by bash
  • I control bash through two main files ~/.bash_profile and ~/.bashrc. These files are in my home directory and ~ is a shorthand that bash understands to mean my home directory
  • Bash keeps a list of key-value pairs called the environment and consults this list every time I type in a command before interpreting that command
  • For example, I have a file (that I won’t share with you) that contains my api keys. I pay for many of these keys so they are private. I load this file into my environment and then I can call programs like claude code from bash and expect that they have access to the appropriate api key

More bash features

  • Bash has aliases to abbreviate common commands. For example, nv is an alias for my text editor
  • Bash has functions to simplify common commands and include positional parameters. For example mc means to mkdir -p $1 && cd $1 where $1 the name of a directory I wish to create and then use
  • Bash controls the PATH, an environment key variable that tells where to look for specified commands
  • Bash controls the colors in the terminal display and more

Blesh

  • ble.sh is a line editor for bash that implements command completion and syntax highlighting for bash
  • It offers to complete any command that you start to type with whatever you entered the last time you typed that string
  • It is endlessly configurable
  • Syntax highlighting means it colors commands and parameters differently. For example, if you type in a command that is not recognized by bash, blesh immediately colors it red until you expand it into a command that is recognized

NeoVim

  • I have been using vi or one of its descendents since 1987!
  • Its latest descendent, NeoVim, breaks some compatibility with earlier versions
  • By the way, it is comparatively difficult to learn in contrast to most editors
  • Once you master it, it’s the most efficient text editor
  • I configure it through a tree branching off of ~/.config/nvim in a programming language called Lua
  • There are vastly many tutorials for it and I am a good source of help on it, but I’ll say no more here unless someone asks—usually students use VsCode, which I dislike because it sends telemetry back to Microsoft (VSCodium is a version that doesn’t send telemetry to Microsoft)

Powerline Go

  • This is a package written in the programming language go, that controls the string of characters called the prompt
  • It also controls the statuslines, informative lines of text and symbols at the top and bottom of windows

Brew

  • This is a package manager, similar to Chocolatey on Windows
  • All the tools I mention above (except blesh) can be installed by using this package manager
  • Visit https://brew.sh (where it’s called HomeBrew) to get the installation instructions
  • After installing it, you can say brew install <packagename> to install a package. If it doesn’t find the package, you can say brew search <packagename> to find out if brew spells it differently. For example, claude code is called claude-code and if you say brew search claude you will get a list of claude related tools

What’s next

  • I have or will put my configuration files on Canvas for the above tools, so you can download them and use them yourself if you wish
  • I am enthusiasatic about helping you use these tools effectively

END

Colophon

This slideshow was produced using quarto

Fonts are Roboto, Roboto Light, and Victor Mono Nerd Font