Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Last updated: Friday 13 November 2026 @ 17:29:40
BeagleBone Black

Connect and configure your terminal

Connect to the BeagleBone Black over USB, open a remote shell, and configure a readable command-line environment. By the end of this practical, you should be comfortable distinguishing between commands executed on your computer and commands executed on the BeagleBone.

Embedded LinuxSSHBashTerminal
Practical Checklist
Chapter checklist 0 / 2 completed
BeagleBone Black development board

BeagleBone Black development board

1. Connect to the BeagleBone Black

  1. Connect the board. Attach the BeagleBone Black to your computer with a USB cable that supports data, not just charging. Allow the board to boot.

  2. Open a terminal on your computer, then connect using the appropriate address.

    ssh debian@192.168.7.2

    If that address is unavailable, try the address provided for your teaching image or beaglebone.local if name resolution is available.

  3. Verify the device and sign in. On first connection, SSH may ask you to confirm the server's host key. Check that you are connecting to the intended lab board before accepting it.

    Debian GNU/Linux 10
    BeagleBoard.org Debian Buster IoT Image 2020-04-06
    
    default username:password is [debian:temppwd]
    debian@192.168.7.2's password:

    The defualt account is debian and its initial password may be temppwd. Password characters do not appear as you type them.

  4. Confirm that you are on the BeagleBone, not your own computer.

    whoami
    hostname
    pwd
    cat /etc/os-release
    debian
    
    BeagleBone
    
    /home/debian
    
    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    debian@beaglebone:~$

2. Configure the terminal environment

When you connect with SSH, your terminal and shell exchange information about how text, colours and cursor movements should be displayed. The TERM variable identifies the terminal’s capability profile; it does not itself enable features that your terminal lacks.

  1. Inspect your current terminal settings on the BeagleBone.

    printf 'TERM=%s\n' "$TERM"
    tput colors
  2. Open your Bash configuration on the BeagleBone.

    nano ~/.bashrc

    Add the configuration below at the end of the file.

    export TERM=xterm-256color
    
    # Coloured manual-page formatting using groff and less.
    export GROFF_NO_SGR=1
    export MANPAGER='less -R'
    
    export LESS_TERMCAP_mb=$'\e[0;35m'
    export LESS_TERMCAP_md=$'\e[0;35m'
    export LESS_TERMCAP_me=$'\e[0m'
    export LESS_TERMCAP_se=$'\e[0m'
    export LESS_TERMCAP_so=$'\e[1;36m'
    export LESS_TERMCAP_ue=$'\e[0m'
    export LESS_TERMCAP_us=$'\e[4;1;32m'
    export LESS_TERMCAP_mr=$'\e[7m'
    export LESS_TERMCAP_mh=$'\e[2m'
    export LESS_TERMCAP_ZN=$'\e[74m'
    export LESS_TERMCAP_ZV=$'\e[75m'
    export LESS_TERMCAP_ZO=$'\e[73m'
    export LESS_TERMCAP_ZW=$'\e[75m'
  3. Reload Bash configuration and test a manual page.

    source ~/.bashrc
    man ls

    Use q to leave the manual page. Headings and emphasised text should appear in the configured colours when the installed versions of man, groff and less support this method.

    printf '\033[35mMagenta\033[0m  \033[36mCyan\033[0m  \033[32mGreen\033[0m\n'

    If manual pages have no colour, verify that the configuration has been loaded and the required programmes are installed:

    printf '%s\n' "$TERM" "$MANPAGER" "$GROFF_NO_SGR"
    command -v man
    command -v less

    If the terminal behaves unexpectedly, comment out any explicit export TERM=... line, open a fresh SSH session and test again. Some modern man-page pipelines handle styling differently.

  4. Reconnect to confirm persistence. Exit the remote shell, reconnect using the same SSH address, and inspect the settings again.

    exit

    Run ssh debian@192.168.7.2 from your own computer to reconnect, then run printf '%s\n' "$TERM" and man ls on the BeagleBone.