!! is substituted by the previous command, so you can just use sudo !! to re-run the command as sudo.
Also, 'readline' is a full-blown line editor and has keybindings that are very similar to emacs. C-a will move the cursor to the start of the line so you can add `sudo` easily that way too. See C-e, C-w, M-f and M-b as well.
There is C-r which allows you to type to search your history.
There's also C-x C-e to open the command line in your $EDITOR if you need to make heavy edits
Taking the time to learn your tools in depth can really save you a tonne of time in the long run.
I only ever use the up arrow key if I want to the previous command again as is (because it failed to due to an external error or something).
Not OP, but I do the same thing. I'd appreciate any solutions to the following reasons as to why I do this.
using grub
I couldn't easily find anything for systemd-boot that was as simple and reliable as grub-mkconfig with os-prober at finding my other bootable partitions.
using separate ESP and /boot
I wanted /boot on a btrfs partition so I could snapshot it, but EFI only runs on fat32 (I think?). I therefore mount a small fat32 partition onto /boot/efi to act as the ESP whilst keeping the majority of /boot snapshottable.
Linux Device Drivers is recommended as part of the Eudyptula Challenge for learning kernel driver development and I found it quite easy to follow. There's a whole chapter on the USB subsystem there as well.
I have been having issues with NetworkManager as well, it would initially connect fine, but after a few minutes I will no longer be able to visit any sites or ping any addresses. NetworkManager would still claim to be connected and there would be no errors in journalctl or dmseg.
I have removed NetworkManager and gone back to using a basic netctl config (use wifi-menu if you prefer) and have had no issues since.
It could be a bug in NetworkManager, but I haven't reported it yet. If this also works for you let me know and I'll post to their bug-tracker.
I had to the exact same thing! I usually use an external keyboard so didn't notice the built-in keyboard didn't work until long after I did a full system upgrade. I also had to downgrade a few packages before I found it was systemd...
!!is substituted by the previous command, so you can just usesudo !!to re-run the command as sudo.Also, 'readline' is a full-blown line editor and has keybindings that are very similar to emacs.
C-awill move the cursor to the start of the line so you can add `sudo` easily that way too. SeeC-e,C-w,M-fandM-bas well.There is
C-rwhich allows you to type to search your history.There's also
C-x C-eto open the command line in your$EDITORif you need to make heavy editsTaking the time to learn your tools in depth can really save you a tonne of time in the long run.
I only ever use the up arrow key if I want to the previous command again as is (because it failed to due to an external error or something).
Not OP, but I do the same thing. I'd appreciate any solutions to the following reasons as to why I do this.
I couldn't easily find anything for systemd-boot that was as simple and reliable as
grub-mkconfigwithos-proberat finding my other bootable partitions.I wanted /boot on a btrfs partition so I could snapshot it, but EFI only runs on fat32 (I think?). I therefore mount a small fat32 partition onto /boot/efi to act as the ESP whilst keeping the majority of /boot snapshottable.
Thoughts?
Linux Device Drivers is recommended as part of the Eudyptula Challenge for learning kernel driver development and I found it quite easy to follow. There's a whole chapter on the USB subsystem there as well.
It's available for free here
I have been having issues with NetworkManager as well, it would initially connect fine, but after a few minutes I will no longer be able to visit any sites or ping any addresses. NetworkManager would still claim to be connected and there would be no errors in journalctl or dmseg.
I have removed NetworkManager and gone back to using a basic netctl config (use wifi-menu if you prefer) and have had no issues since.
It could be a bug in NetworkManager, but I haven't reported it yet. If this also works for you let me know and I'll post to their bug-tracker.
I had to the exact same thing! I usually use an external keyboard so didn't notice the built-in keyboard didn't work until long after I did a full system upgrade. I also had to downgrade a few packages before I found it was systemd...
It was a very frustrating 20 minutes.