Linux and macOS Command Line Basics

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024

Комментарии • 77

  • @bokkenka
    @bokkenka 4 года назад +37

    A little misspeak... `cd ..` takes you UP one directory, not technically BACK to the PREVIOUS. If you step down directory by directory, going up and back are the same thing. But, you can `cd` anywhere with a valid path argument. If you are in /home/brian/demos, `cd /home/brian/files/videos/uploads_for_youtube`, then `cd ..`, you will be in /home/brian/files/videos. `cd -` takes you back to the actual previous directory.

  • @ooloncolluphid9975
    @ooloncolluphid9975 4 года назад +12

    LOL at the "rm -rf" reflex at 8:17 :D Keep up the good work!

    • @EngineerMan
      @EngineerMan  4 года назад +3

      Yeah pretty rarely do i just do -r.

  • @FidgetTheMidget8P
    @FidgetTheMidget8P 4 года назад +2

    I've learned more about python and linux after 30 minutes of watching your videos than I have in hours of reading forums and how-to's

  • @moegreenback6854
    @moegreenback6854 4 года назад +3

    I wanted to thank you for this video. I have seen many commands and they seem confusing but you made it appear easy. I literally typed commands on Mac and Linux as I listened to and watched your video. Very informative.

  • @ZacKoch
    @ZacKoch 4 года назад +9

    I still remember "less is more, more is less" I amended "less is more, more is less, but if more is less why would anyone wanna use more?" 😂
    Great vid as usual!

    • @brainplot
      @brainplot 4 года назад +1

      Apparently `less` has become a pretty big program over the years and some embedded systems may not have `less`, as per this answer: unix.stackexchange.com/a/81131/222786
      Thanks for this comment. It inspired me to research.

  • @1donnelly
    @1donnelly 4 года назад +13

    I like “sudo !!” for running a command where I forgot sudo.

  • @PCCenterNetworkSolution
    @PCCenterNetworkSolution 4 года назад

    Long time viewer here from the philippines... quick question.. can i open ADB or debugging option on andriod using shell command?

    • @EngineerMan
      @EngineerMan  4 года назад +1

      Turning on debugging has to be done from the phone, this is a security feature. Otherwise opening a shell into any Android would be as easy as plugging it into a laptop.

    • @PCCenterNetworkSolution
      @PCCenterNetworkSolution 4 года назад

      @@EngineerMan i wish i could bypass andriod security... thanks... appreciated... my work would be easier and migrate to linux...

    • @PCCenterNetworkSolution
      @PCCenterNetworkSolution 4 года назад

      Hey... fellow creator here... love the way you explained things... i teach diy for electronic and electrical, and alternative power, also run a small shop that host 5-10 out of sch. Student computer class from operation repair and basic office operation.. i know how to run the basic of linux but... i wanted to teach my student how to use linux properly and advances my skills in linux.. if you do have free time.. kindly email me at tablet3rs@gmail.com
      Thanks appreciated

    • @PCCenterNetworkSolution
      @PCCenterNetworkSolution 4 года назад

      Opps forgot to tell you that i teach for free completely free...

  • @brainplot
    @brainplot 4 года назад +2

    `less` (and pretty sure `nano` as well) can also scroll up and down using J and K or CTRL+N and CTRL+P, which are the vi and emacs bindings respectively. Some people may find it easier/more natural that way, compared to arrow keys :)

  • @celestialbeing4767
    @celestialbeing4767 4 года назад

    A decent introduction. You said just the surface sheesh. So mkdir is basically making a folder, touch making a text document. Question were you doing these commands through tmux or was it straight shell commands?

    • @EngineerMan
      @EngineerMan  4 года назад +1

      In this video I did everything through bash. Although due to the simplicity of the commands, which shell isn't super important. All these should work in all shells. tmux is just a program that lets you have one or more terminals within a single terminal.

  • @mattcall90
    @mattcall90 4 года назад +18

    You should do an advanced terminal commands video

    • @EngineerMan
      @EngineerMan  4 года назад +10

      I intend to. Stay tuned for that video.

    • @folksurvival
      @folksurvival 3 года назад

      @@EngineerMan Looking forward to it.

  • @bashisobsolete.pythonismyn6321
    @bashisobsolete.pythonismyn6321 4 года назад +2

    timely video as, i am relearning shell stuff right now. finding it easier to learn fish and have also read good things about the openbsd ksh.

  • @tommyshon6720
    @tommyshon6720 4 года назад

    I just need to ask... what linux distro or terminal do u use? I discovered u today and watched few of your videos and absolutely love that “programme” which u use for your programming, can you please tell me which one is it?

    • @EngineerMan
      @EngineerMan  4 года назад

      I use Atom to write code in. The terminal you see in this video is just the one that comes with Xubuntu by default (it's called xfce4-terminal).

    • @tommyshon6720
      @tommyshon6720 4 года назад

      Ty a lot, I want to start programming and I hope u help me a little bit 😅

  • @SnortDefence
    @SnortDefence 4 года назад

    What theme you using for your terminal.. Directory colors are showing different.. I would like to use same

  • @richardlizcano3671
    @richardlizcano3671 Месяц назад

    Hello I am just starting to learn Linux. I am having a problem when I’ll type a command and I guess it was the wrong command and it brings me down to a blank line If that makes any sense. Is there anyway to go back up a line in Linux?

  • @halfpint2413
    @halfpint2413 4 года назад

    At 11:47 you put a colon after brian. Does this do anything special? Because I tested it myself with and without it and saw no difference, and was wondering if there was any reasoning behind it. Thanks.

    • @EngineerMan
      @EngineerMan  4 года назад

      Yes. Generally speaking the format for chown is `chown user:group`. There's other options though:
      chown user - set user only
      chown user: - set user and group to the same thing
      chown :group - set group only
      So what you saw me do was the equivalent of chown brian:brian.

  • @pandabuddy1655
    @pandabuddy1655 4 года назад

    Thanks. Hello man. Have very differences between line commands of Linux and Mac?

  • @azaydhingra
    @azaydhingra 4 года назад

    Very good refresher!! What are the techniques for fast editing inside a file. How do you comment multiple lines together, or replace or delete.

    • @EngineerMan
      @EngineerMan  4 года назад

      For basic editing I use nano. For text processing, I'd reach for sed and awk.

  • @X19-x5f
    @X19-x5f 4 года назад

    Lots of great info. Thank for posting this.

  • @notusum1else
    @notusum1else 4 года назад +2

    Damn good introduction 👍🏼👍🏼

  • @csmole1231
    @csmole1231 4 года назад

    sir
    you are what rhino the hamster in movie bolt would be like if it's a person! (i think) hehehee
    also thanks for this vid, it's concise and compacted which is precious!💛

  • @atldude12345
    @atldude12345 4 года назад

    fantastic as always engineer

  • @eryangmit
    @eryangmit 4 года назад

    Great video, very clear and helpful.

  • @VulcanOnWheels
    @VulcanOnWheels 4 года назад +2

    4:34 I would have called it the "parent directory."

  • @CamStansell
    @CamStansell 4 года назад

    awesome mate. love it

  • @DailyBeatings
    @DailyBeatings 4 года назад

    You can also re-run the command in history with an exclamation point in-front of the line number. So I can re-run "nano text.json" with "!1089". If you want to run the command as root then it's "sudo !1089". Behold, the power of *nix.

  • @Waves-mz3nv
    @Waves-mz3nv 4 года назад +1

    I have never heard someone over complicate Linux commands so much.

  • @blacksheep3880
    @blacksheep3880 4 года назад +1

    Which Linux he uses
    ?

  • @pythonSefer
    @pythonSefer 3 года назад

    Why doesn't he have more subscribers

  • @mattcall90
    @mattcall90 4 года назад

    you can also abstract cd .. further by doing cd ....., which will take you up 5 directories (or as many levels as you wish)

    • @EngineerMan
      @EngineerMan  4 года назад

      This might be a built-in that's specific to your shell.

    • @mattcall90
      @mattcall90 4 года назад

      Oh I use zsh, that might be why

  • @SarkarMotion
    @SarkarMotion 4 года назад

    Wait, you can do this in MacOS too?

    • @1MinuteFlipDoc
      @1MinuteFlipDoc 4 года назад

      yes, all the same commands!

    • @moegreenback6854
      @moegreenback6854 4 года назад

      Surprisingly some work on Powershell like “pwd” and “whoami.”

    • @DailyBeatings
      @DailyBeatings 4 года назад +1

      @@moegreenback6854 It's called Powersmell, because it stinks.

  • @wolvAUS
    @wolvAUS 4 года назад

    You can add WSL to that title :D

    • @EngineerMan
      @EngineerMan  4 года назад +1

      I would never do any such thing lol.

    • @wolvAUS
      @wolvAUS 4 года назад

      Engineer Man heh it’s not too bad tbh

  • @intheshell35ify
    @intheshell35ify 3 года назад

    So I'm gonna need you to keep doing that same thing for another 10 hours if I'm gonna pass my final.

  • @aurider1322
    @aurider1322 4 года назад

    please do a video on jq command line tool.

    • @EngineerMan
      @EngineerMan  4 года назад

      jq is such an underused tool. It's a shame.

    • @VE3RGO
      @VE3RGO 4 года назад

      Until EM gets around to it. Here is one tutorial on jq. Just watch there are errors in the copyable field blocks in the article but the screenshots are correct. Plus found a bunch of other videos and tutorials, but none with EM’s awesome style and delivery.
      www.howtogeek.com/529219/how-to-parse-json-files-on-the-linux-command-line-with-jq/

  • @GooogleGoglee
    @GooogleGoglee 4 года назад +1

    What a "high content" video to open with a "hi engineers" 😅😅😅🙊🙊🙊

  • @shevinhathwyck
    @shevinhathwyck 4 года назад

    Can you make a game

  • @madhousebaby
    @madhousebaby 4 года назад

    Can you hack apps ? Cash cash cash paid

  • @georgeprout42
    @georgeprout42 4 года назад +1

    Great idea Brian, but the basics were presented too fast for a newbie (sudo definitely is not a newbie command)
    Like for the idea all the same.

    • @larsrosenkilde7872
      @larsrosenkilde7872 4 года назад +1

      Sudo rm -rf *

    • @nalidbass
      @nalidbass 4 года назад +2

      Thank for this nice tidbit. Trying this now ...

    • @demipy
      @demipy 4 года назад

      @@larsrosenkilde7872 sudo rm -rf /

    • @larsrosenkilde7872
      @larsrosenkilde7872 4 года назад

      @@demipy you specify the root directory, the asterisk is a wildcard and is everything

    • @demipy
      @demipy 4 года назад

      @@larsrosenkilde7872 everything in the folder you're currently in - so an rm -rf * at the working dir of /home/userX is more or less harmless to the system - rm -rf / will kill the system