What's the shortcut to delete a word “forward” in a unix terminal?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite
1












I do Ctrl+W in the mac terminal to delete a word (deletes from where the cursor is at to the beginning of the word)



How do I do the opposite - deletes from where the cursor is to the end of the word?










share|improve this question

























    up vote
    5
    down vote

    favorite
    1












    I do Ctrl+W in the mac terminal to delete a word (deletes from where the cursor is at to the beginning of the word)



    How do I do the opposite - deletes from where the cursor is to the end of the word?










    share|improve this question























      up vote
      5
      down vote

      favorite
      1









      up vote
      5
      down vote

      favorite
      1






      1





      I do Ctrl+W in the mac terminal to delete a word (deletes from where the cursor is at to the beginning of the word)



      How do I do the opposite - deletes from where the cursor is to the end of the word?










      share|improve this question













      I do Ctrl+W in the mac terminal to delete a word (deletes from where the cursor is at to the beginning of the word)



      How do I do the opposite - deletes from where the cursor is to the end of the word?







      terminal osx






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 25 '17 at 17:20









      Glide

      256139




      256139




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          9
          down vote













          This depends on your shell and its active command line editing mode.



          For a shell with Emacs command line editing mode (set -o emacs in some shells), use Alt+d (this doesn't work on macOS for whatever reason, but prints the character ∂, use Escd instead).



          For a shell with Vi command line editing mode (set -o vi in some shells), use Escdw (this does work on macOS as well).






          share|improve this answer






















          • Only in zsh though does Meta-D delete the same type of word that Ctrl-W does (blank delimited ones). In bash in vi mode, you can use dW to delete those
            – Stéphane Chazelas
            Sep 25 '17 at 20:47











          • @StéphaneChazelas Yes, they (the two keycombos) have a different view of what constitutes a "word".
            – Kusalananda
            Sep 25 '17 at 20:51










          • You can check the "use option as meta" in the terminal Keyboard preferences to make it work.
            – Jozef Legény
            Jun 11 at 8:07

















          up vote
          0
          down vote













          For the tty line discipline, ^W deletes the previous white-space delimited word.



          In the vi editor in insert mode, ^W deletes backward to the start of the first sequence of alnums or non-alnums (on foo-+-bar.. baz, it first deletes baz, then .., then bar, then -+-, then foo).



          In the emacs editor, ^W deletes from the cursor position to the mark (the one you set with Ctrl+Space).



          Some line editors like readline (used by bash, gdb...), zle (used by zsh), pdksh's when in vi mode, behave like vi in that regard and when in emacs mode behave like the tty line discipline (not emacs).



          libedit (used by BSD shells or (optionally) dash), tcsh, AT&T ksh, in emacs mode, behave like emacs where ^W deletes to the mark (initially at the beginning of the buffer).



          For deleting a word forward, in the vi editor, you'd do it in command (normal) mode with dw to delete to the beginning of the next sequence of alnums or non-alnums (or the end of the line) and dW to delete to the next sequence of non-blanks (the pendant of the ^W of the tty line discipline).



          In the emacs line editor, Meta-D would delete to the end of the next sequence of alnum characters. The word motion operators (Meta-B, Meta-F) behave similarly.



          command line editors, when in vi mode, behave like vi, but in emacs mode, you have two main schools: the tcsh school and the ksh school.



          The ksh school (readline, ksh, yash) behaves mostly like emacs (fish's behaviour is slightly different in how it treats non-alnum, non-whitespace characters in both emacs and vi mode).



          In the tcsh school (tcsh, libedit, zsh), word motions are based on whitespace-delimited words so are consistent with the tty line discipline's ^W in that regard.



          In zsh, the behaviour is customizable with different word styles for all the word motion widgets.



          For readline, you can get the tcsh school (and have Meta-D delete the same kind of word as Ctrl-W does) by adding to your ~/.inputrc:



          set keymap vi-move
          "e[EMACS~": emacs-editing-mode
          set keymap emacs
          "e[VI~": vi-movement-mode
          "ed": "e[VI~dWe[EMACS~"
          "ef": vi-fWord
          "eb": vi-bWord


          Or on the other hand, align ^W to the other word motion widgets (behave like Meta-Backscape) with:



          set keymap emacs
          "C-W": backward-kill-word


          As to what the Meta key is, see there.






          share|improve this answer





























            up vote
            -2
            down vote













            In Linux try Ctrl+k to delete from where the cursor is to the end of the word.



            There are few other shortcuts listed below(working in Linux):




            1. Ctrl+e -> Takes cursor at the end of the word.


            2. Ctrl+t -> Inter-change the position of the alphabets.


            3. Ctrl+y -> adds postfix "hh" to current word.


            4. Ctrl+u -> same as "Ctrl+w".


            5. Ctrl+o -> Works same as Enter key.


            6. Ctrl+p -> Works same as up arrow button.


            7. Ctrl+a -> Brings cursor to the starting position of the command.


            8. Ctrl+d -> Closes terminal.


            9. Ctrl+f -> Moves cursor forward by one Character.


            10. Ctrl+h -> Works same as Backspace key.


            11. Ctrl+j -> Works same as Enter key.


            12. Ctrl+m -> Works same as Enter key.


            13. Ctrl+b -> Works same as Right-arrow key.





            share|improve this answer


















            • 2




              Ctrl+k deletes to the end of the line. Ctrl+u deletes the whole line (if the cursor is at the end). Ctrl+d sends EOF. Ctrl+e goes to the end of the line, etc.
              – Kusalananda
              Sep 25 '17 at 18:16











            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f394362%2fwhats-the-shortcut-to-delete-a-word-forward-in-a-unix-terminal%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            9
            down vote













            This depends on your shell and its active command line editing mode.



            For a shell with Emacs command line editing mode (set -o emacs in some shells), use Alt+d (this doesn't work on macOS for whatever reason, but prints the character ∂, use Escd instead).



            For a shell with Vi command line editing mode (set -o vi in some shells), use Escdw (this does work on macOS as well).






            share|improve this answer






















            • Only in zsh though does Meta-D delete the same type of word that Ctrl-W does (blank delimited ones). In bash in vi mode, you can use dW to delete those
              – Stéphane Chazelas
              Sep 25 '17 at 20:47











            • @StéphaneChazelas Yes, they (the two keycombos) have a different view of what constitutes a "word".
              – Kusalananda
              Sep 25 '17 at 20:51










            • You can check the "use option as meta" in the terminal Keyboard preferences to make it work.
              – Jozef Legény
              Jun 11 at 8:07














            up vote
            9
            down vote













            This depends on your shell and its active command line editing mode.



            For a shell with Emacs command line editing mode (set -o emacs in some shells), use Alt+d (this doesn't work on macOS for whatever reason, but prints the character ∂, use Escd instead).



            For a shell with Vi command line editing mode (set -o vi in some shells), use Escdw (this does work on macOS as well).






            share|improve this answer






















            • Only in zsh though does Meta-D delete the same type of word that Ctrl-W does (blank delimited ones). In bash in vi mode, you can use dW to delete those
              – Stéphane Chazelas
              Sep 25 '17 at 20:47











            • @StéphaneChazelas Yes, they (the two keycombos) have a different view of what constitutes a "word".
              – Kusalananda
              Sep 25 '17 at 20:51










            • You can check the "use option as meta" in the terminal Keyboard preferences to make it work.
              – Jozef Legény
              Jun 11 at 8:07












            up vote
            9
            down vote










            up vote
            9
            down vote









            This depends on your shell and its active command line editing mode.



            For a shell with Emacs command line editing mode (set -o emacs in some shells), use Alt+d (this doesn't work on macOS for whatever reason, but prints the character ∂, use Escd instead).



            For a shell with Vi command line editing mode (set -o vi in some shells), use Escdw (this does work on macOS as well).






            share|improve this answer














            This depends on your shell and its active command line editing mode.



            For a shell with Emacs command line editing mode (set -o emacs in some shells), use Alt+d (this doesn't work on macOS for whatever reason, but prints the character ∂, use Escd instead).



            For a shell with Vi command line editing mode (set -o vi in some shells), use Escdw (this does work on macOS as well).







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Sep 25 '17 at 20:34

























            answered Sep 25 '17 at 17:34









            Kusalananda

            106k14209327




            106k14209327











            • Only in zsh though does Meta-D delete the same type of word that Ctrl-W does (blank delimited ones). In bash in vi mode, you can use dW to delete those
              – Stéphane Chazelas
              Sep 25 '17 at 20:47











            • @StéphaneChazelas Yes, they (the two keycombos) have a different view of what constitutes a "word".
              – Kusalananda
              Sep 25 '17 at 20:51










            • You can check the "use option as meta" in the terminal Keyboard preferences to make it work.
              – Jozef Legény
              Jun 11 at 8:07
















            • Only in zsh though does Meta-D delete the same type of word that Ctrl-W does (blank delimited ones). In bash in vi mode, you can use dW to delete those
              – Stéphane Chazelas
              Sep 25 '17 at 20:47











            • @StéphaneChazelas Yes, they (the two keycombos) have a different view of what constitutes a "word".
              – Kusalananda
              Sep 25 '17 at 20:51










            • You can check the "use option as meta" in the terminal Keyboard preferences to make it work.
              – Jozef Legény
              Jun 11 at 8:07















            Only in zsh though does Meta-D delete the same type of word that Ctrl-W does (blank delimited ones). In bash in vi mode, you can use dW to delete those
            – Stéphane Chazelas
            Sep 25 '17 at 20:47





            Only in zsh though does Meta-D delete the same type of word that Ctrl-W does (blank delimited ones). In bash in vi mode, you can use dW to delete those
            – Stéphane Chazelas
            Sep 25 '17 at 20:47













            @StéphaneChazelas Yes, they (the two keycombos) have a different view of what constitutes a "word".
            – Kusalananda
            Sep 25 '17 at 20:51




            @StéphaneChazelas Yes, they (the two keycombos) have a different view of what constitutes a "word".
            – Kusalananda
            Sep 25 '17 at 20:51












            You can check the "use option as meta" in the terminal Keyboard preferences to make it work.
            – Jozef Legény
            Jun 11 at 8:07




            You can check the "use option as meta" in the terminal Keyboard preferences to make it work.
            – Jozef Legény
            Jun 11 at 8:07












            up vote
            0
            down vote













            For the tty line discipline, ^W deletes the previous white-space delimited word.



            In the vi editor in insert mode, ^W deletes backward to the start of the first sequence of alnums or non-alnums (on foo-+-bar.. baz, it first deletes baz, then .., then bar, then -+-, then foo).



            In the emacs editor, ^W deletes from the cursor position to the mark (the one you set with Ctrl+Space).



            Some line editors like readline (used by bash, gdb...), zle (used by zsh), pdksh's when in vi mode, behave like vi in that regard and when in emacs mode behave like the tty line discipline (not emacs).



            libedit (used by BSD shells or (optionally) dash), tcsh, AT&T ksh, in emacs mode, behave like emacs where ^W deletes to the mark (initially at the beginning of the buffer).



            For deleting a word forward, in the vi editor, you'd do it in command (normal) mode with dw to delete to the beginning of the next sequence of alnums or non-alnums (or the end of the line) and dW to delete to the next sequence of non-blanks (the pendant of the ^W of the tty line discipline).



            In the emacs line editor, Meta-D would delete to the end of the next sequence of alnum characters. The word motion operators (Meta-B, Meta-F) behave similarly.



            command line editors, when in vi mode, behave like vi, but in emacs mode, you have two main schools: the tcsh school and the ksh school.



            The ksh school (readline, ksh, yash) behaves mostly like emacs (fish's behaviour is slightly different in how it treats non-alnum, non-whitespace characters in both emacs and vi mode).



            In the tcsh school (tcsh, libedit, zsh), word motions are based on whitespace-delimited words so are consistent with the tty line discipline's ^W in that regard.



            In zsh, the behaviour is customizable with different word styles for all the word motion widgets.



            For readline, you can get the tcsh school (and have Meta-D delete the same kind of word as Ctrl-W does) by adding to your ~/.inputrc:



            set keymap vi-move
            "e[EMACS~": emacs-editing-mode
            set keymap emacs
            "e[VI~": vi-movement-mode
            "ed": "e[VI~dWe[EMACS~"
            "ef": vi-fWord
            "eb": vi-bWord


            Or on the other hand, align ^W to the other word motion widgets (behave like Meta-Backscape) with:



            set keymap emacs
            "C-W": backward-kill-word


            As to what the Meta key is, see there.






            share|improve this answer


























              up vote
              0
              down vote













              For the tty line discipline, ^W deletes the previous white-space delimited word.



              In the vi editor in insert mode, ^W deletes backward to the start of the first sequence of alnums or non-alnums (on foo-+-bar.. baz, it first deletes baz, then .., then bar, then -+-, then foo).



              In the emacs editor, ^W deletes from the cursor position to the mark (the one you set with Ctrl+Space).



              Some line editors like readline (used by bash, gdb...), zle (used by zsh), pdksh's when in vi mode, behave like vi in that regard and when in emacs mode behave like the tty line discipline (not emacs).



              libedit (used by BSD shells or (optionally) dash), tcsh, AT&T ksh, in emacs mode, behave like emacs where ^W deletes to the mark (initially at the beginning of the buffer).



              For deleting a word forward, in the vi editor, you'd do it in command (normal) mode with dw to delete to the beginning of the next sequence of alnums or non-alnums (or the end of the line) and dW to delete to the next sequence of non-blanks (the pendant of the ^W of the tty line discipline).



              In the emacs line editor, Meta-D would delete to the end of the next sequence of alnum characters. The word motion operators (Meta-B, Meta-F) behave similarly.



              command line editors, when in vi mode, behave like vi, but in emacs mode, you have two main schools: the tcsh school and the ksh school.



              The ksh school (readline, ksh, yash) behaves mostly like emacs (fish's behaviour is slightly different in how it treats non-alnum, non-whitespace characters in both emacs and vi mode).



              In the tcsh school (tcsh, libedit, zsh), word motions are based on whitespace-delimited words so are consistent with the tty line discipline's ^W in that regard.



              In zsh, the behaviour is customizable with different word styles for all the word motion widgets.



              For readline, you can get the tcsh school (and have Meta-D delete the same kind of word as Ctrl-W does) by adding to your ~/.inputrc:



              set keymap vi-move
              "e[EMACS~": emacs-editing-mode
              set keymap emacs
              "e[VI~": vi-movement-mode
              "ed": "e[VI~dWe[EMACS~"
              "ef": vi-fWord
              "eb": vi-bWord


              Or on the other hand, align ^W to the other word motion widgets (behave like Meta-Backscape) with:



              set keymap emacs
              "C-W": backward-kill-word


              As to what the Meta key is, see there.






              share|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote









                For the tty line discipline, ^W deletes the previous white-space delimited word.



                In the vi editor in insert mode, ^W deletes backward to the start of the first sequence of alnums or non-alnums (on foo-+-bar.. baz, it first deletes baz, then .., then bar, then -+-, then foo).



                In the emacs editor, ^W deletes from the cursor position to the mark (the one you set with Ctrl+Space).



                Some line editors like readline (used by bash, gdb...), zle (used by zsh), pdksh's when in vi mode, behave like vi in that regard and when in emacs mode behave like the tty line discipline (not emacs).



                libedit (used by BSD shells or (optionally) dash), tcsh, AT&T ksh, in emacs mode, behave like emacs where ^W deletes to the mark (initially at the beginning of the buffer).



                For deleting a word forward, in the vi editor, you'd do it in command (normal) mode with dw to delete to the beginning of the next sequence of alnums or non-alnums (or the end of the line) and dW to delete to the next sequence of non-blanks (the pendant of the ^W of the tty line discipline).



                In the emacs line editor, Meta-D would delete to the end of the next sequence of alnum characters. The word motion operators (Meta-B, Meta-F) behave similarly.



                command line editors, when in vi mode, behave like vi, but in emacs mode, you have two main schools: the tcsh school and the ksh school.



                The ksh school (readline, ksh, yash) behaves mostly like emacs (fish's behaviour is slightly different in how it treats non-alnum, non-whitespace characters in both emacs and vi mode).



                In the tcsh school (tcsh, libedit, zsh), word motions are based on whitespace-delimited words so are consistent with the tty line discipline's ^W in that regard.



                In zsh, the behaviour is customizable with different word styles for all the word motion widgets.



                For readline, you can get the tcsh school (and have Meta-D delete the same kind of word as Ctrl-W does) by adding to your ~/.inputrc:



                set keymap vi-move
                "e[EMACS~": emacs-editing-mode
                set keymap emacs
                "e[VI~": vi-movement-mode
                "ed": "e[VI~dWe[EMACS~"
                "ef": vi-fWord
                "eb": vi-bWord


                Or on the other hand, align ^W to the other word motion widgets (behave like Meta-Backscape) with:



                set keymap emacs
                "C-W": backward-kill-word


                As to what the Meta key is, see there.






                share|improve this answer














                For the tty line discipline, ^W deletes the previous white-space delimited word.



                In the vi editor in insert mode, ^W deletes backward to the start of the first sequence of alnums or non-alnums (on foo-+-bar.. baz, it first deletes baz, then .., then bar, then -+-, then foo).



                In the emacs editor, ^W deletes from the cursor position to the mark (the one you set with Ctrl+Space).



                Some line editors like readline (used by bash, gdb...), zle (used by zsh), pdksh's when in vi mode, behave like vi in that regard and when in emacs mode behave like the tty line discipline (not emacs).



                libedit (used by BSD shells or (optionally) dash), tcsh, AT&T ksh, in emacs mode, behave like emacs where ^W deletes to the mark (initially at the beginning of the buffer).



                For deleting a word forward, in the vi editor, you'd do it in command (normal) mode with dw to delete to the beginning of the next sequence of alnums or non-alnums (or the end of the line) and dW to delete to the next sequence of non-blanks (the pendant of the ^W of the tty line discipline).



                In the emacs line editor, Meta-D would delete to the end of the next sequence of alnum characters. The word motion operators (Meta-B, Meta-F) behave similarly.



                command line editors, when in vi mode, behave like vi, but in emacs mode, you have two main schools: the tcsh school and the ksh school.



                The ksh school (readline, ksh, yash) behaves mostly like emacs (fish's behaviour is slightly different in how it treats non-alnum, non-whitespace characters in both emacs and vi mode).



                In the tcsh school (tcsh, libedit, zsh), word motions are based on whitespace-delimited words so are consistent with the tty line discipline's ^W in that regard.



                In zsh, the behaviour is customizable with different word styles for all the word motion widgets.



                For readline, you can get the tcsh school (and have Meta-D delete the same kind of word as Ctrl-W does) by adding to your ~/.inputrc:



                set keymap vi-move
                "e[EMACS~": emacs-editing-mode
                set keymap emacs
                "e[VI~": vi-movement-mode
                "ed": "e[VI~dWe[EMACS~"
                "ef": vi-fWord
                "eb": vi-bWord


                Or on the other hand, align ^W to the other word motion widgets (behave like Meta-Backscape) with:



                set keymap emacs
                "C-W": backward-kill-word


                As to what the Meta key is, see there.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Oct 7 '17 at 6:19

























                answered Sep 25 '17 at 21:57









                Stéphane Chazelas

                284k53523860




                284k53523860




















                    up vote
                    -2
                    down vote













                    In Linux try Ctrl+k to delete from where the cursor is to the end of the word.



                    There are few other shortcuts listed below(working in Linux):




                    1. Ctrl+e -> Takes cursor at the end of the word.


                    2. Ctrl+t -> Inter-change the position of the alphabets.


                    3. Ctrl+y -> adds postfix "hh" to current word.


                    4. Ctrl+u -> same as "Ctrl+w".


                    5. Ctrl+o -> Works same as Enter key.


                    6. Ctrl+p -> Works same as up arrow button.


                    7. Ctrl+a -> Brings cursor to the starting position of the command.


                    8. Ctrl+d -> Closes terminal.


                    9. Ctrl+f -> Moves cursor forward by one Character.


                    10. Ctrl+h -> Works same as Backspace key.


                    11. Ctrl+j -> Works same as Enter key.


                    12. Ctrl+m -> Works same as Enter key.


                    13. Ctrl+b -> Works same as Right-arrow key.





                    share|improve this answer


















                    • 2




                      Ctrl+k deletes to the end of the line. Ctrl+u deletes the whole line (if the cursor is at the end). Ctrl+d sends EOF. Ctrl+e goes to the end of the line, etc.
                      – Kusalananda
                      Sep 25 '17 at 18:16















                    up vote
                    -2
                    down vote













                    In Linux try Ctrl+k to delete from where the cursor is to the end of the word.



                    There are few other shortcuts listed below(working in Linux):




                    1. Ctrl+e -> Takes cursor at the end of the word.


                    2. Ctrl+t -> Inter-change the position of the alphabets.


                    3. Ctrl+y -> adds postfix "hh" to current word.


                    4. Ctrl+u -> same as "Ctrl+w".


                    5. Ctrl+o -> Works same as Enter key.


                    6. Ctrl+p -> Works same as up arrow button.


                    7. Ctrl+a -> Brings cursor to the starting position of the command.


                    8. Ctrl+d -> Closes terminal.


                    9. Ctrl+f -> Moves cursor forward by one Character.


                    10. Ctrl+h -> Works same as Backspace key.


                    11. Ctrl+j -> Works same as Enter key.


                    12. Ctrl+m -> Works same as Enter key.


                    13. Ctrl+b -> Works same as Right-arrow key.





                    share|improve this answer


















                    • 2




                      Ctrl+k deletes to the end of the line. Ctrl+u deletes the whole line (if the cursor is at the end). Ctrl+d sends EOF. Ctrl+e goes to the end of the line, etc.
                      – Kusalananda
                      Sep 25 '17 at 18:16













                    up vote
                    -2
                    down vote










                    up vote
                    -2
                    down vote









                    In Linux try Ctrl+k to delete from where the cursor is to the end of the word.



                    There are few other shortcuts listed below(working in Linux):




                    1. Ctrl+e -> Takes cursor at the end of the word.


                    2. Ctrl+t -> Inter-change the position of the alphabets.


                    3. Ctrl+y -> adds postfix "hh" to current word.


                    4. Ctrl+u -> same as "Ctrl+w".


                    5. Ctrl+o -> Works same as Enter key.


                    6. Ctrl+p -> Works same as up arrow button.


                    7. Ctrl+a -> Brings cursor to the starting position of the command.


                    8. Ctrl+d -> Closes terminal.


                    9. Ctrl+f -> Moves cursor forward by one Character.


                    10. Ctrl+h -> Works same as Backspace key.


                    11. Ctrl+j -> Works same as Enter key.


                    12. Ctrl+m -> Works same as Enter key.


                    13. Ctrl+b -> Works same as Right-arrow key.





                    share|improve this answer














                    In Linux try Ctrl+k to delete from where the cursor is to the end of the word.



                    There are few other shortcuts listed below(working in Linux):




                    1. Ctrl+e -> Takes cursor at the end of the word.


                    2. Ctrl+t -> Inter-change the position of the alphabets.


                    3. Ctrl+y -> adds postfix "hh" to current word.


                    4. Ctrl+u -> same as "Ctrl+w".


                    5. Ctrl+o -> Works same as Enter key.


                    6. Ctrl+p -> Works same as up arrow button.


                    7. Ctrl+a -> Brings cursor to the starting position of the command.


                    8. Ctrl+d -> Closes terminal.


                    9. Ctrl+f -> Moves cursor forward by one Character.


                    10. Ctrl+h -> Works same as Backspace key.


                    11. Ctrl+j -> Works same as Enter key.


                    12. Ctrl+m -> Works same as Enter key.


                    13. Ctrl+b -> Works same as Right-arrow key.






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Sep 25 '17 at 20:58

























                    answered Sep 25 '17 at 17:50









                    Smshrimant

                    43




                    43







                    • 2




                      Ctrl+k deletes to the end of the line. Ctrl+u deletes the whole line (if the cursor is at the end). Ctrl+d sends EOF. Ctrl+e goes to the end of the line, etc.
                      – Kusalananda
                      Sep 25 '17 at 18:16













                    • 2




                      Ctrl+k deletes to the end of the line. Ctrl+u deletes the whole line (if the cursor is at the end). Ctrl+d sends EOF. Ctrl+e goes to the end of the line, etc.
                      – Kusalananda
                      Sep 25 '17 at 18:16








                    2




                    2




                    Ctrl+k deletes to the end of the line. Ctrl+u deletes the whole line (if the cursor is at the end). Ctrl+d sends EOF. Ctrl+e goes to the end of the line, etc.
                    – Kusalananda
                    Sep 25 '17 at 18:16





                    Ctrl+k deletes to the end of the line. Ctrl+u deletes the whole line (if the cursor is at the end). Ctrl+d sends EOF. Ctrl+e goes to the end of the line, etc.
                    – Kusalananda
                    Sep 25 '17 at 18:16


















                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f394362%2fwhats-the-shortcut-to-delete-a-word-forward-in-a-unix-terminal%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay