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.
Practical Checklist

BeagleBone Black development board
1. Connect to the BeagleBone Black
-
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.
-
Open a terminal on your computer, then connect using the appropriate address.
ssh debian@192.168.7.2If that address is unavailable, try the address provided for your teaching image or
beaglebone.localif name resolution is available. -
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
debianand its initial password may betemppwd. Password characters do not appear as you type them. -
Confirm that you are on the BeagleBone, not your own computer.
whoami hostname pwd cat /etc/os-releasedebian 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.
-
Inspect your current terminal settings on the BeagleBone.
printf 'TERM=%s\n' "$TERM" tput colors -
Open your Bash configuration on the BeagleBone.
nano ~/.bashrcAdd 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' -
Reload Bash configuration and test a manual page.
source ~/.bashrc man lsUse q to leave the manual page. Headings and emphasised text should appear in the configured colours when the installed versions of
man,groffandlesssupport 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 lessIf 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. -
Reconnect to confirm persistence. Exit the remote shell, reconnect using the same SSH address, and inspect the settings again.
exitRun
ssh debian@192.168.7.2from your own computer to reconnect, then runprintf '%s\n' "$TERM"andman lson the BeagleBone.