Command-line editing

Description

If you type something wrong on a command line, the bash shell ensures that you don’t have to delete the entire line and start over. Likewise, you can recall a previous command-line and change the elements to make a new command.
Nasir Nawaz
Quiz by Nasir Nawaz, updated more than 1 year ago
Nasir Nawaz
Created by Nasir Nawaz about 7 years ago
8
0

Resource summary

Question 1

Question
This moves the cursor to the beginning of the command line.
Answer
  • Ctrl+A
  • Ctrl+B
  • Ctrl+C

Question 2

Question
Go forward one character.
Answer
  • Ctrl+F
  • Ctrl+D
  • Ctrl+P

Question 3

Question
Go backward one character.
Answer
  • Ctrl+B
  • Ctrl+K
  • Ctrl+

Question 4

Question
Go forward one word.
Answer
  • Alt+F
  • Alt+Q
  • Alt+Y

Question 5

Question
Go backward one word.
Answer
  • Alt+B
  • Alt+L
  • Alt+S

Question 6

Question
Go to the end of the line.
Answer
  • Ctrl+E
  • Ctrl+H
  • Ctrl+W

Question 7

Question
Clear screen and leave line at the top of the screen.
Answer
  • Ctrl+L
  • Ctrl+X
  • Ctrl+D

Question 8

Question
Delete the current character.
Answer
  • Ctrl+D
  • Ctrl+X
  • Ctrl+K

Question 9

Question
Delete the previous character.
Answer
  • BackSpace
  • Delete
  • Ctrl+X

Question 10

Question
Switch positions of current and previous characters
Answer
  • Ctrl+T
  • Ctrl+C
  • Ctrl+G

Question 11

Question
Switch positions of current and previous words
Answer
  • Alt+T
  • Alt+D
  • Alt+X

Question 12

Question
Change the current word to uppercase.
Answer
  • Alt+U
  • Alt+P
  • Alt+C

Question 13

Question
Change the current word to lowercase.
Answer
  • Alt+L
  • Alt+S
  • Alt+B

Question 14

Question
Change the current word to an initial capital.
Answer
  • Alt+C
  • Alt+B
  • Alt+M

Question 15

Question
Add a special character. For example, to add a Tab character, press Ctrl+V+Tab.
Answer
  • Ctrl+V
  • Ctrl+O
  • Ctrl+S

Question 16

Question
Cut text to the end of the line.
Answer
  • Ctrl+K
  • Ctrl+E
  • Ctrl+X

Question 17

Question
Cut text to the beginning of the line.
Answer
  • Ctrl+U
  • Ctrl+B
  • Ctrl+X

Question 18

Question
Cut the word located behind the cursor.
Answer
  • Ctrl+W
  • Ctrl+B
  • Ctrl+Z

Question 19

Question
Cut the word following the cursor.
Answer
  • Alt+D
  • Alt+Y
  • Alt+T

Question 20

Question
Paste most recently cut text.
Answer
  • Ctrl+Y
  • Ctrl+P
  • Ctrl+V

Question 21

Question
Rotate back to previously cut text and paste it.
Answer
  • Alt+Y
  • Alt+B
  • Alt+Q

Question 22

Question
Delete the entire line.
Answer
  • Ctrl+C
  • Ctrl+X
  • Ctrl+D
Show full summary Hide full summary

Similar

Common Shell Environment Variables
Nasir Nawaz
Components of An Operating System - Jason Madappattu
Jason EM
Linux - File Permissions
Mitch Isaacs
Linux Programming Interface: Chapter 1
Jon Schipp
RedHat Linux Version 7 System Administration Certification
John Sweet
SISTEMAS OPERATIVOS
Sebastian Molina
BASH
Fen Pin
3. Сокеты Беркли. Мультиплексирование.
Sergei Fomin
Computing
Jak Salad
Linux Programming Interface: Chapter 2
Jon Schipp
Terminal Commands
Cameron James