LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Consistent shortcut keys to navigate command line in Linux (https://www.linuxquestions.org/questions/linux-newbie-8/consistent-shortcut-keys-to-navigate-command-line-in-linux-4175613245/)

salilsurendran 09-04-2017 06:27 PM

Consistent shortcut keys to navigate command line in Linux
 
Hello,
I use one set of keys to navigate the command line of my local desktop but when I ssh into another machine those same set of shortcuts don't work. For eg. Alt + f/b takes me forward/back on the command line of my local shell but not a remote machine. Even worse even on my local machine when I access terminal via IntelliJ on my local desktop the same shortcut keys don't work. Is there any way to set the same set of shortcut keys to do the same actions for different terminals.

jsbjsb001 09-05-2017 12:36 AM

Quote:

Originally Posted by salilsurendran (Post 5755619)
Hello,
I use one set of keys to navigate the command line of my local desktop but when I ssh into another machine those same set of shortcuts don't work. For eg. Alt + f/b takes me forward/back on the command line of my local shell but not a remote machine. Even worse even on my local machine when I access terminal via IntelliJ on my local desktop the same shortcut keys don't work. Is there any way to set the same set of shortcut keys to do the same actions for different terminals.

There are some good keyboard combo's in the following link: https://www.linux.com/learn/intro-to...tion-shortcuts

These should work with bash and Linux in general, the CTRL ALT F1, F2, etc should work with any distro (and work on mine, CentOS 7, at the moment).

Turbocapitalist 09-05-2017 12:50 AM

There are shortcuts for your desktop environment, there are shortcuts for your terminal emulator, and lastly there are shortcuts for your shell. If you stick to only the shortcuts available as part of your shell then you have maximum portability. However, there are so many that this is not limiting in any way.

Your shell is probably bash, but ksh and zsh also have a lot of features.

See lists like the one in #2 above and this:

https://ss64.com/bash/syntax-keyboard.html

Also try to delve into the manual page for bash occasionally. It is the authoritative source, even if it is not the most pleasant or clear to read:

Code:

man bash
Look in particular at the sections on "Commands for Manipulating the History" and many of the sections right before or after that.

One of the most important things to learn in bash, ksh, or zsh is tab completion. Start typing and press tab. If you have typed something unique then it will fill in the rest of the letters automatically. If not, press tab again and it will offer options if there are any.

ondoho 09-05-2017 12:51 AM

this is functionality of the shell.
i suspect the remote shell isn't set up properly.
i have this problem on one machine i ssh into occasionally.


All times are GMT -5. The time now is 08:00 PM.