This page is a reference and instruction for the use of the terminal in typical desktop fashion. When complete it should serve useful as a guide for the user in setting up a practical desktop environment utilizing mostly text-based applications. This environment should be capable of performing the tasks a "mainstream" graphical desktop environment can perform, with little-to-no coding/programming skills required. This guide will be Unix oriented, although principles and knowledge should be applicable on all platforms.
Widely available and currently supported tmux is probably the best choice for a terminal multiplexer on most desktop systems. When tmux loads, the user will immediately notice a statusbar appear at the bottom of the screen. This will display a list of the actively running terminals and the applications running there. To interact with tmux, all hotkeys are preceeded with the keybind CTRL+b. The user can invoke a new terminal window using the key chain combo CTRL+b c. Pressing CTRL+b tells tmux the user is giving it a command, then releasing CTRL+b and pressing c lets tmux know the user wants a new window. Once the new window is open it will launch a command prompt. A position will be occupied on the statusbar, listing a numerical digit and the name of the currently running task (if no commands have been invoked, probably bash). Tmux also supports split windows for viewing multiple running applications simultaneously. Following is a list of frequently used key combinations:
window switching | |
CTRL+b # | When # is replaced with the number for the desired window on the statusbar |
CTRL+b w | List all windows |
CTRL+b p | Move to next window to the left |
CTRL+b n | Move to next window on the right |
copy & paste | |
CTRL+b [ | Initiate copy mode (arrow keys move cursor) |
CTRL+spacebar | Initiate selection mode |
CTRL+w | Copy selection to the clipboard |
CTRL+b ] | Paste clipboard contents |
split-pane views | |
CTRL+b " | Split window vertically |
CTRL+b % | Split window horizontally |
CTRL+b ! | Make a new window from pane |
CTRL+b arrow keys | Switch panes |
CTRL+b spacebar | Cycle layouts |
CTRL+b Alt+1 | Evenly distribute screen space vertically |
CTRL+b Alt+2 | Evenly distribute screen space horizontally |
CTRL+b Alt+3 | Use one main window horizontally, stack others vertically |
CTRL+b Alt+4 | Use one main window vertically, stack others horizontally |
CTRL+b Alt+5 | Tile all windows. |
CTRL+b ! | Make a new window from pane |
CTRL+b arrow keys | Switch panes |
The command line is the most efficient and universally available method, and once understood it's usually used to the exclusion of visual file management applications. The command ls (list) can be used to list the files in the working directory, while cd (change directory) is used to move from one directory to another. Files are opened by typing the name of the program used to edit/view them with, followed by the name of the file. Provided below is a list of commonly used commands for navigating the file system and maniupulating files:
navigation | |
ls | list directory contents |
cd /usr/bin | change working directory to /usr/bin |
cd .. | ascend to parent directory |
cd ~ | enter home directory |
pwd | view the name of the current directory |
mkdir foo | create a directory named 'foo' |
rm -rf (directory name) | delete a directory |
file manipulation | |
file (filename) | describes the filetype |
less (filename) | view file contents |
rm (filename) | delete file |
mv (filename) | move file |
cp (filename) | copy file |
ip link set eth0 up
Wireless connection requires a few more steps:
Activate the wireless receiver: ip link set wlan0 up
List available wireless access points: iw dev wlan0 scan | less
Connect: iw dev wlan0 connect dlink
Configure IP address: dclient wlan0
Elinks is a text-based browser for viewing HTML files stored on a remote server. Rendering support for tables and frames is included, along with a download
manager and tabbed browsing feature. It can be launched simply with the command elinks
, and otherwise with a URL (web address) such as elinks http://gnu.org
.
Text-mode browsing is considerably more productive and effecient than graphical browsing (due to the exclusion of pop-up ads and bandwidth-hogging animations/images), especially on older
computers. While Elinks provides an Escape-key menu with most of the common features and settings, it's usually easier to use the keybindings for some frequent operations.
Elinks keybindings | |
g | Type a URL to load |
t | Open a new tab |
c | Close tab |
< or > | Switch tab (left/right) |
Insert/Delete | Scroll Up/down |
Up/Down arrow keys | Highlight next/previous links |
Right arrow key | Open link |
Left arrow key | Back one page |
CTRL+r | Reload page |
. | Number the visible links, typing the number highlights the corresponding link |
/ and n/N | Search within page, highlight next/previous search match |
a | Bookmark current page |
s | Open bookmarks |
\ | View page source |
d | Save to disk |
D | View download manager |