Another one related to braces that I find useful is, let's say you need to create 50 text files inside a folder for any reason, you could run: touch file{1..50}.txt, so in your example it could be: mkdir -p mydir2/dir{1..5}
Discovered recently the "^" trick, I already use some few ones, yet it's always a good thing to have a reminder and to discover another ! Thanks, great vid !
These tips are incredible! Here is a cool trick I use: As you may know, the pwd command returns the $PWD enviromental variable, but also there's a $OLDPWD variable that stores the previous directory the user was on. That one is parsed by "cd -", as shown on the video. With that, what you can do is use the trap command (or any another) to save $OLDPWD to a file upon exiting the shell session, and then restore it and change directory into it in initialization of new sessions (Note: $OLDPWD gets wiped on exiting). I personally configure those settings on my bash init scripts Hope someone finds it useful!
Great video, thank you so much. Some of the best things that helped me as well was having .inputrc file, makes using the shell must easier! like auto completion, history, and so on. This is my .inputrc file: cat .inputrc set completion-ignore-case on set show-all-if-ambiguous on set colored-completion-prefix on set colored-stats on "\e[3~": delete-char "\C-h": backward-delete-char "\C-?": backward-delete-char "\e[A": history-search-backward "\e[B": history-search-forward set skip-completed-text on set bell-style visible set show-all-if-unmodified on
Using Tmux is a great way to save time too and just fly through your work, when working on the terminal! I can't imagine working without tmux now 😂 Awesome video as always
Yep, all Tmux needs are three basic plugins resurrect, continuum and sensible for sessions to survive server reboots and community accepted basic config.
Not sure if I should be embarrassed, having never known these in my years of linux, or happy I know them now? I'll pick the latter. Please bring me part 2! ngl, !#: is likely to save me tons of headache
Thanks for teaching some tricks, I knew about !! and ctrl-l; but that the !:1 or cd -. Oh ya, instead of cd there is also z (zoxide). Instead of nano text editor there is micro text editor which is easy to use; I just wish LSP client worked on it so you get parameter hints when programming.
I've been using bash since 2000, and some variant of the Bourne shell since the early 90s, though I've never been a power user, and several of these were new to me. I've been using Emacs-style motion/editing key bindings for so long that I could not live without them now. In addition to C-a (control+a), C-e, C-w, and C-k, there's also M-b ("Meta b" = alt+b) to move backward one word, M-f = forward word, M-d to kill (cut) the word to the right, C-y to yank (paste) the thing you most recently killed (cut), M-y to cycle through the kill ring, i.e., successively paste all the things you cut in previous steps......etc.
It makes sense to set bindings to whatever you're already used to - far faster to take a few minutes to set up, than to try to commit new motions to memory. I'll likely make some additional videos going over more common shortcuts and tricks for shell. Thanks for commenting!
@@BreadOnPenguins I often fail at remembering key bindings I rarely need. The simple solution is e.g. a shell function "h" which prints a short help text (whatever you need) or a static key binding: If I press F1 in my bash then readline inserts and executes this dummy command: start cmd:> : " cont. cmd:> # set-mark (C-^ SPACE) cont. cmd:> # exchange-point-and-mark (C-^ x) cont. cmd:> # kill-region (-) cont. cmd:> # complete-filename (M-/) cont. cmd:> # complete-username (M-) cont. cmd:> # complete-variable (M-$) cont. cmd:> # complete-hostname (M-@) cont. cmd:> # tilde-expand (M-&) cont. cmd:> # history-expand-line (M-) cont. cmd:> # glob-list-expansions (C-^ l) cont. cmd:> # shell-expand-line (M-C-e) cont. cmd:> # edit-and-execute-command (C-^ e)"
-heard something about uparrow for previous cmd. Ctrl-p for cycling backwards through history is a bit more convenient for lazy people like me who doesnt want to move my hand so much. By far most used daily is ctrl-r for backwards cmd search and alt-dot for cycling through last arguments on prev cmds. Can also use for instance holding down alt through pressing 3 and dot for 3rd arg on prev cmd line. Instead of the version with typing it out with ! Colon etc
Thanks! Recently I've just been looking up landscapes from painters I like. But in general, everything from gallery sites to stock sites to /wg/ Artist & title is in the description :)
hello, how did you change terminal theme and color and font? and what is the desktop enviorment? is it xfce4? can you make a video about this , please? it is very beautifull
Hello, my terminal is st, and default font and colors are set in its config. I actually use pywal for dynamic colorscheme generation though. I've several videos about how I configure my window manager! It's dwm, with dwmblocks for status bar :-)
in my .bashrc file i've placed `set -o vi` to enable vim bindings for command line editing. It defaults to insert mode so you don't notice it unless you tap esc and go to command mode where you now have vi to edit the lines or move up and down in history.
Came here from the distrotube recommendation video. Great content. Now I'm off to bork these shortcuts and accidentally copy some pictures into my systemd service directory. :)
Hello, I use ffmpeg for recording, virtually no editing but splicing scripts if ever needed, and I've actually made a video talking about image editing programs. :-)
So cool! I can't tell you how many times I have wanted to cd to the dir I was just in and manually typing out the path multiple times to go back and forth or hope my history has a recent cd to that dir. Now I can just cd - like a wizard. (∩`-´)⊃━☆゚.*・。゚
To get to your home directory you don't actually need to put the tylda there, just run cd with no arguments And also you can use the "-" trick with git switch, very useful if you have long branch names
How can I actually search back in the history for a command that starts with a particular prefix? For example, I want to find a previous cd command, but I don't want the last cd command. I can only use the up key to go through all commands in the history. I want a way to show only commands that start with cd when I press the up key.
In bash / readline you can do this: # : non-incremental search for the same beginning of a command line bind '"\e[5~":history-search-backward' # : non-incremental search for the same beginning of a command line bind '"\e[6~":history-search-forward' Typing "cd ......" then scrolls forth and back through all history entries which start with "cd "
I hope you are doing well, I need just to learn Linux Terminal to use in Windows I already set up the WSL with ubuntu, How can N learn using the linux terminal in windows, could you provide me with a road map or a book or a full detailed palylist.
Hello, likewise! I've made several videos covering an intro to the Bash shell, if that's what you'll be using :-) If you're trying to learn scripting, I've found the book "bash Cookbook" to be helpful.
No worries, I'm using Arch with dwm (dynamic window manager), and dwmblocks for my status bar. I've got a couple videos going over my setup as well as a long Arch install guide :)
I made a video going over basics of dwm, and why I prefer tiling WMs - title starts with Arch+dwm But for a tl;dr, dwm is very minimal out-of-the-box, and allows for complete customization with patches. I prefer that approach, since you don't end up with any extra features you don't need. So I'd definitely recommend it if you're ready to get your hands dirty with setting up a WM :)
just gonna be straight up honest now. I've usenvim for the past 4 months, and I'd like to say I'm not particuarly inapable. this video has left my jaw gaping open. I feel like an idiot. thank you, finlly"
Part 2 is here: ruclips.net/video/c0Q887QsiJU/видео.html&lc
Learned a couple things, definitely!
Awesome, glad to hear!
This is fantastic, definitely helpful.
I'll share these ones with my peers.
Much appreciated 👍🏽
Glad to hear! :-)
Another one related to braces that I find useful is, let's say you need to create 50 text files inside a folder for any reason, you could run: touch file{1..50}.txt, so in your example it could be: mkdir -p mydir2/dir{1..5}
Thanks for mentioning! :)
Discovered recently the "^" trick, I already use some few ones, yet it's always a good thing to have a reminder and to discover another !
Thanks, great vid !
Glad to hear! always more to learn :)
Thanks!
I use linux since 2017 and you make me feel I've been using it for couple weeks
There's always more to learn, every so often I read or see something that makes me feel the same haha
Very cool tips. Been watching your catalog, great stuff! Wish you all the best.
Thanks so much! :-)
These tips are incredible!
Here is a cool trick I use:
As you may know, the pwd command returns the $PWD enviromental variable, but also there's a $OLDPWD variable that stores the previous directory the user was on. That one is parsed by "cd -", as shown on the video. With that, what you can do is use the trap command (or any another) to save $OLDPWD to a file upon exiting the shell session, and then restore it and change directory into it in initialization of new sessions (Note: $OLDPWD gets wiped on exiting). I personally configure those settings on my bash init scripts
Hope someone finds it useful!
Thanks for sharing! That's actually a very good idea, I might use that myself :)
DT sent me. Nice channel. Subbed. Good luck!
Thank you! I appreciate it :-)
Great video, thank you so much. Some of the best things that helped me as well was having .inputrc file, makes using the shell must easier! like auto completion, history, and so on.
This is my .inputrc file: cat .inputrc
set completion-ignore-case on
set show-all-if-ambiguous on
set colored-completion-prefix on
set colored-stats on
"\e[3~": delete-char
"\C-h": backward-delete-char
"\C-?": backward-delete-char
"\e[A": history-search-backward
"\e[B": history-search-forward
set skip-completed-text on
set bell-style visible
set show-all-if-unmodified on
Thanks very much for sharing! I'll likely make a vid talking about setting up rc files
Using Tmux is a great way to save time too and just fly through your work, when working on the terminal! I can't imagine working without tmux now 😂
Awesome video as always
I'll have to cover tmux, definitely one of those must-know-about programs. Thanks! :)
Yep, all Tmux needs are three basic plugins resurrect, continuum and sensible for sessions to survive server reboots and community accepted basic config.
Yup this, and switching some keybinds from ctrl+b to like ctrl+a and switching panes with ctrl+arrow keys was mind blowing when I added this lol
Nice tips, thanks. I'm saving this video until I get home and experience some of these shortcuts myself.
Awesome, have fun with the shortcuts!
that last command one is sick, will definitely use it
Awesome! :-)
Awesome tips! I've been using Linux since 2001 and didn't know about the args tricks you showed, wow! You rock.
Thanks! Glad I was able to show even a seasoned user something new.
Even tho i have been using Linux for only 3 months Im very happy to see some new Linux content creators! Great Video, keep going :] !
Welcome to Linux! Thanks so much - will do :)
Kick ass video and channel, you came outta nowhere and drop content like nobody's business!
Thanks so much!
. ...is this the Hyprland experience video? . ...you are saving years of lifespan with all this magic.
Great video! I’m in for more tips ‘n’ tricks videos.
Thanks! Awesome 👌
yayyy I learned something. Forgot about ^replace^. Woooo good video hehe ^_^
Awesome glad to hear! :) Tysm
Cool tools! Thanks.
new sub here, coming from dt video, keep it up!
Hey thanks for checking out my channel! I really appreciate it - will do :)
"Yer a wizard, Bready!" 😑 Sorry.. Informative as always. Also I really love your wallpapers!
Lol I suppose I had that one coming
Thanks!
Not sure if I should be embarrassed, having never known these in my years of linux, or happy I know them now?
I'll pick the latter. Please bring me part 2! ngl, !#: is likely to save me tons of headache
Definitely the latter! I frequently learn things that make me question how I didn't know them before :)
Will do!
Simple and useful, great video.
Thanks! 👍
Thanks for teaching some tricks, I knew about !! and ctrl-l; but that the !:1 or cd -. Oh ya, instead of cd there is also z (zoxide). Instead of nano text editor there is micro text editor which is easy to use; I just wish LSP client worked on it so you get parameter hints when programming.
No problem. I might check out zoxide for a vid at some point. Thanks for commenting!
Hi, I'm sure this is great video, but i really write to say that thumbnail look very cute. Thank you for great work on those materials
Thank you! That's very nice of you to say :)
I've been using bash since 2000, and some variant of the Bourne shell since the early 90s, though I've never been a power user, and several of these were new to me. I've been using Emacs-style motion/editing key bindings for so long that I could not live without them now. In addition to C-a (control+a), C-e, C-w, and C-k, there's also M-b ("Meta b" = alt+b) to move backward one word, M-f = forward word, M-d to kill (cut) the word to the right, C-y to yank (paste) the thing you most recently killed (cut), M-y to cycle through the kill ring, i.e., successively paste all the things you cut in previous steps......etc.
It makes sense to set bindings to whatever you're already used to - far faster to take a few minutes to set up, than to try to commit new motions to memory.
I'll likely make some additional videos going over more common shortcuts and tricks for shell.
Thanks for commenting!
Same but I keep forgetting Meta, not Ctrl cus I don't use 'em a lot.
@@BreadOnPenguins I often fail at remembering key bindings I rarely need. The simple solution is e.g. a shell function "h" which prints a short help text (whatever you need) or a static key binding: If I press F1 in my bash then readline inserts and executes this dummy command:
start cmd:> : "
cont. cmd:> # set-mark (C-^ SPACE)
cont. cmd:> # exchange-point-and-mark (C-^ x)
cont. cmd:> # kill-region (-)
cont. cmd:> # complete-filename (M-/)
cont. cmd:> # complete-username (M-)
cont. cmd:> # complete-variable (M-$)
cont. cmd:> # complete-hostname (M-@)
cont. cmd:> # tilde-expand (M-&)
cont. cmd:> # history-expand-line (M-)
cont. cmd:> # glob-list-expansions (C-^ l)
cont. cmd:> # shell-expand-line (M-C-e)
cont. cmd:> # edit-and-execute-command (C-^ e)"
nice, more videos like this plz :D
Will do! :-)
Not sure if this was mentioned, but alt+. is a handy way of quickly retrieving the argument from the last command.
Thanks for mentioning!
zoxide and yazi are the greatest timesavers for me
Thanks for mentioning! I'll probably make a vid about zoxide at some point :)
-heard something about uparrow for previous cmd. Ctrl-p for cycling backwards through history is a bit more convenient for lazy people like me who doesnt want to move my hand so much. By far most used daily is ctrl-r for backwards cmd search and alt-dot for cycling through last arguments on prev cmds. Can also use for instance holding down alt through pressing 3 and dot for 3rd arg on prev cmd line. Instead of the version with typing it out with ! Colon etc
Thanks for commenting - that's a fair point! I'll be making a part 2 to this video soon, so I'll include those tips
new vid bros lets go, happy halloween btw
Happy Halloween 🎃
Bread is awesome
🍞 💯
Yay another bread video!🎉
🥳🥳
great
Great videos, where do you get your wallpapers from though? Love them
Thanks! Recently I've just been looking up landscapes from painters I like. But in general, everything from gallery sites to stock sites to /wg/
Artist & title is in the description :)
You forgot $_ and co mate, now you gotta make another video on this
True plenty more to cover, I'll definitely make a part 2 lol
Love these videos! 🙂 I have my sudo !! aliased as "f*ck"
Thank you! Haha fair enough
hello, how did you change terminal theme and color and font?
and what is the desktop enviorment? is it xfce4?
can you make a video about this , please? it is very beautifull
Hello, my terminal is st, and default font and colors are set in its config. I actually use pywal for dynamic colorscheme generation though.
I've several videos about how I configure my window manager! It's dwm, with dwmblocks for status bar :-)
in my .bashrc file i've placed `set -o vi` to enable vim bindings for command line editing. It defaults to insert mode so you don't notice it unless you tap esc and go to command mode where you now have vi to edit the lines or move up and down in history.
Great setting if you find vim bindings easier to use. Thanks for mentioning!
Came here from the distrotube recommendation video. Great content. Now I'm off to bork these shortcuts and accidentally copy some pictures into my systemd service directory. :)
Thanks so much for checking out my channel! Hahaha it happens
What do you use to make your videos? I mean screen recording, editing, making thumbnails, etc
Hello, I use ffmpeg for recording, virtually no editing but splicing scripts if ever needed, and I've actually made a video talking about image editing programs. :-)
@ Ahh I see. Thank you for your reply. Could you some time perhaps make a video on ffmpeg, and also those scripts?
@@ishak_arif Sure I can do that at some point :)
So cool! I can't tell you how many times I have wanted to cd to the dir I was just in and manually typing out the path multiple times to go back and forth or hope my history has a recent cd to that dir. Now I can just cd - like a wizard. (∩`-´)⊃━☆゚.*・。゚
To get to your home directory you don't actually need to put the tylda there, just run cd with no arguments
And also you can use the "-" trick with git switch, very useful if you have long branch names
Thanks for mentioning both of those!
The real trick for handling directory changes is pushd / popd (in bash)
Penguins have a unique feather structure that helps to keep them warm in cold water
They have blubber, too! Especially given the regions many species are in, they really have to stay warm lol
Without any arguments passed, cd will always take you back to home. So the tilde in "cd ~" isn't necessary.
That's true - bad habit, but I've luckily dropped it. That's one of the first things covered in my pt2 of this vid :-)
Watching this from the term rn 🗿
Chad
How can I actually search back in the history for a command that starts with a particular prefix? For example, I want to find a previous cd command, but I don't want the last cd command. I can only use the up key to go through all commands in the history. I want a way to show only commands that start with cd when I press the up key.
You can use ctrl + R (that's the default at least) and then search. Far better searching experience if you install fzf (fuzzy finder) as well :)
In bash / readline you can do this:
# : non-incremental search for the same beginning of a command line
bind '"\e[5~":history-search-backward'
# : non-incremental search for the same beginning of a command line
bind '"\e[6~":history-search-forward'
Typing "cd ......" then scrolls forth and back through all history entries which start with "cd "
I hope you are doing well, I need just to learn Linux Terminal to use in Windows I already set up the WSL with ubuntu, How can N learn using the linux terminal in windows, could you provide me with a road map or a book or a full detailed palylist.
Hello, likewise! I've made several videos covering an intro to the Bash shell, if that's what you'll be using :-) If you're trying to learn scripting, I've found the book "bash Cookbook" to be helpful.
Noob question but what version of linux is this? It looks so clean i want it lol
No worries, I'm using Arch with dwm (dynamic window manager), and dwmblocks for my status bar.
I've got a couple videos going over my setup as well as a long Arch install guide :)
what do you use for that output for mv and cp
It's just an alias for forcing mv & cp to use the -iv flag, set up in the shell config
cp="cp -iv"
mv="mv -iv"
:)
How's that wm? Kinda done with full DEs
I made a video going over basics of dwm, and why I prefer tiling WMs - title starts with Arch+dwm
But for a tl;dr, dwm is very minimal out-of-the-box, and allows for complete customization with patches. I prefer that approach, since you don't end up with any extra features you don't need. So I'd definitely recommend it if you're ready to get your hands dirty with setting up a WM :)
@ awesome thanks, I'll check out that video
just gonna be straight up honest now. I've usenvim for the past 4 months, and I'd like to say I'm not particuarly inapable. this video has left my jaw gaping open. I feel like an idiot. thank you, finlly"
Well I'm glad you learned something from the vid! :D
i thought i was the only one that aliases v as neovim, happy to hear other people do that too.
💯 The shorter and easier an alias, the better
I bet Luke SMITH found her during his trip to eastern europe
He tough her linux and english
Zsh ? Rookie mistake