11 More Linux Commands Every Linux User Needs | Learning Terminal Part 2

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

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

  • @javabeanz8549
    @javabeanz8549 5 лет назад +40

    A suggestion, since you showed disk free "df -h", you may want to show disk used as well "du -h" where you can find what folder is taking up all your space :O)

    • @peterjansen4826
      @peterjansen4826 5 лет назад +4

      Cool, but how do you then sort or use grep to only show larger than X MB/GB?

    • @ChrisTitusTech
      @ChrisTitusTech  5 лет назад +5

      Good one, thanks for the comment.

    • @peterjansen4826
      @peterjansen4826 5 лет назад

      @@serge5046
      thanks.

  • @fourdotsYT
    @fourdotsYT 5 лет назад +4

    Search/browse history commands:
    Press *Ctrl+r* and type command fragment (incl. arguments) to search. Keep pressing *Ctrl+r* to flip through all matches. Press enter to execute selected command, or right arrow to put it on the command-line without executing (to edit).

  • @mitchelvalentino1569
    @mitchelvalentino1569 5 лет назад +6

    Great video. Invaluable information. The Unix legacy continues. More people use these commands today than 40 years ago.

  • @spaceiswater6539
    @spaceiswater6539 5 лет назад +8

    So excited for Part II thank you so much Chris.

  • @theodoros_1234
    @theodoros_1234 5 лет назад +5

    Interesting! Thank you, I've learned a few new commands now.
    SSH+Htop (or TTY/Text Mode +Htop) are also really helpful if a system freezes due to programs using way too much RAM, or if a fullscreen app is misbehaving and won't let you open your typical GUI task manager/system monitor.
    By the way, I would like to see a video on SSH Keys.

  • @9SMTM6
    @9SMTM6 4 года назад +1

    Really useful command IMAO is `apropos [keyword]`.
    If configured you'll search the keywords of the manual pages (what you look at with `man [cmd]`).
    Thats a neat way of finding commands you don't remember, which is invaluable if you're as forgetful as me.

  • @teamvigod
    @teamvigod 5 лет назад +1

    Good video. I forgot about htop! damn! You could add piping to "more" or "less" for those long lists. so after you systemctl | grep enable | more. this way you can page thru the list in terminal. I use MORE and LESS alot in terminal. Thanks for the video. Enjoying your work.

  • @cuttlefishn.w.2705
    @cuttlefishn.w.2705 4 года назад

    PROTIP: download xclip and add the alias clip='xclip -selection clipboard' to your .bashrc file! So useful! Another thing that helped me get away from Windows (powershell; halfway through my Linux transition, I tried to use Windows the way I've been using Linux).
    Idk about others, but I find it faster/smoother to type out another command than to highlight text with my mouse and hit Ctrl+Shift+C.

  • @1pcfred
    @1pcfred 5 лет назад +1

    env dumps your whole environment. In case you don't even know what you're looking for. Which it looks like you don't. SSH is in its own package. You do have to install it if you want to use it. Though perhaps your kitchen sink distribution just throws a copy at everyone? $ dlocate -S `which ssh` openssh-client: /usr/bin/ssh It is grep not grip. grep is short for global regular expression print.

  • @cuttlefishn.w.2705
    @cuttlefishn.w.2705 4 года назад +1

    Computers in it's most basic use, I find is best at note taking/editing. It's also a bare/basic philosophy that everything in Linux is a file/list, so editing them would be fairly important, I imagine for most people. Aside from nano and vim, I'm surprised you haven't gone over cut, paste, nl, head & tail, and a few other useful file-displaying and editing tools.
    awk and sed may or may not be more advanced, but idk, I barely use them just because the syntax for them is kinda ridiculous and weird. However, much like a lot of stuff in Linux, I hear these tools are amazingly powerful once you get used to them, which I have no incentive for because there's other more basic tools to do the same thing. And worst comes to it, I can just open these up in a leafpad or vim for editing.
    Come to think of it, these commands are probably more sensibly used sticking them in a script rather than using them directly from the terminal. It probably depends on workflow and comfort in using them. However... I remember in my early days preferring to write wrapper scripts for complicated commands and sticking them in ~/bin rather than writing aliases for them... this stuff is weird.

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

    Great insight into how you centered into what commands you actually use. Very useful tips. Thank you.

  • @peterjansen4826
    @peterjansen4826 5 лет назад +4

    You've got to love that piping (|).

  • @theignorantphilosopher4855
    @theignorantphilosopher4855 5 лет назад +2

    So, my Manjaro install finally blew up with some sort of kernel panik or rather. Oh well, I'm actually glad, as now I have no excuse not to do what I've wanted to do for a long time.
    Almost done downloading Antergos.

    • @theignorantphilosopher4855
      @theignorantphilosopher4855 5 лет назад +1

      @Marten Wielenga Yes it vent very well. I was a bit concerned when it came to installing the boot loader, because it took way too long, but in the end there were no issues.
      The only issue I've had so far, is with the bluetooth, probably because I chose XFCE. You get the option to enable/install Bluetooth during the installation, but once installed and booted up, I didn't find any tools for managing BT. Still, the solution was simple, I installed blueman, and it works fine.
      On the plus side, I can now play No Man's Sky again. This probably has more to do with Mesa being updated than with Manjaro being , but just the same, I'm very happy. I didn't even have to mess about with drivers. Everything works out of the box, and that's with relatively new hardware, i.e., ryzen 2700x and vega64.
      Most of this however, don't come as a surprise. I've been running Antergos for years without a hitch, and I only installed Manjaro because I'd heard that it had gotten past all the many issues I experienced last time I tried it, and the larger community is a plus, but alas, it hasn't. Sooner or later it will blow up in your face and you'll want to either move to Antergos, which to my mind is the only Arch based distribution that is worth anything, unless you want to go with base Arch, which takes up far too much of your time, setting up and maintaining, or to a Debian based distribution, which is to say and Ubuntu based distribution, which is certainly not for me, or stock Debian which has it's benefits, but much like base arch, is rather a hassle to setup properly. (Debian stable is still awesome for servers and stuff like that.)
      So that's that, except I would like to impress upon anyone who may be wondering, that I've done nothing to ruin my Manjaro install. I haven't been careless or stupid, I haven't experimented, etc. I've installed the packages and updated provided by the Manjaro repos, plus a couple of things from the AUR, but nothing that would reap this kind of havoc.
      Antergos: Would recommend, again and again and again.
      Manjaro: Fool me once, shame on you, fool me twice... Well, suffice to say that I won't go back a third time, and I will never shut up about it!
      Best regards.

  • @jamescarson4507
    @jamescarson4507 2 года назад

    ALWAYS HELPFUL, love the videos...

  • @wikingagresor
    @wikingagresor 5 лет назад +2

    When you have htop installed and your graphical session freezes, just do ctrl+alt+F1 and go into console and htop. There you can kill your whole graphical session.

    • @1pcfred
      @1pcfred 5 лет назад

      when my graphical session freezes I install a new OS. I don't brook such nonsense here!

    • @engiecat705
      @engiecat705 5 лет назад

      top has much of the htop functional and comes preinstalled in most distros. you can also kill your graphical session with "pkill X" or "pidof X" and then killing it with kill -9 pid. or just enable ctrl-alt-backspace to kill the x server in the keyboard settings. doesn't quite work with wayland thought.

  • @engiecat705
    @engiecat705 5 лет назад +1

    systemctl is part of systemd, it is not present in many distros that are using different init systems.

  • @TheLotw
    @TheLotw 5 лет назад

    Chris, check out eDEX-UI for a command line type program. Its not something you will use everyday, but nice to show off what could be done if devs but work into the command line. I use it sometimes when I remote to another machine, because it makes noise when the screen gets updated, so I know its doing something if I am not looking.

  • @cthedosboss5113
    @cthedosboss5113 5 лет назад +1

    thanks chris !

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

    Thanks man. It was a polished course of very useful commands.

  • @jonspoonamore3721
    @jonspoonamore3721 5 лет назад +1

    Here's an alias I have setup for using DF. This filters out info I am not interested in.
    alias di='df -T -x tmpfs -x vfat -x devtmpfs|head -1;df -T -x tmpfs -x vfat -x devtmpfs|sort -k 7'

  • @PaCmEn12
    @PaCmEn12 5 лет назад +2

    Very good vtut!

  • @peterjansen4826
    @peterjansen4826 5 лет назад +1

    Chris, a request for a next topic, something which I need help with. Pimp your terminal. I added a nice background but unfortunately the colors which LS uses - as defined in bashrc by the Manjaro guys - is a mess. I hate that lightgreen color in front of the command prompt but that is just a bit inconvenient, much more problematic is this: when I use ls on a NTFS partition the text is literally unreadable because green highlighting is combined with a green font.
    I have found the responsible text in the bashrc but I don't know how to change the colors because the colors are not definied here but are grepped from somewhere else (I don't have any /etc/DIR_COLORS or ~/.dir_colors but it has to take those colors from somewhere). When I remove that text the color set by the terminal is used but now I can't see the difference between directories and files. I would like a different color for each type of file (and folder) and I want to set the colors myself. Is it possible to define the colors in this piece of text. I will probably figure it out but given that more people have this problem it might be an interesting topic for a video.
    The text which I removed from bashrc - for now:
    # Set colorful PS1 only on colorful terminals.
    # dircolors --print-database uses its own built-in database
    # instead of using /etc/DIR_COLORS. Try to use the external file
    # first to take advantage of user additions. Use internal bash
    # globbing instead of external grep binary.
    safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
    match_lhs=""
    [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(

    • @peterjansen4826
      @peterjansen4826 5 лет назад

      @@serge5046
      Interesting. I am going to try it out.

  • @engiecat705
    @engiecat705 5 лет назад +1

    when using the ssh command, do not just dismiss the fingerprint warning. linux is only as safe and secure as it's users know what they are doing. if someone with an ill intent tries to impersonate your site to grab your username and password when you connect to their fake site -- this is exactly the type of a situation that ssh devs want you to avoid by warning you about the fingerprint mismatches. telling your viewers to just type yes is an ill advice here.

  • @fearoism
    @fearoism 5 лет назад

    Great video! Thank you Chris

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

    good bro really helpful keep going

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

    great stuff, part1&2, thx

  • @chrisllodge
    @chrisllodge 5 лет назад +1

    Awesome thank you

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

    Excellent explanation. Keep going

  • @srb1855
    @srb1855 2 года назад

    Excellent - thanks 👍

  • @xnonsuchx
    @xnonsuchx 5 лет назад

    My first experience w/ grep was doing scripts in PS3 'OtherOS' Linux (YDL 6.1) for emulation stuff...had to use it and sed to parse MAME XML info, among other things. It made me wonder why Windows didn't have such helpful tools built-in. Also, the touch command to easily update/create files (used it as a quick and dirty way to 'flag' settings options for emulator scripts).

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

    5:46 "grep" is short for "globally search for regular expressions and print the results".
    Computer scientists suck at naming...

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

    Wat can i tell you are an experimental man withe hansome behaviure. Thank you too mutch.

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

    ctrl+l for clearing the terminal instead of 'clear'

  • @guilherme5094
    @guilherme5094 5 лет назад +2

    Awesome.

  • @AliensInc.
    @AliensInc. 5 лет назад

    Use both Fedora and CentOS (based on RH) and I use ifconfig, just to let ya know.
    Gotta test curl though :)

  • @le-hu
    @le-hu 4 года назад

    great stuff, thanks man

  • @1107Comedy
    @1107Comedy 4 года назад

    Very useful for a newbie... e.g. me

  • @Cyber_Lanka
    @Cyber_Lanka 5 лет назад +1

    Awesome man

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

    @5:56 List still too long? or maybe not wanting/able to scroll pipe into more after the grep command.... (for anyone that's into a pinch)

  • @user-vs1op1oc6h
    @user-vs1op1oc6h Год назад

    Good video

  • @bufordmaddogtannen
    @bufordmaddogtannen 5 лет назад

    Cat filename pipe grep string?
    Sorry that's just bad practice.
    Grep can be used by its own to achieve the same result.
    Despite the criticism I enjoy your videos though. 😉

  •  4 года назад

    Started using Manjaro 2 day ago HackerMan

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

    i recommend ytop or gotop instead of htop

  • @toastbuster9050
    @toastbuster9050 5 лет назад

    Was able to permanently fix my bluetooth problem with systemctl

  • @Khyree_Holmes
    @Khyree_Holmes 5 лет назад

    My favorite command was 2 weeks ago "fsck -f /dev/sda2" [sarcasm] and I did "fsck -f -a /dev/sda2" and my Filesystem did not go to Read Only mode ever since with bad "Current Pending Sector Count" faults. (I did it all with the LiveDVD/recovery mode of my distro)

  • @rmcellig
    @rmcellig 5 лет назад

    Great video...again!! How can I get a list of the IP addresses of the computers on my LAN?

    • @rmcellig
      @rmcellig 5 лет назад +1

      Thanks so much Serge!!

    • @ChrisTitusTech
      @ChrisTitusTech  5 лет назад +3

      I don't like nmaps output, so generally I start with an sudo arp-scan 192.168.0.0/24
      just requires the arp-scan package.

    • @rmcellig
      @rmcellig 5 лет назад +1

      @@ChrisTitusTech thanks Chris!!

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

    I just ssh'ed into my router, it gave me an rsa key and asked me if I wanted to continue O.o Yes, I do, off course I do want to, but first I need to buy another HDD and make a long overdue backup.

  • @jillshort9241
    @jillshort9241 5 лет назад

    Turns out ifconfig is not on my Ubuntu MATE 18.10--says I need to install net-tools, and curl came up with the same message. Will try now to see if it will all work. Ok--did it and it all worked!

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

    Chris is there a way to get Linux Mint to allow a user to arrange the desktop icons the way the user wants them

  • @zeocamo
    @zeocamo 5 лет назад +2

    using terminal is NOT optional, any thing can and should be done in terminal, also watching youtube....

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

    I thought "ll" was an alias and is installed using archfi only.

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

    You don't have to cat fubar | grep foo
    just grep foo fubar

  • @naveenbattula
    @naveenbattula 5 лет назад +4

    One of my essential command sudo rm -rf /*

    • @ChrisTitusTech
      @ChrisTitusTech  5 лет назад +2

      You sir are mean... no thumbs up for you! lol

    • @1pcfred
      @1pcfred 5 лет назад

      dd if=/dev/zero of=/dev/sda

    • @ChrisTitusTech
      @ChrisTitusTech  5 лет назад +1

      You two are pure evil... Pasting blasphemy like that on terminal tutorials.

    • @1pcfred
      @1pcfred 5 лет назад +1

      @@ChrisTitusTech if you're wiping a system out anyways might as well have some fun with it first. The dd command is kind of sad like when HAL got deactivcated in 2001. Though I've never had a PC sing Daisy yet.

    • @naveenbattula
      @naveenbattula 5 лет назад

      @@ChrisTitusTech haha, lol love what you do keep up the good work man

  • @winiciuscota8853
    @winiciuscota8853 5 лет назад

    Have you ever tried using zsh instead of bash?

  • @cuttlefishn.w.2705
    @cuttlefishn.w.2705 4 года назад +1

    PROTIP: download xclip and add the alias clip='xclip -selection clipboard' to your .bashrc file! So useful! Another thing that helped me get away from Windows (powershell; halfway through my Linux transition, I tried to use Windows the way I've been using Linux).
    Idk about others, but I find it faster/smoother to type out another command than to highlight text with my mouse and hit Ctrl+Shift+C.