Become a shell wizard in ~12 mins

2024 ж. 5 Ақп.
204 756 Рет қаралды

In this video we're running through all the important things you need to know in order to get comfortable using the shell and see how you can compose commands together to build out super handy chains that'll save you a lot of time.
#terminal #linux #bash

Пікірлер
  • Underrated, it's just amazing how serene and concise this video is

    @scrapp706@scrapp7063 ай бұрын
    • Hey, thanks!

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
    • Just taught me more than a $1000 uni course I took which was supposed to be about linux. It had a week or two about cli commands but was poorly taught. Uni of Toronto btw

      @skyhappy@skyhappy3 ай бұрын
  • ASMR: shell commands to fall asleep to

    @StiekemeHenk@StiekemeHenk2 ай бұрын
  • At college, I was forced to learn about shell scripting, but after using Linux for more than half a year, I am enjoying every bit of it. I am still learning about shell scripting.

    @suborno9249@suborno92492 ай бұрын
  • I listen to this every evening to fall asleep in peace

    @t00nfish@t00nfish3 ай бұрын
    • It's very soothing!

      @YarPirates-vy7iv@YarPirates-vy7iv3 ай бұрын
    • This is sooo smart thank you for the idea 🎉

      @SonicJ2@SonicJ23 ай бұрын
    • Oh. So you’re saying this is not a chapter from an audiobook? 😕

      @claudiamanta1943@claudiamanta1943Ай бұрын
    • @@claudiamanta1943 It's from Harry Potter and the Command Line of Doom

      @YarPirates-vy7iv@YarPirates-vy7ivАй бұрын
  • 0:28 shell/terminal/console/command line terminology 0:47 ls (list) 1:19 cd (current directory) 1:22 pwd (path to working directory) 1:26 echo 1:30 cat (concatenate) 1:33 touch 1:41 cp (copy) 1:47 mv (move) 1:51 convention 2:02 rm (remove) 2:24 ln (link) 2:35 less 2:50 more 2:56 man (manual) 3:27 grep (global regular expression print) (find strings) 3:36 find (find files/dir) 3:47 sed (stream editor) (find and replace text) 4:25 awk (extract text data) 4:43 sort 4:55 head, tail 5:12 piping, pipe operator < | > 5:46 xargs (split input into chunks and pass as arguments) 6:07 running subshells < $( ) > 6:32 redirection < > > 6:47 appending < >> > 6:54 file content into stdin < < > 7:04 fzf (fuzzy finder) 7:24 compgen - c (lists all cmds) 7:31 Lots of useful command combinations 11:55 key takeaways

    @sleepybraincells@sleepybraincellsАй бұрын
    • Pin this please

      @blackaccel@blackaccelАй бұрын
    • Thanks

      @somerandomguy001@somerandomguy001Ай бұрын
    • this definitely needs to be pinned

      @ArnabGhosh-wi7pv@ArnabGhosh-wi7pv18 күн бұрын
  • first time I see someone make working with CLI look aesthetic and easy. Beautiful video

    @kmk20219@kmk202193 ай бұрын
    • Thanks!

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
    • solace?

      @nangu8896@nangu88963 ай бұрын
    • Alright cool , let me add fzyyyy to improve everything

      @ValidUserName-fl3uh@ValidUserName-fl3uh3 ай бұрын
  • Worth mentioning Ctrl-R as well for hotkeys. That fzf man alias is really cool

    @slayerxyz0@slayerxyz03 ай бұрын
  • The xargs command section was really good! Something as simple as aliasing 'logs' to open a fzf with all your docker containers and choose one to check the logs for is just so useful

    @Rikaisan@Rikaisan2 күн бұрын
  • Well that escalated quickly.

    @chyldstudios@chyldstudios3 ай бұрын
    • Who gave you privilege to crack that joke?

      @ryancrosby3043@ryancrosby304312 күн бұрын
  • After watching this, it feels like you can do anything with the shell. Then you find yourself needing something like "pipe into a text file, but prepend instead of append", and it turns out you need to use four commands, invoke a function, write a formal proposal, and make a pilgrimage to Dennis Ritchie's final resting place on a moonless night and chant incantations from dusk to dawn to do it.

    @AzinFiro@AzinFiro2 ай бұрын
    • Haha yeah that is the sad truth. When you're within the bounds of what the shell and coreutils are good at everything is nice and simple. But once you step outside of that, it quickly feels impossibly complex.

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING2 ай бұрын
  • Goes from newbie to advanced real quick! I use the terminal a lot as a software engineer, but this taught me a couple things and I feel like I understand some things better.

    @BobbyMully@BobbyMully3 ай бұрын
    • This is all pretty basic stuff for most *nix natives, presented excellently though!

      @liamkearn@liamkearn11 күн бұрын
  • Awesome and comprehensive video showing off the true capabilities of a good shell user. I realize literally everything people see, is a text doc

    @BenjaminGrec@BenjaminGrecАй бұрын
  • probably the best video on overview of shell commands that ive seen so far

    @user-il7oz8jr7x@user-il7oz8jr7x3 ай бұрын
  • I just become death destroyer of the terminal world!!

    @HopeUnveiled@HopeUnveiled3 ай бұрын
  • Very useful video 🎉 For some reason I didn't know about `Ctrl+X` + `Ctrl+E` to edit a multi-line cmd -- that is so cool and definitely needed :D

    @jhtaljaard@jhtaljaard5 күн бұрын
  • Low sub channel + quality content like this = instant subscribe

    @mechwarrior83@mechwarrior833 ай бұрын
  • fzf is really cool, gonna use it way more often from now on The only thing that I wish you'd also mention is how you can manipulate history too. Let's say you've done cat on some file with long path, and now you want to copy it. Instead of cp . you can do cp !!:1 . which will use first argument from latest command in history as argument. Also, cd (just cd, with no arguments) will send you to home directory and cd - will send you to previous directory.

    @Calslock@CalslockАй бұрын
  • The Ctrl-X Ctrl-E to edit command in $EDITOR is actually very very useful! Thanks for telling us that!

    @miigon9117@miigon91173 ай бұрын
  • One of the finest videos ever made for the shell enthusiast, kudos to u man, eagarly awaiting for more !!!!!

    @danydanger@danydanger3 ай бұрын
  • I never thought the shell could be relaxing but you have done it. Good work.

    @cobraflunkie@cobraflunkie3 ай бұрын
  • FZF is the tool I didn't know I needed.

    @demolazer@demolazer2 ай бұрын
    • I’m addicted to it

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING2 ай бұрын
  • really useful video. I am using bash for a few years now, and only recently i am starting to realize how powerful the pipe command is

    @ArnabGhosh-wi7pv@ArnabGhosh-wi7pv18 күн бұрын
  • Perfect content, helpful and calm, thanks. Seeing how someone uses tools is so helpful as I learn to use them.

    @PatrickBrentlinger@PatrickBrentlinger3 ай бұрын
  • Impressed that you introduced me to a couple of commands I was not aware of and I pride myself in writing one liners that wrap 3 lines. Specifically `compgen` and `fd`. The latter of course written by the same fellow who's created `bat` which is wonderful replacement for `cat`. Another interesting way to use `xargs` is by inserting the output in a specific location in a command. e.g. $ aws ecs list-clusters | rg blah | cut -d / -f 2 | tr -d '",' | xargs -n1 -I{} aws ecs describe-services --services {} --cluster {} One I use fairly often while writing a long command where I need to switch to looking something else up is prepending the command with a `#` and hitting return, it parks the command as a comment which you can go back to editing but doesn't execute anything when initially entered. Try this in a chromium based browser with a ton of tabs open... `cmd + shift + a`... start typing the title of what you are looking for ;)

    @Torqu3e@Torqu3e3 ай бұрын
    • didn't know you could do that with xargs, very cool!

      @alicewyan@alicewyan3 ай бұрын
  • Great fzf examples, thank you so much!

    @sevos@sevos3 ай бұрын
  • Bat instead of less works amazing too (great colour output)

    @JavierHarford@JavierHarford3 ай бұрын
    • another good one is moar

      @m4rt_@m4rt_3 ай бұрын
    • bat, eza, fd, ripgrep, dust are all great

      @wetfloo@wetfloo3 ай бұрын
    • @wetfloo a man of culture 🏆

      @JavierHarford@JavierHarford3 ай бұрын
  • I am a self proclaimed shell wizard and learning sed can use any delimiter has blown my mind

    @MrVampify@MrVampify26 күн бұрын
    • That one is definitely a game changer.

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING26 күн бұрын
  • Nice, really liked the concise explanations for the basic commands

    @Fonzie2909@Fonzie29093 ай бұрын
  • Have been looking for this exact type of vid now for sometime now. Thank you it was done very well. The final wrap up at the end was perfect.

    @willd0g@willd0g20 күн бұрын
  • Wow, I thought I knew stuff in the terminal until watching this video xD. Thank you so much for sharing your knowledge with us, I'll make sure to implement this tips in my workflow

    @Redyf@Redyf25 күн бұрын
  • Explained more and better in 12 minutes than our teachers in a whole semester.

    @Hersatz@Hersatz3 ай бұрын
  • This is such a high quality video! It starts off great with some introductory concepts, but then accelerates at a great pace and shows how to put things together. Really was great for someone like myself who is comfortable in the shell but looking to level up. C-x C-e was literally a paradigm shift for me, and has changed how I interact with the terminal. Thanks for the awesome video, looking forward to more great content!

    @thewadegreen@thewadegreen3 ай бұрын
  • Thank you so much for bringing fzf to my attention! Just the type of tool I've always wanted but never knew existed.

    @demidevil666@demidevil6662 ай бұрын
  • Yeah, the biggest tip is to not try to remember everything. You naturally memorize things you use frequently, and for everything else, that's what documentation is for. On that note, / and ? are very important keybinds for many text viewers, as they let you search forwards and backwards. Very useful for finding relevant parts of manuals.

    @icantcomeupwithnames469@icantcomeupwithnames469Ай бұрын
  • Voice + command techniques + explanations are superb.❤

    @cognishn@cognishn23 күн бұрын
  • Most useful $SHELL video EVER! I learned so much.

    @dameonb4586@dameonb45863 ай бұрын
  • I like the calming background music. Kept me from uncontrollably breaking down and taking pepto again

    @user-ii4el6co5t@user-ii4el6co5t2 ай бұрын
  • Great video! I already know quite a bit about the CLI, but the fzf tool is super cool!! Will definitely use thanks a ton!

    @jjones3705@jjones37053 ай бұрын
  • excellent content and delivery. this was incredibly executed. Subbed

    @OneManCanStopTheMotorOfWorld@OneManCanStopTheMotorOfWorld3 ай бұрын
  • I've been messing around with shell for almost 4 years now, I really love the power and flexibility of it, it's really powerful

    @rodricbr@rodricbr3 ай бұрын
  • Awesome video. Loved it. One of my favourite is 'seq'. Prints out a sequence of numbers. Handy and fast. Also one dirty trick to go to your home directory is only typing 'cd' and hitting enter. No need add ~.

    @deepkirdat5724@deepkirdat57243 ай бұрын
  • Thanks for the useful info! It was awesome seeing the count of monte cristo being used for some examples, its my favourite book.

    @yashbijlani6652@yashbijlani66523 ай бұрын
    • Im glad to hear it! It’s my favorite book too.

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
  • You...., wizard...., has a new worshipper. Me is, from now on, following your magic.

    @wazuma@wazuma3 ай бұрын
  • This is great, I’ve been using unix shell scripting a while but not wholeheartedly so haven’t really learnt it properly because i have extensive knowledge of powershell, even to the extent that install powershell on Mac and use it. But I realise that all the funky and fancy stuff in ps, I can do in way less code and probably more so just using the unix approach. Fzf is just fantastic and so is this video, you have given me inspiration to go head first into unix shell scripting so thanks 💪

    @dawnrazor@dawnrazor3 ай бұрын
  • Great video ! Btw in your node_module cleanup command you could put 2 inside the bracket of your cat command to get only the second part of the entry and not trying to cat the size of the folder like such: fd 'node_modules' -HIt d | xargs du -sh | sort -hr | fzf -m --header "Select which ones to delete" --preview 'cat $(dirname {2})/package.json' | awk '{print $2}' | xargs -r rm -rf

    @alecsandroo7@alecsandroo73 ай бұрын
  • Great video PLUS.The music is very relaxing.

    @I_Am_McZee@I_Am_McZeeАй бұрын
  • I know I've used tail before when I needed to iter over a very large dir with an unknown amount of empty folders which would break another workflow. Amazing how fast it ran, just recursing through each level and nuking every empty dir it came across

    @JetJockey87@JetJockey873 ай бұрын
  • My line editing became a lot less painful once I figured out I could use the emacs bindings on it. Also, I didn’t know about c-x,c-e which in retrospect makes a lot of sense. Thanks for teaching me something

    @driden1987@driden19873 ай бұрын
  • Great information and nice background noice. Helps you concentrate. Thanks for this. I hope you do many more videos on Linux!

    @petrisss2047@petrisss20473 ай бұрын
  • Holy crap. I learned some cool new tricks. Thank you. I was really skeptical at first.

    @Markadown@MarkadownАй бұрын
  • Nice video. I've been using Linux for 30 years and learned some new commands, such as fzf. One thing I would add is the tac command. It's cat but in reverse, which is sometimes handy

    @KerboOnYT@KerboOnYT2 ай бұрын
  • man works mostly only for coreutils, but not things like ripgrep, fd, fzf, jq etc, coz they don't usually provide it. So if you don't wanna google and your use case is trivial you could install tldr so it would provide some quick use examples. some OSes are POSIX compatible, but their commands could have different set of argument options. Same idea with subshell syntax, as well as advanced redirections. Also, if you forgot how to zip or unzip things using tar you can use mnemonic called "german voice" Compress Ze File -> tar -czf eXtract Ze File -> tar -xzf

    @DeathSugar@DeathSugar3 ай бұрын
    • Amazing, I had never heard of the german voice mnemonic, but that is perfect.

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
    • @@CODE_IS_EVERYTHING seen it on Tweet shot back in a day, remember it since

      @DeathSugar@DeathSugar3 ай бұрын
    • Why shouldn't man work for ripgrep, fd, fzf, etc? All those examples you listed work with man for me. "man rg", "man fzf", "man fd", "man jq"

      @hypnogri5457@hypnogri54573 ай бұрын
    • @@hypnogri5457 because man uses specially formated text files located at certain places (man man can clarify the detes). When you install it from apt, aur, pacman or whatever else they usually do not provide those text files, so your only documentation located in under --help argument. So if it's works for you then someone made them for your OS distro.

      @DeathSugar@DeathSugar3 ай бұрын
    • @@DeathSugar thank you

      @hypnogri5457@hypnogri54573 ай бұрын
  • Damn, I thought the video might be too basic for me but I have never seen fzf being used like that. Love it.

    @petersansgaming8783@petersansgaming87832 ай бұрын
  • this is absolutely a gem :) thank you for the video and learning us nice stuff, you just got a new subscriber

    @richizzz1@richizzz13 ай бұрын
  • Great format, pleasing voice

    @avi7278@avi72783 ай бұрын
  • Been working in cli server for 2, years and I knew every command. I'd like to add 'history | grep "whatever"' for when you'd reuse some complex commands.

    @SuperMutantSomething@SuperMutantSomething3 ай бұрын
  • linux shadow wizard money gang

    @Rundik@Rundik2 ай бұрын
  • shell wizard money gang we love casting shells

    @user-uz6gd5oy8t@user-uz6gd5oy8t3 ай бұрын
  • I was trying to find a vid like this for a while now haha. Thank u 😁

    @rigbymama8436@rigbymama84363 ай бұрын
  • So useful. Awesome video thank you

    @BruceAlmighty1@BruceAlmighty126 күн бұрын
  • Man this video is relaxing

    @perfect.stealth@perfect.stealth2 күн бұрын
  • That fzf is amazing.

    @gabereiser@gabereiser3 ай бұрын
  • Pretty concise, subscribed!

    @francis3603@francis36033 ай бұрын
  • Thanks for posting this!

    @RedPorch@RedPorchАй бұрын
  • An alternative to that funky kubectl command would be using k9s. A dog themed terminal controller for kubernetes

    @oblivion_2852@oblivion_285225 күн бұрын
  • Great video, hope you make more!

    @dooza@dooza3 ай бұрын
  • if you think awk is confusing, you just haven't taken the time to learn it. It is an incredibly simple language that looks a lot like javascript. Literally just like like 15 minutes to read the documentation for gawk (in a browser, its just easier) and you will never be confused again

    @samuelwaller4924@samuelwaller49243 ай бұрын
    • That is a fair assessment 😅 I’ll have to give it a read

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
    • @@CODE_IS_EVERYTHING lol thanks for being nice about it, I was a little rude. Great video!

      @samuelwaller4924@samuelwaller49243 ай бұрын
    • No worries, I didn’t take it that way. I appreciate the heads up. I use it often enough there is really no good reason to not spend a few minutes to actually learn it haha

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
    • To be fair, it's not that awk is that confusing. It's more like when you're initially learning all this stuff as shell utilities and then BAM out comes a fucking scripting language. One of these things is not like the other.

      @Snollygoster-@Snollygoster-3 ай бұрын
    • @@Snollygoster- yeah that is pretty accurate lol

      @samuelwaller4924@samuelwaller49243 ай бұрын
  • Your channel is beautiful Bro. It’s just beautiful.

    @SonicJ2@SonicJ23 ай бұрын
  • This one is the best! To the point and powerfull. Thanks so much!

    @davidzwitser@davidzwitser2 ай бұрын
  • The dash can sometimes be used to use the previous value/location. "cd -" lets you go back to where you were. Nice if you cd into some root folder and want to go to where you were. Same goes for "git checkout -"; if you are in your branch, checkout to master to git pull, but want to return to the branch you were just in.

    @NostraDavid2@NostraDavid23 ай бұрын
  • thank you so much! I've drastically changed my config.fish because of this video

    @LukasSmith827@LukasSmith8273 ай бұрын
  • I am a Bash Wizard. It was the first language ive learned. (Even before English).

    @Ky-vv8nj@Ky-vv8nj3 ай бұрын
  • Great video! Thanks!

    @TeamDman@TeamDman3 ай бұрын
  • wow bro keep it well made and just great overall!

    @comosaycomosah@comosaycomosah3 ай бұрын
  • you opened my eyes. ty~

    @209_Violate@209_Violate2 ай бұрын
  • Potential slip up at 10:35 when you say "Ctrl+D to exit the shell"

    @stokedfool@stokedfool3 ай бұрын
    • Shoot, you're right. Ctrl+D is correct, I scuffed the visual hotkey list. Darn, it doesn't look like there is a way to add an overlay in the YT video editor.

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
  • Amazing video. You are the king

    @polares8187@polares81873 ай бұрын
  • Ctrl x + ctrl e just changed my life

    @bolivianPsyOp@bolivianPsyOp3 ай бұрын
  • Never knew about the -f option for tail. Got a feeling I'll be using that quite a bit now!

    @thenefariousnerd7910@thenefariousnerd79103 ай бұрын
    • Excellent, it definitely comes in handy, especially when you’re doing server admin type stuff

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
  • Fantastic presentation & info, subd!

    @Cryogenik_1@Cryogenik_13 ай бұрын
  • Haven't used bash in ages. A lot of the keyboard shortcuts are shared with emacs, since they're both part of the gnu project.

    @Parker8752@Parker87522 ай бұрын
  • I don't usually comment but this deserves it! Amazing video 🙌

    @ematherev@ematherevАй бұрын
  • This is a very good video. good work.

    @ziaahmad8738@ziaahmad87383 ай бұрын
  • This is some good stuff here...

    @FlyingPenguino@FlyingPenguino3 ай бұрын
  • Great video!

    @phpsoftwareengineering@phpsoftwareengineering3 ай бұрын
  • Great content

    @user-ms4gx9ks1k@user-ms4gx9ks1k3 ай бұрын
  • Some more modern tools which are great are jq, yq, xq. Which are a family of tools for json query, yaml query and xml query.

    @oblivion_2852@oblivion_285225 күн бұрын
  • Shell - a program which sits between you and the kernel, needed to only pass legitimate, authorized commands to the kernel or other apps. Terminal Emulator - a program which emulates a vt100 terminal and escape codes. Terminal - previously a screen with a keyboard without any cpu or serious computational power, the device sent escape codes to the mainframe to administer it or just to work on the computer in general. Terminals were wiresly connected to the mainframe (usually in the same building). Console - a terminal (of 1970's) physically attached to the mainframe, other than physical attachment it's the same terminal. Today 'console' is often used in games, when you bring the terminal on half the screen, because it reminiscent of the old terminal attachment to the mainframe, so is a terminal attached to the game.

    @JamesSmith-ix5jd@JamesSmith-ix5jd3 ай бұрын
  • Wow that was great tutorial👌

    @nickchauhan@nickchauhan3 ай бұрын
  • HOLY HELL THIS VIDEO IS AMAZING

    @anonymoususer13666@anonymoususer1366628 күн бұрын
  • Have been using linux for a few things for like 5 years, and just only now realized man stands for manual

    @sammy709@sammy7093 ай бұрын
  • I'm an RHCSA and RHCE. This was a fantastic video. While I'm familiar with about 90% of this, there was definitely new things to learn! "fzf" is a new one for me, and it looks to be extremely powerful! I really need an excuse to practice using it more often. I work on so many systems that creating aliases is not useful for me. Plus, I'd rather be able to know how it's done rather than do it once and alias it away. I can't say I've ever used awk in all my years doing Linux admin work, but I do think I copied and pasted a big chain of piped commands with it in it before lol. #vim4life

    @chbrules@chbrules3 ай бұрын
  • Glad this came up on my feed. Shoutout algorithm

    @jaywaup@jaywaup2 ай бұрын
  • I just know bro is gonna get a hit with the algo at some point and up in niche tech recommends

    @kaizer.dragon@kaizer.dragon3 ай бұрын
  • Wow, what a great video.

    @aquadap219@aquadap2193 ай бұрын
  • This video is great!

    @rodneylives@rodneylives3 ай бұрын
  • I’m going to do my best to regularly forget to use fzf but also that last command with the open the editor was gold! But now I need to find the conf file to select the correct editor.

    @SirBearingtonSupporter@SirBearingtonSupporter3 ай бұрын
    • Haha I'm glad to hear it. The open the editor should default to using whatever you have set in your $EDITOR env var. So if you want to set that to nvim (or whatever you want) you can do: export EDITOR=nvim If you're using zsh, you can put it in the ~/.zshrc, if bash, it would be your ~/.bashrc -- if you're using something else, it'll probably be in a similar spot.

      @CODE_IS_EVERYTHING@CODE_IS_EVERYTHING3 ай бұрын
  • this was so helpful

    @somniasum@somniasum2 ай бұрын
  • Thanks! and love the profile pic

    @quentinjouanny5295@quentinjouanny5295Ай бұрын
  • Loved it🔥

    @mishrasidhant@mishrasidhant2 ай бұрын
KZhead