Using the Terminal

Moderators: wizard, Forum moderators

Locked
User avatar
rockedge
Site Admin
Posts: 5709
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1988 times
Been thanked: 2095 times
Contact:

Using the Terminal

Post by rockedge »

revision 220418

This topic assumes you are using one of the recommended distros or remasters.

Puppy Linux does an excellent job of providing the user with graphical (GUI) applications and under ordinary operations you will not need to use the terminal. If, however, you have problems and/or ask for help on the forum you may be asked to open the terminal program to help troubleshoot. The sequence is then:
1. type a command
2. press: enter
3. see the output

The terminal in Linux is also sometimes refereed to as the “shell” or “command line interface” (cli). Linux terminal programs are like the MS Windows Command Prompt or cmd. When opened it is a blank black or white window with a (blinking) cursor where you can type commands and see output.

Important: all information entered in the terminal is case sensitive.

There are different terminal programs available in Linux. The two we will discuss are LXTerminal and Urxvt. To open either one:

  • click Menu>Utility>Urxvt (or LXTerminal)

Sometimes when using the terminal you have to enter long strings of commands and characters. Using copy and paste whenever possible is the best way to avoid errors.

Selecting (highlighting) text to copy:

  • With mouse, hold down the left mouse button and drag the mouse across the text.

  • With keyboard, hold down the ctrl key and use the arrow keys to move the cursor over the text.

A Word About Hotkeys (shortcuts)
Hotkeys are key sequences that execute an action. Example: if the hotkeys to copy some text are: ctrl + c, you select the text, hold down the ctrl key and press the c key. This action copies the text into an area called the “clipboard” . Here are some common hotkeys for copying and pasting that work in just about any application where text can be selected (highlighted using the mouse or keyboard):

ctrl + c copies selected text to the clipboard
ctrl + v paste the contents of the clipboard to the current cursor position

Using these hotkeys you can copy text from forum post to paste it into a terminal, or do the reverse. Unfortunately, the terminal programs don’t honor the “standard” hotkeys above.

Here’s how to do copy and paste into/out of the terminal programs:

LXTerminal

lxterm.png
lxterm.png (5.06 KiB) Viewed 5320 times
  • To copy text, select the text and click Edit>Copy

  • To paste text, place the cursor where you want to paste and click Edit>Paste

Note:If using a mouse, right clicking opens a menu, then select copy or paste.

Urxvt

urxvt.jpg
urxvt.jpg (5.18 KiB) Viewed 5320 times
  • To copy text, just select it, it is automatically put in the clipboard.

  • To paste text, place the cursor where you want to paste and press hotkeys:
    ctrl + alt + v (hold down ctrl alt, press v).

Note: if using an external three button mouse, pressing the middle mouse button will paste. If your mouse has a scroll wheel, pressing down on the wheel will also paste.

Helpful Hints
When you enter a command in the terminal, it keeps a record of it. You can recall the command by pressing the up/down arrow keys. You can also edit a recalled command without retyping it. The recall is available even after rebooting. This can save you a lot of typing.

Need more help? Join the forum and post your questions in Beginners Help.

Last edited by wizard on Mon Apr 18, 2022 5:03 pm, edited 4 times in total.
Reason: changed hotkey format and explanation, added rerference to shortcuts
Locked

Return to “Getting Started and System Requirements”