Lập Trình Linux

8 Bash Shortcuts Every Linux User Should Know




A gentle introduction to moving around in the Linux CLI (Bash/Shell). These keyboard shortcuts will boost your speed, save you time, and allow you to quickly edit commands and move around.

2:22 Terminate a running command that’s attached to your shell session (ctrl-c)
2:31 Exit shell session (ctrl-d)
3:25 Tab Completion
4:51 Clearing your terminal (ctrl-L)
5:10 Cursor Movement
5:44 Move to beginning or end of line (ctrl-a, ctrl-e)
6:10 Move forward or back one word (alt-f, alt-b)
7:10 Searching through shell history (ctrl-r)

How to use vi shortcuts in Bash, instead of the default (emacs): set -o vim

Free Linux Sysadmin Course Playlist:

Check out my step-by-step project-based Linux course for beginners, 93% off when you use this link:

Patreon:
Official Site & e-mail list:
Twitter:
Facebook:
Podcast:

Nguồn: https://ftlinuxcourse.com

Xem thêm bài viết khác: https://ftlinuxcourse.com/lap-trinh-linux

Lập Trình Linux
Ubuntu: /usr/bin/ld: cannot find -lOpenCL (2 Solutions!!)
Lập Trình Linux
How to Move Directory & File Using Command in Linux | Linux Command Bangla Tutorial | mv command
Lập Trình Linux
How to Set Time, Timezone and Synchronize System Clock Using timedatectl Command| wiz maverick
  • 2:22 Terminate a running command that's attached to your shell session (ctrl-c)
    2:31 Exit shell session (ctrl-d)
    3:25 Tab Completion
    4:51 Clearing your terminal (ctrl-L)
    5:10 Cursor Movement
    5:44 Move to beginning or end of line (ctrl-a, ctrl-e)
    6:10 Move forward or back one word (alt-f, alt-b)
    7:10 Searching through shell history (ctrl-r)


  • best videos ever!


  • For vim users, you can navigate in bash with vi commands: set -o vi
    >> to your .bashrc.


  • Just what I have been looking for many many thanks.


  • MZMZ

    Author Reply

    great tips, wasn't aware of ctlr-r, even though i've been using 'history' for ever.
    one note on history,
    typing !#command number# (as in !56 for example) will just execute that command from history


  • Your amazing. Shit your way better and knowledgeable then you even probably realize. And i know programmers and there egos. Thanks for giving back.


  • "Hit tab with your ring finger"?!
    Sure…if you're missing your little finger… 😋


  • Good stuff man. You explain it very well. Thanks for your knowledge.


  • wait, can't you just hit the up arrow key to cycle through past commands?


  • Okay im gonna watch this over and over


  • So uh..umm..do i use these commands for parrot on android


  • 8 Bash Shortcuts Every Linux User [Who Uses Bash] Should Know


  • sudo bang bang. possibly the best command you will ever learn.

    Right up there with CTRL+L to clear the shell


  • There is one trick for changing directories. For example to jump back to the directory i just came from. Can u tell this one ??


  • @5:44 Keyboard key 'Pos1' also does it


  • Everything works on Mac too except for Alt-B and Alt-F.


  • Thank you that was good.


  • I cut my teeth on Slackware, and there was soooo little configuration or management in the GUI back then. I knew all this, watched anyway. It makes me feel good that I learned all this early… But I gravitate toward a shell, I came from DOS.


  • Awesome videos, very very helpfull!


  • Good content


  • Good, but intro is a little too long.


  • Instead of ctrl a and ctrl e, I use home and end. It's more comfortable somehow. Thank you for the videos!


  • ctrl+a and ctrl+e to jump from beginning to end also works using home key and end key


  • Fish gives good tab completion.
    Zsh does the same with plugins while being fully bash compatible. Made the switch. Never looked back lol


  • Little helper here:
    Instead of using alt + f or alt + b which is hard to type on some keyboards(such as mine), you can use ctrl + arrow left/right


  • Such a great video! I'm working to be a dev and I'm green as a fucking ninja turtle. This helped me loads and I'm subbing for sure. Looking forward to your videos. So much appreciatin you dude. cheers