Skip to main content

Terminal Preview

Terminal Preview The Terminal environment is particularly useful for:
  1. Command-line focused tasks and operations
  2. Server administration and system configuration
  3. Text-based programming and debugging
  4. Resource-efficient remote access when GUI is not needed

Access the Terminal

  1. If the instructor recommends using the terminal environment by default for the Lab, you’ll see the terminal environment when you start it.
  2. You can create additional terminal sessions by clicking the + button at the top of the interface.
Terminal Tabs

Environment Features

The Terminal Interface provides several key features:
  1. Multiple Terminal Sessions:
    • Create new sessions using the + button
    • Switch between sessions using tabs
    • Close sessions individually as needed
  2. Full Ubuntu Environment:
    • Based on Ubuntu 22.04 LTS
    • Access to standard Ubuntu repositories
    • Support for common command-line tools and utilities
  3. Text-Based Tools:
    • Vim/Nano text editors
    • Command-line compilers and interpreters
    • Package management via apt
    • Git for version control

TTYD Features

The Terminal Interface is powered by TTYD (Terminal Over HTTP) and provides several advanced features: Using tmux Commands:
Terminal Split Screen

Scrolling in tmux

In tmux, mouse wheel scrolling and ordinary mouse drag-to-select copy do not coexist in one mode. The terminal must either give the wheel to tmux (for scrolling the scrollback) or leave mouse events to the browser (for highlighting and copying), not both at once with the same gestures. LabEx keeps mouse support off by default so you can select and copy in the browser in the usual way. If you turn mouse mode on, the wheel scrolls inside tmux, but normal click-and-drag selection for copy is no longer available until you change mode again. Temporarily enable mouse scrolling (current session only):
Permanently enable mouse scrolling (all future sessions):
When you need copying again:
  • Turn mouse mode off: tmux set -g mouse off, or remove or comment out set -g mouse on in ~/.tmux.conf and run tmux source-file ~/.tmux.conf.
  • Alternatively, some clients let you bypass tmux mouse handling by holding Shift while selecting; behavior depends on the browser and TTYD, so toggling mouse off is the reliable way to restore simple copy.

Usage Scenarios

Common terminal commands you’ll use:
You can use various text editors:
  1. Vim:
  1. Nano:
Both editors are pre-installed and ready to use.
Install and manage software packages:

Frequently Asked Questions

This is usually caused by a browser extension or a conflict in the browser environment. Try one of the following:
  • Reopen the lab in Google Chrome Incognito mode.
  • Use another browser, such as Firefox or Microsoft Edge.
If the Desktop loads normally after switching, an extension or setting in the original browser is likely interfering with the connection.
If the page remains at “Starting Terminal service” for a long time, a browser extension or a conflict in the browser environment may be preventing the connection. Try one of the following:
  • Reopen the lab in Google Chrome Incognito mode.
  • Use another browser, such as Firefox or Microsoft Edge.
If the Terminal connects normally after switching, an extension or setting in the original browser is likely interfering with the Terminal service.
TTYD supports several methods for copy/paste:
  1. Using Mouse:
    • Select text to copy
    • Right-click to paste
  2. Using Keyboard:
    • Copy: Ctrl+Insert or Ctrl+Shift+C
    • Paste: Shift+Insert or Ctrl+Shift+V
Note: Actual shortcuts may vary depending on your browser and operating system.
Yes, you can transfer files using command-line tools:
  1. For text content:
    • Copy and paste directly into the terminal
    • Use text editors to create and modify files
  2. For binary files:
    • Use the WebIDE interface for file uploads/downloads
    • Switch to the WebIDE tab for file management operations Upload Files
Remember that all files are temporary and will be lost when your session ends.
You can install software using apt:
Note that:
  1. Installations are temporary and will be reset when your session ends
  2. You have full sudo privileges for package management
  3. Only install packages needed for your current lab
The Terminal Interface is ideal when:
  1. You need a lightweight environment that loads quickly
  2. Your tasks are primarily command-line based
  3. You want to focus on terminal commands without GUI distractions
  4. You’re working on a low-bandwidth connection
  5. You’re completing labs that don’t require graphical interfaces
Consider using Desktop or WebIDE interfaces if you need GUI applications or advanced IDE features.
If your terminal becomes unresponsive:
  1. Try pressing Ctrl+C to interrupt the current process
  2. Create a new terminal session using the + button
  3. If needed, refresh the browser page to reset all sessions
Note that refreshing will close all current terminal sessions and start fresh ones.