• Skip to primary navigation
  • Skip to main content
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

30 useful Linux terminal keyboard shortcuts

January 9, 2014 by Sharad Chhetri 3 Comments

In this post we will know about 30 useful Linux terminal keyboard shortcuts.The Linux keyboard shortcuts make your work on terminal very easy.We have tried to gather some useful Linux terminal keyboard shortcuts which can be run in system terminal as well as accessing machine with ssh command(Means through ssh terminal in short).
The given below shortcut keys has been tested in CentOS,Red Hat,Debian and Ubuntu.Most of the shortcut keys will also work in other Linux Distro

Linux terminal keyboard shortcut

Ctrl+L Clear the screen
tab Tab key autocomplete the name of command/file/directory etc. For eg. type tou and type tab

UP ARROW Key Shows you previous command in descending order
DOWN Arrow Key When you are using UP ARROW Key to get previous command.Then try this DOWN Arrow,it will show forward command history

Ctrl+R It is for Reverse search.Press CTRL+R and type some command which you last run.It will search for last command you run.
Here we pressed CTRL+r then typed /etc ,it automatically searched for command

(reverse-i-search)`/etc': /etc/init.d/httpd restart

Ctrl+J It end the CTRL+r search
Ctrl+G It abort the search by CTRL+r ( and restores original line)

CTRL+p It shows previous history,same like UP arrow key
CTRL+n It shows forward history,same like DOWN arrow key

Ctrl+B Move cursor one character to the left side
Ctrl+F Move cursor one character to the right side
Ctrl+A Move cursor to start of the line
Ctrl+E Move cursor to end of the line
HOME Move cursor at the start of the line
END Move cursor at the end of the line
CTRL+ RIGHT ARROW Move cursor one word right hand side
CTRL + RIGHT ARROW Move cursor one word left hand side
Ctrl+U It cut everything from the line start to cursor
Ctrl+K It cut everything from the cursor to end of the line
Ctrl+W It cut the current word before the cursor
Ctrl+Y It paste the previous cut text
CTRL+k It cut the line from the position of the cursor to the end of the line.
CTRL+SHIFT+c To copy selected text
CTRL+SHIFT+v To paste you last copied by CTRL+SHIFT+c
SHIFT + INSERT Copy selected text to clipboard and paste from the clipboard

Shift+PgUp/PgDown It Scrolls console buffer up/down. You can use this key, also in Runlevel 3 or terminal mode

CTRL+z Put the running process in background.(To get back, run jobs command.And then foregorund it by using fg command. )
For example. First run the top then press CTRL+z.After this use fg command and found job no. 1 for top. See below example

linux@tuxworld:~/Desktop$ jobs
[1]+  Stopped                 top
linux@tuxworld:~/Desktop$ fg %1

Ctrl + T It swap the last two characters before the cursor
Esc + T It swap the last two words before the cursor

CTRL+m It is like a Enter key (If ENTER key do not work,try this)

And at the end….

Ctrl + D Log out of current session, like exit command

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Linux : clear command and its keyboard shortcut
  2. Awesome windows run command shortcuts
  3. How to page scroll up/down in Linux terminal
  4. Ubuntu Linux : get matrix effect on terminal
  5. Terminal Recording with script and scriptreplay command
  6. How to see system load average in terminal with graphical representation
  7. Useful tail command with examples in Linux/Unix
  8. Useful 3 Pastebin links which I mostly use
  9. learn very useful alias command with examples
  10. Recover Linux Grub Password in linux rescue mode CentOS/Red Hat

Filed Under: Linux, Tips And Tricks Tagged With: shortcut keys

Reader Interactions

Comments

  1. yousuf says

    August 10, 2016 at 2:00 pm

    most important Ctrl+Alt+T to open new terminal …

    Reply
    • viktorkh says

      January 8, 2017 at 6:55 pm

      I m using Debian Jessie and tried Ctrl+Alt+T is doing nothing? I use Mate terminal

      Reply
  2. Spandan Pradhan says

    December 2, 2015 at 11:34 am

    very nice collection , all command line utility in one place. looking forward to more of it.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy