50 macOS Tips and Tricks Using Terminal (the last one is CRAZY!)

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

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

  • @NetworkChuck
    @NetworkChuck  Год назад +92

    I know your password. Change it with Dashlane: www.dashlane.com/networkchuck50 (Use code networkchuck50 to get 50% off)
    0:00 ⏩ Intro
    0:12 ⏩ say
    0:23 ⏩ security find-generic-password -wa Wifi
    0:40 ⏩ pbcopy
    0:54 ⏩ command + option + shift + v
    1:08 ⏩ caffeinate
    1:20 ⏩ command + shift + 3
    1:53 ⏩ defaults write com.apple.screencapture name
    2:10 ⏩ defaults write com.apple.screencapture type
    2:19 ⏩ default write com.apple.screencapture location ~/Desktop/screenshots
    2:40 ⏩ passwd
    4:11 ⏩ cd
    4:17 ⏩ ls
    4:20 ⏩ pwd
    4:26 ⏩ whoami
    4:32 ⏩ mv
    4:36 ⏩ cp
    4:41 ⏩ ditto
    4:48 ⏩ df -h
    4:51 ⏩ nano
    5:00 ⏩ man
    5:09 ⏩ open
    5:18 ⏩ ping
    5:25 ⏩ ifconfig
    5:36 ⏩ grep
    5:43 ⏩ awk
    5:53 ⏩ traceroute
    6:04 ⏩ dig
    6:12 ⏩ ps
    6:21 ⏩ top
    6:31 ⏩ kill
    6:47 ⏩ which $SHELL
    6:56 ⏩ bash
    7:00 ⏩ zsh
    7:05 ⏩ uptime
    7:10 ⏩ killall mDNSResponder….and more
    7:15 ⏩ qlmanage
    7:22 ⏩ diff
    7:27 ⏩ curl
    7:42 ⏩ leave
    7:54 ⏩ history
    7:59 ⏩ disable gatekeeper
    8:20 ⏩ brew
    8:46 ⏩ cmatrix
    9:02 ⏩ asciiquarium
    9:13 ⏩ toilet
    9:31 ⏩ tetris
    9:48 ⏩ python3
    10:18 ⏩ shutdown
    10:33 ⏩ sudo touch id

  • @BrutusMaximusAurelius
    @BrutusMaximusAurelius Год назад +192

    Been a Mac and Linux user for a long time, but I always like these type of videos because there’s almost always something new. In this video it’s the last one with touchID. It somehow completely escaped me that this is possible, so thanks!

    • @rishabhpant1828
      @rishabhpant1828 Год назад +1

      Same here

    • @vaniad555
      @vaniad555 Год назад +2

      so true, I have forgoten that we can play games in the terminal, and good reminder of how great brew is.

    • @adalmar9889
      @adalmar9889 Год назад +1

      Same here- Mac has the edge over Linux for me now

  • @Zancb
    @Zancb Год назад +91

    With your `kill -9` command, you needed to specify that `kill -9` forcefully kills a process without giving it a chance to gracefully exit/terminate. You never NEVER want to use `kill -9` for ending just any process. Using regular `kill` will at least give the process a chance to clean up after itself. If you use `kill -9` you could run the risk of heaps of memory being stuck in RAM or open files that couldn't close, which could cause further processes hanging, like Finder trying to figure out why a file is open and not able to be accessed.

  • @blakecalhoun3721
    @blakecalhoun3721 Год назад +425

    Please do more Mac videos.

  • @leodepaulis
    @leodepaulis Год назад +30

    Very useful (as always). With ´history' the list has each command with an index number on the left, so you can then run a specific command in the list by typing !. In your example if you wanted to run the "ps -ax" command you would type !593. You can also count from the bottom up, so that command is the 14 last which means you could also run it by typing !-14.

    • @gizmoitus
      @gizmoitus Год назад

      I am a long time bash/history user, and use it frequently. It also supports incremental search for prior commands using ctrl-r, which is a great feature. However, just to make it clear this is a bash feature, as other popular shells like zsh do things differently. Commands get stored in the ~/.bash_history file. This is useful to know, because you can actually edit that file with vi if you mistakenly add a bunch of commands by accident. There are also 2 environment variables you can set globally by editing the /etc/bashrc file to change them. By default on osx i think it's 500 entries (depends on your version?) but if you'd rather increase this to 5000, you would add these lines: export HISTSIZE=5000 and export HISTFILESIZE=5000. Open a new terminal and you will now have a larger history buffer file.

  • @nomirrors3552
    @nomirrors3552 Год назад +19

    Here's a bonus tip:
    Is there a really long file name you don't want to have to type? No problem. Just drag that file INTO your terminal window. Bam, it prints out the file name including the full path. Easy.

    • @us_f4rmer
      @us_f4rmer 9 месяцев назад

      Now THAT is a great extra, ty @nomirrors3552

    • @SalzmanSoftware
      @SalzmanSoftware 10 дней назад

      I thought you could do this on linux as well?

  • @BaileyMagikz
    @BaileyMagikz Год назад +8

    as a longtime viewer and a macos / windows user i appreciate the mac content and showing how amazing terminal/macos/launchpad is

  • @TheYooToob2000
    @TheYooToob2000 Год назад +21

    I’m taking a Linux class now (total beginner) and had no idea you could do this kind of stuff in the terminal. Pretty cool

    • @LovecraftianGodsKiller
      @LovecraftianGodsKiller Год назад +7

      Luckily, most of the things you can do in the terminal in Linux, you can in MacOS and vice versa. I'm primarily a Linux user, but if I had to choose between Windows and MacOS I would choose MacOS any day because of how similar it and Linux are.

    • @martinb.770
      @martinb.770 Год назад

      The so called userland (aka GNU environment), including the bash/shell, grew together between the BSD and Linux world.
      There is a bunch of system commands, that still are different for BSD/Mac, but just a small number compared to the overlapping parts.
      If you use Homebrew or the MacPorts (you can even use both aside), you get a repository that offers the an increasing number of projects (shell based, but also GUI/X/Qt etc.) from the Linux world.
      It's no wonder, Apple ditched many features (=all non-Mac specific services) from the old MacOSX Server, because most people will use the more common pendants of webservers, DNS, DHCP, mail, .... from the GNU ecosystem, anyway.

  • @eugrus
    @eugrus Год назад +9

    As someone who has been using Linux since 2004, this is the first video ever that got me interested in getting a Mac!

    • @hmdz150
      @hmdz150 Год назад +1

      Mac is Unix and a modern UI on top of it. You can always run Linux in Mac using parallels.

    • @eugrus
      @eugrus Год назад +1

      @@hmdz150 thanks, cap!

  • @alexjr181
    @alexjr181 Год назад +16

    Cmd+Shift+4 then press the space bar. Now you can choose which entire window you want to take a screenshot of.

  • @not.securewifi
    @not.securewifi 4 месяца назад +1

    I suggest 1/2 speed playback for network chill chuck, plus you can keep up with the commands and take notes......1:48 "better say yes nick, Ima lock you in a limmittle space" (at 1/2 speed) thanks for putting this together @networkchuck new fan and love your work.

  • @sens5551
    @sens5551 Год назад +19

    We'd honestly be lost without you, thank you chuck!

    • @borisvukcevic1454
      @borisvukcevic1454 Год назад +1

      Do a Google search and you would see you're fine. This existed long before he made this video.

    • @borisvukcevic1454
      @borisvukcevic1454 Год назад +1

      No, no one is lost without Chuck. I think you need to stop smoking his pipe. XD XD XD

    • @ahmedahmedx9600
      @ahmedahmedx9600 Год назад +1

      @@borisvukcevic1454 you right ! People need to start learn how to search for information or they will be stuck until someone explains stuff

    • @sens5551
      @sens5551 Год назад +2

      @@borisvukcevic1454 yea I know but I meant it as a thanks for all the videos he posted overall throughout the years.

  • @PeteRatcliffe
    @PeteRatcliffe Год назад +5

    Quickest 11 minutes ever! Nicely done.

  • @gothakane
    @gothakane День назад

    The last one with the touch id was the game changer for me!

  • @williemaxt
    @williemaxt Год назад +3

    Thanks so much for making this. I'm a lifelong Linux user that just switched to an M1 Mac a few days ago and this is exactly what I needed

  • @zippyz4170
    @zippyz4170 Год назад +1

    That screen capture with command+shift+4 just changed my workflow. Thank you!

    • @nonanleon
      @nonanleon Год назад

      Ctrl + shift +command +4; are you talking about this combination?

    • @petrocksgarage
      @petrocksgarage Год назад

      @@nonanleon Try command-shift-5, change to Record Selection in the HUD that appears, to create screen recordings. Bonus points to enable Show Mouse Clicks in the Options popup in that HUD.

  • @tol_enum
    @tol_enum Год назад +1

    That screenshot with clipboard is amazing. I was always upset that i had to take it from the desktop!!! Man u just improved my life!!! 😂

  • @sklise1
    @sklise1 Год назад +5

    Thanks! All the stuff with cloudron, and raspberryPi stuff.. super awesome. Figured i could at least buy you a cup of coffee...Have a great thanksgiving.

    • @NetworkChuck
      @NetworkChuck  Год назад +2

      Thanks Steve!! I can always use more coffee ☕️

  • @thebozzIDW
    @thebozzIDW Год назад +2

    29 seconds into this video and it is already awesome.

  • @dosaiba5294
    @dosaiba5294 Год назад +4

    These were all awesome, one I would add is that you can hold option and click to change the location of the cursor which is extremely useful when copying and pasting long commands and wanting to change small parts of it

  • @sirflimflam
    @sirflimflam Год назад +2

    That touchid sudo was the best gem for me

  • @kodymiller1602
    @kodymiller1602 Год назад +5

    This came just in time. I’ve been recently working with macs more at work so this is helpful.

  • @squilliam79
    @squilliam79 Год назад

    This is the first time I’ve watched a tips for OS video and learned something new and useful

  • @KregSteppe
    @KregSteppe Год назад +3

    cd /somedir takes you to another directory, once you are in it and you want to go back to the previous dir you were in, cd - (cd and a dash)

  • @ashishawasthi4350
    @ashishawasthi4350 7 месяцев назад

    “While ur brew is brewing …brew brew…..” that was hilarious….😂
    Amazing stuff brother…the entire video was really informative…

  • @carnavalesenpanama
    @carnavalesenpanama Год назад

    The last tip will help me A LOT as a developer when I need to install packages and stuff on my Mac. Thank you!

  • @SteveUrich
    @SteveUrich 5 месяцев назад

    Great Video. I haven’t used UNIX in quite a while, but your video made me remember just how powerful it can be.
    What I would love to see are some of the commands that can be used to organize your files.

  • @SgtArmstrongX
    @SgtArmstrongX Год назад +6

    More Mac videos please!

  • @cyberdevil657
    @cyberdevil657 Год назад +4

    I don't have a Mac computer but I love it😝

  • @itspervez17
    @itspervez17 Год назад +3

    Thanks for the sharing

  • @karanrajpurohit132
    @karanrajpurohit132 Год назад +1

    Last one was The One I really needed with my new mac

  • @arunachalamm3399
    @arunachalamm3399 Год назад

    I guess you are the only channel which makes even an advertisement so interesting to watch!!!

  • @jatinnandwani6678
    @jatinnandwani6678 Год назад +2

    Thanks so much

  • @sebastianhildebrandt
    @sebastianhildebrandt Год назад +1

    I can only click "like" 👍 once for this video but I wanted to click it 50 times (for every tip)... awesome!!! My absolute favorite RUclips channel, always having fun! Thank you so much!

  • @talha-raja
    @talha-raja Год назад +3

    Chuck is coming up with exactly that content which I am learning right now. Legend 💫

  • @therammync
    @therammync 2 месяца назад +1

    where were you networkchuck all this years

  • @MoodyCodes
    @MoodyCodes Год назад +1

    Bro that was lit!! Loved the sudo with Touch ID and the find password for wifi.

  • @raphostrovsky
    @raphostrovsky Год назад +1

    Awesome, no enough good material about this elsewhere.
    More macOS!

  • @alexandruradu1119
    @alexandruradu1119 Год назад

    Just started a new job and they handed me over a mac. Total noob there, this video couldn't possibly come at a better time. Thank you

  • @okaydude1384
    @okaydude1384 8 дней назад

    the last one is CRAZY!

  • @moazabuobida9433
    @moazabuobida9433 Год назад +3

    Hey man, your videos are fantastic.
    Can you make a video about installing macOS on non-apple PC using the open-core method?
    I think you are the best who can explain it!

  • @davidnwigley
    @davidnwigley Год назад +3

    Thanks

  • @muhammedabdulrazak9096
    @muhammedabdulrazak9096 Год назад +2

    Thanks Chuck!!! Coffee Break "Everyone"😊😊😉

  • @Lukas-vx8fr
    @Lukas-vx8fr Год назад

    Awesome video! One queston I got is, why is the processID he killed different from the one plotted? 6:45

  • @MarkNorgate
    @MarkNorgate Год назад

    That last sudo one was worth the whole video 👍🏻

  • @Colorblind_Guy
    @Colorblind_Guy Год назад +4

    Command shift 4, then space bar to select a window

  • @FahimX95
    @FahimX95 Год назад

    im not a mac user but its nice to see that you cover the most of your audience. Cheers

  • @greggdingle3882
    @greggdingle3882 Год назад +1

    Fantastic! From very useful to very fun. A hook came down and caught one of my fish from the asciiquarium. Keep up the great work!

  • @rommelcampos4452
    @rommelcampos4452 7 месяцев назад

    The touchId in terminal is fantastic! hahahaha thanks buddy!

  • @simplegametutorials1341
    @simplegametutorials1341 Год назад

    Linux Package install search with fzf in terminal: apt-cache search '' | sort | cut --delimiter ' ' --fields 1 | fzf --multi --cycle --reverse --preview 'apt-cache show {1}' | xargs -r sudo apt install -y
    This command allows you to search for packages and by just pressing enter the packages are installed with no major problems. The fzf preview window shows all available packages & also the amount. Thanks for the amazing content.

  • @mukangwakalonda7726
    @mukangwakalonda7726 11 месяцев назад

    you were born to be a master, thank you so much , you are not a teacher but you are headmaster

  • @sm8081
    @sm8081 Год назад

    Now this what I call caffeine -speeded masterclass! 😂

  • @peat381low8
    @peat381low8 3 месяца назад

    This was amazing. I’m going to mess with my Mac now with this.

  • @davidyung7025
    @davidyung7025 Год назад

    Nice one! I clicked Liked for the first trick!!!!

  • @jeffreyhatfield7989
    @jeffreyhatfield7989 Год назад

    Incredible video. Bought an M1 air last year for my wife, after this video it might get way more use from me!

  • @IustinnIoann
    @IustinnIoann Год назад +1

    you are the best youtuber teacher

  • @Asherstitusworld
    @Asherstitusworld Год назад +2

    Super Video Chuck Your videos are Awesome

  • @vincentfinn292
    @vincentfinn292 Год назад +4

    Very good video, as always! Thanks!

  • @sanguineel
    @sanguineel Год назад +1

    Thank you for chapterizing

  • @WonderTwin89
    @WonderTwin89 Год назад

    The new studio looks awesome, Chuck!

  • @accnt2count
    @accnt2count Год назад

    I am using Mac for 12 year. Always hate videos like that, since they all about basic stuff...but this one... 100% brilliant @NetworkChuck kudos to you!

  • @KasTengel
    @KasTengel Год назад +3

    Hey good people, I have a problem with exiting nano. If I type [Ctrl X] I hear a sound and nothing happens. What's going on. I don't know how to exit nano. plz help, thank :D

  • @mrfordsclass
    @mrfordsclass Год назад

    Sharing this one as well with my students. Thank you.

  • @RobSlayerRodeoDrive
    @RobSlayerRodeoDrive Год назад

    Network Chuck's videos are the best. So much fun to watch. 😜

  • @crippledmind
    @crippledmind 2 месяца назад

    last one is really crazyyyy!!!!😁

  • @steverae68
    @steverae68 Год назад

    OMG - need more Mac videos - I work as a senior consultant with O365 and Azure for my day job so obviously use Mac’s at home because they just work….. need more max videos…..
    Like all good IT people though, I do drive a lot of coffee too ❤

  • @jason_green_io
    @jason_green_io Год назад

    that sudo Touch ID tip... .. ... mind blown

  • @metallicapirate
    @metallicapirate 8 месяцев назад

    CMD+SHIFT+5 also opens a Screenshot menu so you can choose multiple options like where to save the files, and whether to save it to clipboard by default.

  • @YuriGrytsai
    @YuriGrytsai Год назад +2

    Hey man!
    You’re crazy! I’m excited about your expression and how you do a job - teaching people.
    Just realised that you have bug bounty basics courses and other interesting stuff at your academy.
    So. I’m going to subscribe immediately!
    Thank you once again for digging me into IT.

  • @HungarianManbeast
    @HungarianManbeast Год назад

    the touch id sudo is a killer! thanks Chuck

  • @sCealt
    @sCealt Год назад

    Also: ".." will go back to parent folder, "~" will go to home folder, "wget" followed by an URL and optionally a path will download a file from the internet in current folder or specified folder, drag & drop a folder from the finder into the terminal will copy the full path. typing just a path without "cd" will go to the path.
    Also (regarding screengrabs), Cmd+Shift+5 enables screen recording mode :)

    • @braer240
      @braer240 Год назад

      yeah ive only ever used .. , also can you explain why he uses cd ~/Desktop instead of what ive always used just simply cd Desktop, or if you really want to cd /Desktop, what does the ~ do?

  • @fifthmaple
    @fifthmaple Год назад

    You are the only reason I am understanding everything in networking now! You make learning so fun! One question though, the command to download brew where is that?

    • @Sonnii
      @Sonnii 11 месяцев назад

      idk

  • @jasperlevink815
    @jasperlevink815 Год назад

    Saving the best for last!!! :D

  • @supriyochatterjee4095
    @supriyochatterjee4095 Год назад +1

    Awesome, waiting for Windows Server, Active Directory, VMWARE, Networking top troubleshooting commands videos soon, thanks a lot

  • @codemaniadev
    @codemaniadev Год назад

    Man, the touch id with sudo is a life saver ❤❤❤

  • @clone2ful
    @clone2ful Год назад +4

    You really need to watch out at the last point in the sudo file. one mistake and u can't use sudo anymore, so copy paste the second line "auth sufficient pam_smartcar..." and change just the value. I just wrote it like chuck with spaces and it broke my sudo and I needed to change to root user to be able to change the file again

    • @ansem187
      @ansem187 8 месяцев назад

      i had a typo and got the same issue. how can i repair it?

  • @gkennedy_aiforsocialbenefit
    @gkennedy_aiforsocialbenefit Год назад

    Been follwing you for years. Thank you for your excellence.

  • @Joe_Addison
    @Joe_Addison Год назад

    Love the sudo touch ID thing!

  • @Gael_AG
    @Gael_AG Год назад

    The touchid trick is mind blowing 🤯🔥

  • @phaberest_
    @phaberest_ Год назад

    Knew every of them expept the last one and yeah it was definitely worth watching the entire video!

  • @nevergonnabesilent
    @nevergonnabesilent Год назад +1

    Dude, you're awesome. Keep the great content coming

  • @Luiblonc
    @Luiblonc Год назад

    Thanks, NetworkChuck these commands will certainly push me further in the terminal - especially with a cup of brew! :)

  • @themarksmith
    @themarksmith Год назад

    the Sudo password change to finger print is really handy...

  • @limbicbrain3748
    @limbicbrain3748 Год назад

    Fantastic stuff. Just to add the last command also works on apple watch. So not only does sudo work with touch ID, but if you have apple watch configured to unlock your mac, it will work with sudo.Great stuff!

  • @choy211995yt
    @choy211995yt Год назад

    I love the last touch ID bypass!

  • @nithinkumar4664
    @nithinkumar4664 Год назад +2

    It is very useful sir thank you 😊

  • @TheBeardedLibertarian
    @TheBeardedLibertarian Год назад

    GeekChuck :) haven't used most unix commands since 2000 :)

  • @lorensims4846
    @lorensims4846 10 месяцев назад

    ditto isn't a synonym for cp; it works somewhat differently and will also optionally create or open archives in cpio, bzip, gzip, or pkzip format.
    ditto foo bar copies the contents of foo into bar, whereas cp -r foo bar copies foo itself into bar.

  • @jslessard390
    @jslessard390 6 месяцев назад

    🎉🎉🎉 I wish I watched this 10 years ago.

  • @MrTechnology83
    @MrTechnology83 Год назад +2

    Thank you for this great video…… I’m new using MacOS, in a old MacBook Pro that I recently got, but I could say this OS is superior compared to windows OS in many ways, I’m use to MS win but you can see and feel the difference.

  • @WhatALoadOfTosca
    @WhatALoadOfTosca Год назад

    I love how Jobs joked about command lines and many years later there are videos like this ;)😊

  • @IorgaArtStudio
    @IorgaArtStudio 9 месяцев назад

    man I love your videos and those intros :))

  • @Zancb
    @Zancb Год назад +11

    With the curl command, you might not necessarily use the `>` sign, because it's simply directing STDOUT to a file path. You should be using the `-o` flag to tell curl to save the contents of the destination to a file, rather than letting bash writing to the file.

    • @TheGrimravager
      @TheGrimravager Год назад

      aye, depends on the application though, for instance, if you wanted to save some output curl could generate (such as a response code), you could do something like -o /dev/null and redirect output to the desired file

    • @delarosomccay
      @delarosomccay Год назад

      @@TheGrimravager not sure why you would want that, but sure it's always possible to pipe or redirect. Just because you can though doesn't mean you should ;). I can see it being the other way, but curl has a -s option for silent running. If I'm running headless, or I don't want output I will often use file redirection to /dev/null for other programs that may not have a silent option. Or sometimes I want the output of the program redirected to a log file, and you can't do both with redirection. In this case I could curl -o myfile.txt >> curl.log 2>&1 and I would get the output of the program (stdout and stderr), plus I would get the downloaded file in a separate file.

    • @TheGrimravager
      @TheGrimravager Год назад

      @@delarosomccay specific usecase that comes to mind is a bash script that uses curl to validate an http server is giving a 200 status code

  • @unbreakpl
    @unbreakpl Год назад

    Sooo, i need some coffee now! Thanks

  • @emiel333
    @emiel333 Год назад

    Great and useful commands, thanks! Want to see more Mac videos like this one.

  • @cristian8264
    @cristian8264 Год назад +3

    For anyone still wondering why the screenshot location prompt is not working, make sure to type in "defaults" not "default" at the beginning at the prompt, not like is in the description of the video.

    • @graysongoodacre2730
      @graysongoodacre2730 10 месяцев назад

      mine still doesnt work when i type in "defaults". any ideas?

  • @ggexrge_
    @ggexrge_ Год назад

    the sudo Touch ID is killer!

  • @Xe4ro
    @Xe4ro Год назад

    2:10 you can also change the default location using cmd-shift 5.

  • @itsjiraheta
    @itsjiraheta Год назад

    thanks, some I knew and some were just 🤯🤯🤯🤯

  • @zaidbaban
    @zaidbaban Год назад +1

    In the commands you pasted in the description, 2:19 should be fixed to defaults. It is missing an "s".