Become a shell wizard in ~12 mins

Sdílet
Vložit
  • čas přidán 5. 02. 2024
  • 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
  • Věda a technologie

Komentáře • 319

  • @scrapp706
    @scrapp706 Před 3 měsíci +413

    Underrated, it's just amazing how serene and concise this video is

    • @CODE_IS_EVERYTHING
      @CODE_IS_EVERYTHING  Před 3 měsíci +11

      Hey, thanks!

    • @skyhappy
      @skyhappy Před 3 měsíci +5

      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

  • @StiekemeHenk
    @StiekemeHenk Před 2 měsíci +70

    ASMR: shell commands to fall asleep to

  • @suborno9249
    @suborno9249 Před 2 měsíci +93

    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.

  • @sleepybraincells
    @sleepybraincells Před měsícem +37

    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

  • @kmk20219
    @kmk20219 Před 3 měsíci +195

    first time I see someone make working with CLI look aesthetic and easy. Beautiful video

  • @t00nfish
    @t00nfish Před 3 měsíci +185

    I listen to this every evening to fall asleep in peace

    • @YarPirates-vy7iv
      @YarPirates-vy7iv Před 3 měsíci +2

      It's very soothing!

    • @SonicJ2
      @SonicJ2 Před 2 měsíci +1

      This is sooo smart thank you for the idea 🎉

    • @claudiamanta1943
      @claudiamanta1943 Před měsícem +1

      Oh. So you’re saying this is not a chapter from an audiobook? 😕

    • @YarPirates-vy7iv
      @YarPirates-vy7iv Před měsícem +2

      @@claudiamanta1943 It's from Harry Potter and the Command Line of Doom

  • @slayerxyz0
    @slayerxyz0 Před 3 měsíci +74

    Worth mentioning Ctrl-R as well for hotkeys. That fzf man alias is really cool

  • @BobbyMully
    @BobbyMully Před 3 měsíci +17

    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.

    • @liamkearn
      @liamkearn Před 5 dny

      This is all pretty basic stuff for most *nix natives, presented excellently though!

  • @chyldstudios
    @chyldstudios Před 3 měsíci +22

    Well that escalated quickly.

  • @user-il7oz8jr7x
    @user-il7oz8jr7x Před 3 měsíci +21

    probably the best video on overview of shell commands that ive seen so far

  • @BenjaminGrec
    @BenjaminGrec Před 27 dny +3

    Awesome and comprehensive video showing off the true capabilities of a good shell user. I realize literally everything people see, is a text doc

  • @danydanger
    @danydanger Před 3 měsíci +4

    One of the finest videos ever made for the shell enthusiast, kudos to u man, eagarly awaiting for more !!!!!

  • @cobraflunkie
    @cobraflunkie Před 3 měsíci +1

    I never thought the shell could be relaxing but you have done it. Good work.

  • @HopeUnveiled
    @HopeUnveiled Před 3 měsíci +32

    I just become death destroyer of the terminal world!!

  • @mechwarrior83
    @mechwarrior83 Před 3 měsíci +16

    Low sub channel + quality content like this = instant subscribe

  • @PatrickBrentlinger
    @PatrickBrentlinger Před 3 měsíci +4

    Perfect content, helpful and calm, thanks. Seeing how someone uses tools is so helpful as I learn to use them.

  • @ArnabGhosh-wi7pv
    @ArnabGhosh-wi7pv Před 12 dny

    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

  • @thewadegreen
    @thewadegreen Před 3 měsíci

    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!

  • @willd0g
    @willd0g Před 14 dny

    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.

  • @sevos
    @sevos Před 3 měsíci +12

    Great fzf examples, thank you so much!

  • @Fonzie2909
    @Fonzie2909 Před 3 měsíci +1

    Nice, really liked the concise explanations for the basic commands

  • @demidevil666
    @demidevil666 Před 2 měsíci +1

    Thank you so much for bringing fzf to my attention! Just the type of tool I've always wanted but never knew existed.

  • @rodricbr
    @rodricbr Před 3 měsíci

    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

  • @miigon9117
    @miigon9117 Před 3 měsíci +3

    The Ctrl-X Ctrl-E to edit command in $EDITOR is actually very very useful! Thanks for telling us that!

  • @AzinFiro
    @AzinFiro Před 2 měsíci +1

    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.

    • @CODE_IS_EVERYTHING
      @CODE_IS_EVERYTHING  Před 2 měsíci +1

      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.

  • @jjones3705
    @jjones3705 Před 3 měsíci

    Great video! I already know quite a bit about the CLI, but the fzf tool is super cool!! Will definitely use thanks a ton!

  • @Calslock
    @Calslock Před měsícem +1

    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.

  • @dawnrazor
    @dawnrazor Před 3 měsíci

    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 💪

  • @cognishn
    @cognishn Před 18 dny

    Voice + command techniques + explanations are superb.❤

  • @deepkirdat5724
    @deepkirdat5724 Před 2 měsíci

    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 ~.

  • @JavierHarford
    @JavierHarford Před 3 měsíci +14

    Bat instead of less works amazing too (great colour output)

    • @m4rt_
      @m4rt_ Před 3 měsíci

      another good one is moar

    • @wetfloo
      @wetfloo Před 3 měsíci +5

      bat, eza, fd, ripgrep, dust are all great

    • @JavierHarford
      @JavierHarford Před 3 měsíci

      @wetfloo a man of culture 🏆

  • @driden1987
    @driden1987 Před 3 měsíci

    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

  • @Torqu3e
    @Torqu3e Před 3 měsíci +5

    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 ;)

    • @alicewyan
      @alicewyan Před 3 měsíci +1

      didn't know you could do that with xargs, very cool!

  • @yashbijlani6652
    @yashbijlani6652 Před 3 měsíci

    Thanks for the useful info! It was awesome seeing the count of monte cristo being used for some examples, its my favourite book.

  • @user-ii4el6co5t
    @user-ii4el6co5t Před 2 měsíci

    I like the calming background music. Kept me from uncontrollably breaking down and taking pepto again

  • @alecsandroo7
    @alecsandroo7 Před 3 měsíci +1

    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

  • @DrMalware
    @DrMalware Před 2 měsíci

    excellent content and delivery. this was incredibly executed. Subbed

  • @dameonb4586
    @dameonb4586 Před 3 měsíci +2

    Most useful $SHELL video EVER!
    I learned so much.

  • @SuperMutantSomething
    @SuperMutantSomething Před 3 měsíci +2

    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.

  • @JetJockey87
    @JetJockey87 Před 3 měsíci

    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

  • @petersansgaming8783
    @petersansgaming8783 Před 2 měsíci

    Damn, I thought the video might be too basic for me but I have never seen fzf being used like that. Love it.

  • @Hersatz
    @Hersatz Před 3 měsíci +1

    Explained more and better in 12 minutes than our teachers in a whole semester.

  • @petrisss2047
    @petrisss2047 Před 3 měsíci

    Great information and nice background noice. Helps you concentrate. Thanks for this. I hope you do many more videos on Linux!

  • @KerboOnYT
    @KerboOnYT Před 2 měsíci

    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

  • @demolazer
    @demolazer Před měsícem +1

    FZF is the tool I didn't know I needed.

  • @Redyf
    @Redyf Před 19 dny

    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

  • @richizzz1
    @richizzz1 Před 3 měsíci

    this is absolutely a gem :) thank you for the video and learning us nice stuff, you just got a new subscriber

  • @Markadown
    @Markadown Před 27 dny

    Holy crap. I learned some cool new tricks. Thank you. I was really skeptical at first.

  • @I_Am_McZee
    @I_Am_McZee Před 29 dny

    Great video PLUS.The music is very relaxing.

  • @MrVampify
    @MrVampify Před 20 dny

    I am a self proclaimed shell wizard and learning sed can use any delimiter has blown my mind

  • @thenefariousnerd7910
    @thenefariousnerd7910 Před 3 měsíci

    Never knew about the -f option for tail. Got a feeling I'll be using that quite a bit now!

    • @CODE_IS_EVERYTHING
      @CODE_IS_EVERYTHING  Před 3 měsíci

      Excellent, it definitely comes in handy, especially when you’re doing server admin type stuff

  • @LukasSmith827
    @LukasSmith827 Před 3 měsíci

    thank you so much! I've drastically changed my config.fish because of this video

  • @RedPorch
    @RedPorch Před 27 dny

    Thanks for posting this!

  • @NostraDavid2
    @NostraDavid2 Před 3 měsíci

    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.

  • @SirBearingtonSupporter
    @SirBearingtonSupporter Před 3 měsíci +1

    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.

    • @CODE_IS_EVERYTHING
      @CODE_IS_EVERYTHING  Před 3 měsíci

      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.

  • @gabereiser
    @gabereiser Před 2 měsíci

    That fzf is amazing.

  • @wazuma
    @wazuma Před 3 měsíci +1

    You...., wizard...., has a new worshipper. Me is, from now on, following your magic.

  • @rigbymama8436
    @rigbymama8436 Před 3 měsíci

    I was trying to find a vid like this for a while now haha. Thank u 😁

  • @SonicJ2
    @SonicJ2 Před 2 měsíci

    Your channel is beautiful Bro. It’s just beautiful.

  • @avi7278
    @avi7278 Před 3 měsíci

    Great format, pleasing voice

  • @davidzwitser
    @davidzwitser Před 2 měsíci

    This one is the best! To the point and powerfull. Thanks so much!

  • @BruceAlmighty1
    @BruceAlmighty1 Před 21 dnem

    So useful. Awesome video thank you

  • @DeathSugar
    @DeathSugar Před 3 měsíci +6

    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

    • @CODE_IS_EVERYTHING
      @CODE_IS_EVERYTHING  Před 3 měsíci +3

      Amazing, I had never heard of the german voice mnemonic, but that is perfect.

    • @DeathSugar
      @DeathSugar Před 3 měsíci

      @@CODE_IS_EVERYTHING seen it on Tweet shot back in a day, remember it since

    • @hypnogri5457
      @hypnogri5457 Před 3 měsíci

      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"

    • @DeathSugar
      @DeathSugar Před 3 měsíci

      @@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.

    • @hypnogri5457
      @hypnogri5457 Před 3 měsíci

      @@DeathSugar thank you

  • @francis3603
    @francis3603 Před 3 měsíci

    Pretty concise, subscribed!

  • @dooza
    @dooza Před 3 měsíci

    Great video, hope you make more!

  • @kaizer.dragon
    @kaizer.dragon Před 3 měsíci +1

    I just know bro is gonna get a hit with the algo at some point and up in niche tech recommends

  • @wrathofainz
    @wrathofainz Před 3 měsíci

    I remember my first bad rm -rf. I had a path not in quotes _with a space in it._
    I ended up deleting waaaaay more than i wanted to.
    I've also had to use curl piped to gz to something else to get text output from a post request. Very neat.
    Damn boi, you got some _pipes_ on you 🥁

    • @wrathofainz
      @wrathofainz Před 3 měsíci

      fzf piping is op but I can't get it to work with cd

  • @209_Violate
    @209_Violate Před měsícem

    you opened my eyes. ty~

  • @comosaycomosah
    @comosaycomosah Před 3 měsíci

    wow bro keep it well made and just great overall!

  • @icantcomeupwithnames469

    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.

  • @pauloseixas5452
    @pauloseixas5452 Před 3 měsíci

    Thank you very much because I'm a noob in programming i barely use my linux mostly because I'm still struggling with learning my first programming language so I'll put all the tips into a written note on paper so when there's a need to use i can start using by accessing my external hard drive called paper while leaving my internal hard drive still struggling with learning programing

  • @sammy709
    @sammy709 Před 3 měsíci

    Have been using linux for a few things for like 5 years, and just only now realized man stands for manual

  • @HEYPIGYEAHYOU
    @HEYPIGYEAHYOU Před 3 měsíci

    Fantastic presentation & info, subd!

  • @chbrules
    @chbrules Před 3 měsíci +1

    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

  • @user-ms4gx9ks1k
    @user-ms4gx9ks1k Před 3 měsíci +2

    Great content

  • @DevSrijit
    @DevSrijit Před 3 měsíci

    I just found this channel! Its amazing ! I loved tue video, awesome production quality. I hope it reaches the targeted audience.

  • @user-bi3du7or6e
    @user-bi3du7or6e Před 3 měsíci +2

    I always wanted make a video like this
    Thanks for making it ( i can now peacfully sleep knowing that there exist a sensible video about shells and i dont have to procastinate about making one)
    Even tho i know all the stuff (except fzf preview one) i still enjoyed the video

  • @Rundik
    @Rundik Před 2 měsíci +3

    linux shadow wizard money gang

  • @Parker8752
    @Parker8752 Před 2 měsíci

    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.

  • @anonymoususer13666
    @anonymoususer13666 Před 23 dny

    HOLY HELL THIS VIDEO IS AMAZING

  • @lazut273
    @lazut273 Před 3 měsíci

    need more practical helps with command line , this is awesome thanks

  • @jaywaup
    @jaywaup Před 2 měsíci

    Glad this came up on my feed. Shoutout algorithm

  • @FlyingPenguino
    @FlyingPenguino Před 3 měsíci +1

    This is some good stuff here...

  • @user-uz6gd5oy8t
    @user-uz6gd5oy8t Před 3 měsíci +1

    shell wizard money gang we love casting shells

  • @mishrasidhant
    @mishrasidhant Před 2 měsíci

    Loved it🔥

  • @TeamDman
    @TeamDman Před 3 měsíci

    Great video! Thanks!

  • @nickchauhan
    @nickchauhan Před 3 měsíci +1

    Wow that was great tutorial👌

  • @polares8187
    @polares8187 Před 3 měsíci

    Amazing video. You are the king

  • @ematherev
    @ematherev Před 27 dny

    I don't usually comment but this deserves it! Amazing video 🙌

  • @bolivianPsyOp
    @bolivianPsyOp Před 2 měsíci +1

    Ctrl x + ctrl e just changed my life

  • @skyhappy
    @skyhappy Před 3 měsíci

    ls -larth is nice for showing all the files that were modified recently

  • @somniasum
    @somniasum Před 2 měsíci

    this was so helpful

  • @phpsoftwareengineering
    @phpsoftwareengineering Před 3 měsíci

    Great video!

  • @quentinjouanny5295
    @quentinjouanny5295 Před 28 dny

    Thanks! and love the profile pic

  • @dennyahh
    @dennyahh Před 3 měsíci

    "more is less than less" absolute beauty

  • @aquadap219
    @aquadap219 Před 3 měsíci

    Wow, what a great video.

  • @ziaahmad8738
    @ziaahmad8738 Před 3 měsíci

    This is a very good video. good work.

  • @oblivion_2852
    @oblivion_2852 Před 19 dny

    An alternative to that funky kubectl command would be using k9s. A dog themed terminal controller for kubernetes

  • @MaxNyst
    @MaxNyst Před 3 měsíci +2

    Good stuff.

  • @deepRussianDepression
    @deepRussianDepression Před 3 měsíci

    The background music killed me 😂
    Fell asleep to this. Hopefully learned something too