- You may initiate command line by running it in a separate window inside graphical mode. Recommended for beginners.
- Or you may switch entirely to command line by pressing Ctrl + Alt + F1 to F4, but read first: to come back to graphical mode, press Ctrl + Alt + F7. Not recommended for beginners.
User may open more than one terminal at once and run simultaneously different commands, scripts or applications in each of them.
To open terminal in Ubuntu GNOME graphical mode as a separate window, press Ctrl + Alt + T or in Dash Home, select Terminal. This is a more comfortable way of using terminal, you may run multiple windows with terminal in them, running terminal within graphical mode has its advantages, as it may be copied from and pasted to with help of a mouse cursor. To exit the terminal, you may use exit command or just close the window with mouse.
In above terminal output, mike = username, PM01 = computer name, ~ = home folder and $ = ordinary user.
In above terminal output, root = username, PM01 = computer name, / = main root folder, # = super user (root).
In above terminal output, root = username, PM01 = computer name, /home/Downloads = current folder you are working in, # = super user (root).
Means to run the lshw command as a ordinary user, we will intentionally leave out mike@PM01:~
Means to run the lshw command as a super user, we will intentionally leave out root@PM01:/home/mike, because it is just a distraction, you will have there your own user and computer name.
Using keyboard Shift + Ctrl + V or use Shift + Insert, using Windows standard Ctrl + V does not work.
Copying is done using Shift + Ctrl + C or Shift + Insert, or with a right-click on a mouse.
Hitting Enter button on your keyboard will pass your command line from terminal to the operating system for processing, you will be prompted to enter more commands upon it is finished processing your command.
This will try to stop the currently performed task and return you to the prompt state before hitting Enter.
Use the Left and Right arrow keys to move in the line, use Backspace to delete characters from right and Delete key to delete character from the left.
Home key moves the cursor to the beginning of a line, End moves cursor to the end.
Esc + b moves to the beginning of the current or previous word.
Ctrl + k deletes all characters from the cursor to the end of the line, Ctrl + u deletes all characters from the cursor to the beginning of the line.
Ctrl + w deletes the word before, Windows (Super) key + Alt + b puts cursor back one word, Windows (Super) key + Alt + f moves the cursor forward on word.
To scroll trought the commands you have entered previously, use Up or Down keys on your keyboard.
Enter the history command to display a complete and numbered list of commands from history.
or use less option for scrollable list
$ history | less
or search for 'something' in the history file and expect only the matching lines as a outcome.
$ history | grep something
Press Ctrl + r and as you start typing characters one by one, a match of the command entered by you in past will be displayed on the right of the semicolon. Use backspace to delete last characters if you make a mistake.
When you enter the history command, you will get output with number and a line, to run a command with a specific number, use ! followed by the number of the command in the line.
Use Tab key on your keyboard to autocomplete the command for you, if there are more option, you will be served with a list, otherwise your command will be completed for you, this is one of the biggest time-savers.
To clear text in terminal window, you may use command clear, that clears screen similar to cls command in Windows terminal or MS DOS, leaving the cursor at the top of the terminal.
If you find this useful, please hit the +1 button in the right menu bar, thank you.