Command Line Tricks That Make Me the Coolest Guy in the Office

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 454

  • @Daimo83
    @Daimo83 2 ปีที่แล้ว +335

    Imagine there was a command to do exactly what you need. But you don't know it. Welcome to Linux.

    • @protoketer4554
      @protoketer4554 2 ปีที่แล้ว +29

      the linux experience

    • @billfarley9015
      @billfarley9015 2 ปีที่แล้ว +40

      Not only that but there are 5 or 10 different ways to do the thing you want to do that you can't do at all on the GUI.

    • @protoketer4554
      @protoketer4554 2 ปีที่แล้ว

      @@billfarley9015 gui is for plebs anyway

    • @crusaderACR
      @crusaderACR 2 ปีที่แล้ว +61

      Imagine there is something you need but there is no way to do it at all. Welcome to Windows.

    • @kingdededelicious
      @kingdededelicious 2 ปีที่แล้ว +10

      Linux is capable of doing whatever you want, if only you know how to tell it what you want

  • @Ruzgfpegk
    @Ruzgfpegk 2 ปีที่แล้ว +265

    Bash "factoring" (IDK the real term) is useful too: "chmod 775 file{1,2,3,4}" will turn the last part into "file1 file2 file3 file4".
    It's quicker for creating copies of files too, like "cp file{,.bak}" instead of "cp file file.bak".

    • @Tomix4k
      @Tomix4k 2 ปีที่แล้ว +12

      Oh wow i didn't know about this. So many seconds wasted to writing namefiles twice.

    • @123lepiaf
      @123lepiaf 2 ปีที่แล้ว

      It is called shell expansion I believe

    • @chambln
      @chambln 2 ปีที่แล้ว +13

      It's called brace expansion

    • @MrRozburn
      @MrRozburn 2 ปีที่แล้ว +24

      {1..4} works a treat

    • @fllthdcrb
      @fllthdcrb 2 ปีที่แล้ว +1

      @@MrRozburn Oh, nice. I didn't know about the range syntax. It works for characters, too. But it looks like it's limited to ASCII characters. Or to characters with single-byte encodings. Not sure which.

  • @willianjaques
    @willianjaques 2 ปีที่แล้ว +54

    Another useful trick is the key bind “alt+.” to use the last argument for the previous commands. For example, let say the command “cat /etc/resolv.conf” and now you want to edit this same file. This can be done typing “vi” and pressing “alt+.” and /etc/resolv.conf autocompletes in screen. And pressing multiple times it woks like a UP arrow key but for last previous commands arguments.

    • @tancoviols9894
      @tancoviols9894 2 ปีที่แล้ว +4

      In general, you can refer to the i-th argument of the previous command using '!!:i'.
      To get to the last, use $ (-1 won't work)
      E.g: '!-2:2' gets you the second argument from the command before the previous one

    • @lucasschneider-dev
      @lucasschneider-dev 6 หลายเดือนก่อน +1

      to be honest this was way more useful than any of the tips in the video.
      I also love Ctrl+R backwards search :3

  • @fossforever512
    @fossforever512 2 ปีที่แล้ว +73

    After watching this video and practicing for a few minutes I won the lottery, and found myself surrounded by beautiful women who now compose my harem
    Thanks mental outlaw, very based video

  • @alamputraaf
    @alamputraaf 2 ปีที่แล้ว +1

    when i was on high school, i'm really stuck with Nano, but today after i watch your video kenny, i wanna learn more about vim

  • @plasmarade
    @plasmarade 2 ปีที่แล้ว +3

    0:40
    Mental outlaw: !!
    Me: *Hits up arrow* *Hits enter*

  • @thomasporcu1171
    @thomasporcu1171 2 ปีที่แล้ว +105

    Great tips, and great video.. Speeds things up a lot indeed! For replacing "status" with "start" in the systemctl command you can also run something even shorter: ^status^start

    • @rehmanarshad1848
      @rehmanarshad1848 2 ปีที่แล้ว +2

      Yeah that's what I was thinking to!!! 😂😂🤣

    • @atpray
      @atpray 2 ปีที่แล้ว

      Anything similar that works in fish shell?

    • @tylorhillman9186
      @tylorhillman9186 2 ปีที่แล้ว +1

      ^that^this

  • @atpray
    @atpray 2 ปีที่แล้ว +48

    For the double exclamation, I don’t use it at all, because I find it more comfortable to press the up arrow key, then home and type sudo

    • @snap_oversteer
      @snap_oversteer 2 ปีที่แล้ว +15

      This, except home key I use ctrl+a

    • @tryfan2k2
      @tryfan2k2 2 ปีที่แล้ว

      For the systemctl examples, it's more efficient to up arrow than to type everything anyway.

    • @szaszm_
      @szaszm_ 2 ปีที่แล้ว +1

      @@tryfan2k2 Nobody was talking about typing everything again. The alternatives discussed were double exclamation mark, which gets substituted to the last command when run, and pressing up arrow and editing the line.

    • @sleekweasel
      @sleekweasel 2 ปีที่แล้ว +3

      I much prefer to see the command I'm about to sudo. Especially with multiple terminals open to multiple machines.

    • @perpetualsystems
      @perpetualsystems 2 ปีที่แล้ว +2

      The virgin sudo ! fan vs the Chad uparrow+home+sudo enjoyer

  • @bripbrap
    @bripbrap 2 ปีที่แล้ว +81

    Cant forget the almighty "Ctrl + r"
    Reverse lookup is hands down one of the best things for quick history stuff. Can be dangerous if your too eager though lol

    • @xtdycxtfuv9353
      @xtdycxtfuv9353 2 ปีที่แล้ว +6

      Bash has a good few emacs functions.

    • @glitchy_weasel
      @glitchy_weasel 2 ปีที่แล้ว

      i dont know how the lookup works. it always seems to choose a command that i dont want :p

    • @thorwaldjohanson2526
      @thorwaldjohanson2526 2 ปีที่แล้ว +3

      @@glitchy_weasel you can press ctrl+r again and again once you typed a search term, it then cycles through all past commands with matching keywords

    • @bonkgameing
      @bonkgameing 2 ปีที่แล้ว +2

      How is it dangerous? I’m a Linux noob

    • @bripbrap
      @bripbrap 2 ปีที่แล้ว +5

      @@bonkgameing Not to worry, we all start somewhere. If you're quick to press return on what you think is the right command you could end up running a command you dont want.

  • @apmcd47
    @apmcd47 2 ปีที่แล้ว +1

    Just a couple of thoughts about history in bash: I personally don't save my bash history because with so many terminals open I wouldn't know which terminal will save its history; I have the string "\!" in my prompt to display a command number so that I can find the number of a previous command easily when I want to use ! to re-run said command.

  • @jw1ck
    @jw1ck 2 ปีที่แล้ว +29

    “pushd” and “popd” are some cool commands I found useful when I knew I needed to eventually return to a directory. pushd /path/to/directory will push that directory to the “stack” in the terminal, so you can navigate anywhere you want thereafter, and when you execute popd, it’ll return you to the same directory you pushed previously. There’s also the “script” command which records your input and output to a file of your choice which is useful when logging your actions in the terminal.

    • @msor6108
      @msor6108 2 ปีที่แล้ว +3

      There is a bunches of nonsense shell plugins that essentially mimic the behavior of pushd and popd in a slightly different way and people cherish these plugins that use a million lines of shell scripting and slow down their shells as if pushd and popd do no exist.

    • @msor6108
      @msor6108 2 ปีที่แล้ว

      @yuuwe pretty sure if you change default shell from ksh/csh/whatever the default shell is to something like bash or zsh you will get that functionality. Also you could probably alias something together in your default shell in whatever bsd to essentially do a pushd/popd.

    • @NicolaiWeitkemper
      @NicolaiWeitkemper 2 ปีที่แล้ว +1

      As a poor man's alternative, "cd -" brings you back to the precious working directory.

  • @deleatur
    @deleatur 2 ปีที่แล้ว +58

    _“I’ve seen a GUI punch through a concrete wall. [...] Yet their strength and their speed are still based in a world that is built on rules. Because of that, _*_they will never be as strong or as fast as a CLI can be.”_* -- *Morpheus* _dixit_ (kind of) 😎

    • @MewTheGamer
      @MewTheGamer 2 ปีที่แล้ว +6

      Morbius

    • @BSenta
      @BSenta 2 ปีที่แล้ว +4

      Such an epic comment

    • @SliceJosiah
      @SliceJosiah 2 ปีที่แล้ว

      @@MewTheGamer Mobius

    • @kenwu7
      @kenwu7 2 ปีที่แล้ว

      Truly underrated comment 👏👏👏

    • @rune.theocracy
      @rune.theocracy ปีที่แล้ว

      Truly one of the Morpheus of all time

  • @Mutual_Information
    @Mutual_Information 2 ปีที่แล้ว +4

    This hurts to watch from my Windows computer..

  • @gamcd
    @gamcd 2 ปีที่แล้ว +7

    Instead of using the double bang for the substitution I use ^replacee^replacement
    Or in your example ^status^start

  • @timewave02012
    @timewave02012 2 ปีที่แล้ว +23

    I know about changing Bash to vi bindings, but Bash has Emacs bindings by default, even without Emacs installed. Also, vi support is available without Vim or some other vi installed. Both are features of libreadline. Check ldd `which bash` and you'll see libreadline, not anything from Vim or Emacs. Imagine you've switched your keyboard to Dvorak, and everyone else is still using QWERTY. That's what the situation with Bash is like. Even if you're committed to using vi bindings, it's worth knowing Emacs basics for when you inevitably encounter it in the wild as the default.

    • @perpetualsystems
      @perpetualsystems 2 ปีที่แล้ว +2

      ...or just run set -o vi for your session. Like you said, you'll be hard pressed to find a Linux machine without vi.

    • @calleha01
      @calleha01 2 ปีที่แล้ว +2

      yeah some people like to bash on (lol) emacs bindings without having even used them. there's seldom a time you need to use vi when you already know emacs, but learning both for the sake of knowing them is obviously a good idea. this example of ssh-ing into a server with only vi installed never made much sense to me, because either you'd use vi on the local machine as a vim user or you'd tramp into the file remotely as an emacs user.
      (also, modal editing on the command line? ew...)

  • @theruq7171
    @theruq7171 2 ปีที่แล้ว +14

    Top Tier Content. I think the only thing I ever really used was "sudo !!" in the whole video, and I've been using Linux in some degree since I was 14.
    I did know somewhat of the other history commands and shortcuts, and using VI on the CLI... but never have really applied it. Old habits die hard.
    I am pretty good with using readline shortcuts to quickly jump by word, etc.

    • @anon_y_mousse
      @anon_y_mousse 2 ปีที่แล้ว

      I just use the same ones they use on Windows, Ctrl+{Left,Right}.

    • @xtdycxtfuv9353
      @xtdycxtfuv9353 2 ปีที่แล้ว

      Read through Bash’s parameter expansion, and through Bash’s history expansion.

  • @SouravTechLabs
    @SouravTechLabs 2 ปีที่แล้ว +1

    You can use ^ to substitute.
    For example:
    $ sudo systemctl status sshd
    $ ^status^start^

  • @cherubin7th
    @cherubin7th 2 ปีที่แล้ว +3

    LOL sure I gonna remember all this random syntax for sure

  • @eideticex
    @eideticex 2 ปีที่แล้ว +54

    Instead of the double bang, shift up and shift down. Let's you cycle through your shell history. Or just up and down depending on which terminal your using.

    • @lagging_barish3736
      @lagging_barish3736 2 ปีที่แล้ว +1

      came here to say this

    • @cancelhandles
      @cancelhandles 2 ปีที่แล้ว +6

      1:50

    • @mustekala797
      @mustekala797 2 ปีที่แล้ว +13

      On Stackoverflow I found this advice that I cant live without anymore:
      In my home folder I create a file named
      .inputrc
      Inside goes this
      "\e[5~": history-search-backward
      "\e[6~": history-search-forward
      Then typing however much of a previous command I wish & using the page up/down buttons searches the history

    • @emblemi6345
      @emblemi6345 2 ปีที่แล้ว +2

      @Соdу Ко 🅥 what kind of spam is this

    • @anon_y_mousse
      @anon_y_mousse 2 ปีที่แล้ว +1

      @@mustekala797 Thanks, and it doesn't interfere with Shift+Page{Up,Down} to scroll the terminal output either.

  • @cosmo3665
    @cosmo3665 2 ปีที่แล้ว +10

    Command line tricks made me a Chad when I was first starting my first job out of college, I guess they don’t teach Linux in India because the offshore guys never know any of these

  • @spurdosparde8197
    @spurdosparde8197 2 ปีที่แล้ว +5

    I’ve used aliases so that I can run both sudo apt update and sudo apt upgrade with just “uu”. Really helpful stuff

  • @hughmungusbungusfungus4618
    @hughmungusbungusfungus4618 2 ปีที่แล้ว

    I have such towering seniority that, by simply being able to use a command line at all, my colleagues are impressed to the point of fainting. Truly a god among men

  • @y7o4ka
    @y7o4ka 2 ปีที่แล้ว +3

    I saw `sudo vim` in your history and just wanted to say that there is a command `sudoedit` specifically for that. It allows you to edit files with sudo rights but using your own user, not root

  • @Wheagg
    @Wheagg 2 ปีที่แล้ว

    Thanks for the "!!" one, I figured that it wouldn't be a common enough issue

  • @DrBovdin
    @DrBovdin 2 ปีที่แล้ว +12

    Ah, the vi mode is something I will try out. I do occasionally end up in situations where I start trying to use vi commands while in shell just to realise that I’m not in vim.

  • @cd-yx3nv
    @cd-yx3nv 2 ปีที่แล้ว +19

    Chad CLI users vs Mad GUI losers
    Edit: genuinely curious what car Sr. Outlaw drives.

    • @roma8663
      @roma8663 2 ปีที่แล้ว +8

      Dacia Sandero

    • @gamtax
      @gamtax 2 ปีที่แล้ว

      Must be a car that Scotty Kilmer recommends...

  • @berkpwn
    @berkpwn 2 ปีที่แล้ว

    Substitution you can preform with ^ instead of !!:s/. So in your example you can just do ^status^start and that will replace the word start with status.

  • @szaszm_
    @szaszm_ 2 ปีที่แล้ว +2

    These shortcuts work in weird terminals as well:
    Ctrl-A: Jump to the start of the cmd line (like Home)
    Ctrl-E: Jump to the end of the line (like End)
    Ctrl-P: Jump to the last command (like up arrow)
    Ctrl-N: Jump to the next command (like down arrow)
    Ctrl-B: Move the cursor to the left (like left arrow)
    Ctrl-F: Move the cursor to the right (like right arrow)
    Ctrl-W: Delete the word to the left of the cursor
    Ctrl-S: suspend output (like scroll lock on in tty)
    Ctrl-Q: continue output (like turning scroll lock off in tty)
    Ctrl-L: clear the screen
    Did I miss anything?

    • @apmcd47
      @apmcd47 2 ปีที่แล้ว +1

      Ctrl-H: delete last (backspace)
      Ctrl-U delete from current char to beginning of line
      Ctrl-D: delete next (delete key)
      Esc D: delete from current character to word break
      Ctrl-R: Search backwards (Ctrl-S is search forwards, but you have to disable suspend to use it)

    • @tancoviols9894
      @tancoviols9894 2 ปีที่แล้ว

      These commands come from emacs, and as such you should also have:
      Ctrl-K: delete anything ahead of cursor
      Ctrl-Y: paste the last deleted thing (either with Ctrl-K or Ctrl-W)
      Alt-Y: If used right after a Ctrl-Y, cycles through the deleted sections

  • @ahmedmaa4380
    @ahmedmaa4380 2 ปีที่แล้ว +2

    Best commands ever:
    - CTRL+w = clears word
    - CTRL + U = clears whole line
    There is nothing magical about unixy commands.. They are extemely powerful weapons you need to memorize.. There is logic to help you memorize such as `w` standing for word ..

    • @crusaderACR
      @crusaderACR 2 ปีที่แล้ว

      arent those emacs keybindings

    • @Jebusankel
      @Jebusankel 2 ปีที่แล้ว

      ​@@crusaderACR yes. They're actually handled by a program called readline. You can configure readline to use vi key bindings. Also you could write your own shell or command line program and use readline as a library to get all the same functionality.

  • @H67MA
    @H67MA 2 ปีที่แล้ว +1

    Pretty cool stuff, however I find it more convenient to just use ctrl+r and home/end/alt/ctrl for quick navigation

  • @stage6fan475
    @stage6fan475 2 ปีที่แล้ว +5

    Lessons in how to be a comand line warrior! Thanks, much appreciated.

  • @martinvandenbroek2532
    @martinvandenbroek2532 2 ปีที่แล้ว +3

    Nice vid. I would skip the advice though with regards to vi and just stick with the default bash keyboard shortcuts from the GNU Readline Library. These default shortcuts are used by many appliances and systems that you may encounter in your engineering career.

    • @tubbiele2
      @tubbiele2 2 ปีที่แล้ว

      the same the other way around

    • @rinumu2736
      @rinumu2736 2 ปีที่แล้ว

      You can enable vi mode for all more applications in .inputrc, so they work in more places

  • @Parallel-game
    @Parallel-game 2 ปีที่แล้ว +12

    May everyone succeed in their dreams. I'm developing a game since Jan 2020

    • @masterdoge17
      @masterdoge17 2 ปีที่แล้ว +4

      you may have been developing a game. Meanwhile I just found out how to turn off mono audio on my pc

    • @Zamu273
      @Zamu273 2 ปีที่แล้ว

      What's the name of the game

    • @Zamu273
      @Zamu273 2 ปีที่แล้ว

      @@masterdoge17 nice
      I still haven't figured that out

    • @masterdoge17
      @masterdoge17 2 ปีที่แล้ว

      @@Zamu273 my audio has been so trash and I couldn’t figure out why. Reinstalled drivers, used older drivers, used different amps and headphones, nothing worked. But then I just searched up mono audio on windows start menu and then found out I had it on the whole time :/ fun.

    • @MentalOutlaw
      @MentalOutlaw  2 ปีที่แล้ว +21

      Bro just release your unfinished game. Devs have been doing pre alpha releases for years now, also make the game open source please.

  • @Kube4x
    @Kube4x 2 ปีที่แล้ว

    I knew about bang bang but bang bang substitution may have just changed the entire course of my life … thank you.

  • @SaikyoSensei
    @SaikyoSensei 2 ปีที่แล้ว +5

    Chaotic Neutral pronouncing sudo as both sudo and sudo

    • @tissuepaper9962
      @tissuepaper9962 2 ปีที่แล้ว

      "sue-doo" makes more sense as far as what the abbreviation means (SuperUser DO), but "sue-doe" follows the phonotactic constraints of English. There's no clear right answer, so why not just use both so everybody gets pissed off? It's more fun that way.

  • @TheBinklemNetwork
    @TheBinklemNetwork 2 ปีที่แล้ว

    I swear I have to resub to this channel monthly

  • @user-cf2pl9uy5k
    @user-cf2pl9uy5k 2 ปีที่แล้ว

    4:04 "thousands and thousands of commands", while showing the file has 1448 lines
    that being said, thanks, very useful video

  • @MontegaB
    @MontegaB 2 ปีที่แล้ว

    Damn, how did I not know about '!'? I've been dabbling since the early 2000s. Would have really changed my experience over the years lol

  • @avihayl7911
    @avihayl7911 2 ปีที่แล้ว +1

    Can you get the row number of a history function using grep and then using it with ! Mark?
    This sounds like a good way to automatically one liner re run specific function by grep and can be added the changes

    • @naelblogger7976
      @naelblogger7976 2 ปีที่แล้ว

      cat -n ~/.bash_history | grep mySearchPattern will show you the commands with your pattern and number lines, which you can then use with !.
      Or, if you like danger, you can automatically take the first match :P
      !$(cat -n ~/.bash_history | grep mySearchPattern | { read -a array ; echo ${array[0]} ; })

  • @luszczi
    @luszczi 2 ปีที่แล้ว +2

    I learned nothing new bash-wise, but the idea of coloring different filetypes is really neat.

  • @IMaiaPT
    @IMaiaPT 2 ปีที่แล้ว +2

    Crtl + r is another good one to search the history

  • @SirCutRy
    @SirCutRy 2 ปีที่แล้ว +2

    For sudo !!, just press up arrow, home and write 'sudo '. You don't have to write the command again.

  • @emblemi6345
    @emblemi6345 2 ปีที่แล้ว +9

    3:32 when you use debian and arch at the same time.

    • @vaisakh_km
      @vaisakh_km 2 ปีที่แล้ว

      wtf, just now i noticed

    • @pohuy2180
      @pohuy2180 2 ปีที่แล้ว

      lol

    • @magnum333
      @magnum333 2 ปีที่แล้ว +1

      good eye!

  • @rothn2
    @rothn2 2 ปีที่แล้ว

    Thanks for putting this out here!

  • @mskyba
    @mskyba 2 ปีที่แล้ว +1

    2:13 If I use my shell's vim bindings, I can edit the previous command in many less keystrokes than typing that. Still, I don't use bash so I don't have the double exclamation mark either way

  • @apmcd47
    @apmcd47 2 ปีที่แล้ว +3

    I never got the hang of VI mode in bash and tend to stick with Emacs mode which I find much more intuitive. On the other hand I find Emacs too complicated for my needs and stick to VI.

    • @code8986
      @code8986 2 ปีที่แล้ว +2

      I thought I was weird for thinking and doing the exact same thing... glad to know I'm not the only one! 😀

    • @anonymous82783
      @anonymous82783 ปีที่แล้ว

      how is that even possible

  • @Jrorion8
    @Jrorion8 2 ปีที่แล้ว +2

    Some of these commands I never knew about until today, and I have been using Linux for 15 years.

  • @manemobiili
    @manemobiili 2 ปีที่แล้ว

    One time in college, internet went down, i used ping and explained to a non-techie how it works - oh wow, thats impressive!

  • @Jrorion8
    @Jrorion8 2 ปีที่แล้ว +2

    Please create an extensive video on grep, ask, sed, and Bash. Your videos are always awesome.

  • @martinkozle
    @martinkozle 2 ปีที่แล้ว +3

    I AM that guy that installs nano on all of the company servers that I happen to ssh on 😔

  • @MgtowRubicon
    @MgtowRubicon 2 ปีที่แล้ว +1

    mental note: always delete your bash history file before logging off, because you never know who will look at it when the PC is out of your control.

  • @silence___
    @silence___ 2 ปีที่แล้ว +4

    i doubt you will see this but ide like to say thanks for getting linux out there a bit more ive just compiled dolphin from source today ( it was a fucking nightmare) and am currently using unbuntu now.
    while i have many issues now im ironing them out. the only come out when im using the terminal and are surprisingly easy to fix.
    no way in hell im trying gentoo anytime soon, fuck compiling from source.
    i have to say linux runs wonderfully on my little shit box.

  • @postmodernist1848
    @postmodernist1848 2 ปีที่แล้ว +7

    6:35 BTW, you could use "file?" where '?' stands for any (one) non-space character

    • @anon_y_mousse
      @anon_y_mousse 2 ปีที่แล้ว +2

      If it's a range of something he could also use {1..9} or [1-9]. One thing I've found quite useful is when you want to match on 2 or more characters too, such as ls -d [Aa]?* to list everything that starts with an A or a but not merely a or A on their own. I have multiple folders that are sorted alphabetically.

  • @PaulMarcX
    @PaulMarcX 2 ปีที่แล้ว

    Amazing!!! Learnt so much

  • @pskry
    @pskry 2 ปีที่แล้ว

    RedmondXP. A man of culture.

  • @youreyesarebleeding1368
    @youreyesarebleeding1368 2 ปีที่แล้ว +1

    I saw that you had two GPUs when you did neofetch, but they're different GPUs. Is that for GPU passthrough for gaming (or doing other GPU intensive tasks) on a KVM?

  • @absmustang
    @absmustang 2 ปีที่แล้ว

    Clearly you saved the best for last. I’m definitively using that one next time I boot

  • @penguin86bitals
    @penguin86bitals 2 ปีที่แล้ว +2

    Every time I see japanglish like "uindouzu" here I smirk to the brink of death.

  • @DandiYuan
    @DandiYuan 9 หลายเดือนก่อน

    !$ should be mentioned too, it's expand your last word of previous command, it's handy when your last command is a file name or directory, then you can do cd !$ or vi !$. great video as always

  • @tellmey1
    @tellmey1 2 ปีที่แล้ว

    You have a great day as well Sir!

  • @aiden_3c
    @aiden_3c 2 ปีที่แล้ว

    I have been using Linux for almost a decade and am still learning shit. Thank you lol

  • @kurtmueller2089
    @kurtmueller2089 2 ปีที่แล้ว +1

    I have been using Linux since SuSe 8.2 came out, and I learned a lot of new thing in this video.
    Thanks a lot!

  • @flleaf
    @flleaf 2 ปีที่แล้ว

    this is his funniest thumbnail yet

  • @xXkatchillaXx
    @xXkatchillaXx 2 ปีที่แล้ว +3

    based

  • @Julzaa
    @Julzaa 2 ปีที่แล้ว +1

    Btw to open .bash_history you can just type history, otherwise I didn't know that ! command, that's pretty neat

  • @thespider7898
    @thespider7898 2 ปีที่แล้ว +1

    I usually just use up arrow to cycle through the history

  • @maherhayek9696
    @maherhayek9696 2 ปีที่แล้ว

    2:13 Here's faster way to do substitution:
    ^old^new
    Or in this case:
    ^status^start

  • @aliceryan7053
    @aliceryan7053 2 ปีที่แล้ว

    I like this channel I always learn new things from these videos.

  • @Penderdrill
    @Penderdrill 2 ปีที่แล้ว +1

    wow kenny thank you for these amazing tips mr. admin

  • @lowhigh3426
    @lowhigh3426 2 ปีที่แล้ว +7

    Can't wait to be the coolest gay at the office
    !!:s/gay/guy

  • @Iujyrino
    @Iujyrino 2 ปีที่แล้ว

    I can feel my power level rising

  • @costa_marco
    @costa_marco 2 ปีที่แล้ว

    Oh, the thumbnail... You naughty, you...

  • @KaiserTheAdversary
    @KaiserTheAdversary 2 ปีที่แล้ว +1

    Quality vid my dude 👍

  • @jonathan1100
    @jonathan1100 2 ปีที่แล้ว

    I am learning that there's always something new to learn about GNU/Linux despite how long I'd used it. Amazing stuff! :)

  • @cogitator1213
    @cogitator1213 2 ปีที่แล้ว

    When she asks you "Hey, do you use Ubuntu or Manjaro?", and you just reply "Fedora, ma'am".
    Best day of my life (has yet to come)

  • @operaix1343
    @operaix1343 2 ปีที่แล้ว

    Emacs does not need to be installed on the server, you can use it on the client and connect via ssh to the server directly from there (not the usual terminal emulator), and safely use your configuration of emacs

  • @max8989max
    @max8989max 2 ปีที่แล้ว +1

    You're the Jayson Tatum of Linux!!!

  • @softer24
    @softer24 2 ปีที่แล้ว +3

    Do more command line videos / VIM videos plz.

  • @DragonsFire-o6y
    @DragonsFire-o6y 2 ปีที่แล้ว +5

    Where did you get that amazing wallpaper

    • @Kid420
      @Kid420 2 ปีที่แล้ว

      I need it 😭

  • @joshb7415
    @joshb7415 2 ปีที่แล้ว +1

    history | grep filters history by that word, also history has a number bedside each command, you can !n where n is the number to run the command, also I disagree on cli being superior, I do a lot of work with aws and its way easier on the gui, 1 click is like 3 commands sometimes

  • @1REDGOBLIN
    @1REDGOBLIN 2 ปีที่แล้ว

    Vim is crucial to know, sometimes you don't have any other option, say you connect to a ssh server or a kubernetes pod that has minimal installation and you dont have permission to use apt.
    I use vim extension to vscode ( because sometimes you just need to use an IDE).

  • @Ligands23
    @Ligands23 2 ปีที่แล้ว +4

    _"You don't wanna be that guy asking if it's okay to install emacs... get comfortable with Vim"_
    ...no, I would much rather just be that guy D:

    • @perpetualsystems
      @perpetualsystems 2 ปีที่แล้ว +1

      If your company is forcing you to use a specific text editor, that's a pretty shitty company lol.

  • @jarro2778
    @jarro2778 2 ปีที่แล้ว +1

    Damn thats a really cool DE theme

  • @lostphysicist
    @lostphysicist 2 ปีที่แล้ว +3

    The exclamation mark commmand is a trap... professional programmers already understand why mutating states is bad idea. That's why functional programming is safer.

  • @amicloud_yt
    @amicloud_yt 2 ปีที่แล้ว

    dude more of this please

  • @angusmacgyver
    @angusmacgyver 2 ปีที่แล้ว

    !* was nice, I try to remember that and use it. Do you do any programming?

  • @sleekweasel
    @sleekweasel 2 ปีที่แล้ว

    Hmm. Unconvinced about !-3* - unless there's an in-line expansion you can see and verify before running it. Also, use ? to match a single character or {...} to specify the endings. Or up-arrow to see the parameters and edit the start of the line.

  • @boringahhchannel
    @boringahhchannel 2 ปีที่แล้ว

    Can you make a video about systemd?
    I really would love your point of view.

  • @MrLazini
    @MrLazini 2 ปีที่แล้ว +1

    another really helpful one is repeating the last command start with an 'f' for example, would be " !f "
    so if you remember the first letter(s), you can do multiple commands from history really quickly
    e.g.
    !bison
    !flex
    !gcc
    or
    !b
    !f
    !g

  • @adamflyshotmail
    @adamflyshotmail 2 ปีที่แล้ว

    I'm just learning, but im already the guy who makes scripts in the office. So thank you.

  • @marlo6846
    @marlo6846 2 ปีที่แล้ว

    What amazing shell color scheme are you using and how do I get it?!

  • @wronek5573
    @wronek5573 2 ปีที่แล้ว +3

    7:36 Wouldn't chmod 777 file[12345] work as well? Especially if you haven't typed anyting related to those files in your terminal, like creating them.

    • @tissuepaper9962
      @tissuepaper9962 2 ปีที่แล้ว +2

      file? and file[1-5] should also work

  • @damnedmadman
    @damnedmadman 2 ปีที่แล้ว +2

    Shame you didn't mention the Ctrl+R trick!

    • @martinvandenbroek2532
      @martinvandenbroek2532 2 ปีที่แล้ว +1

      That is because CTRL-R is a default GNU Readline Library shortcut. He advocates using vi mode. So you probably have to tediously switch out of vi insert mode by pressing ESC followed by a sequence of other keys in order to achieve the same.

  • @defekto.
    @defekto. 2 ปีที่แล้ว

    Honestly way more useful would be SSH tricks. Configuring it to use jumphost for certain Networks, using your ssh user by default, setting custom Ports for certain Servers, etc. Also interesting for new users might be common grep commands and for loops in the shell.

  • @Veptis
    @Veptis 2 ปีที่แล้ว

    I am kinda interested in getting there, but I don't feel comfortable with going there. so much to strive for.

  • @guilherme5094
    @guilherme5094 2 ปีที่แล้ว

    Thanks👍

  • @deadeye1982a
    @deadeye1982a 2 ปีที่แล้ว +2

    Useful tool: github.com/nvbn/thefuck
    Cool shell written in Python with Python syntax and shell support: xon.sh/

  • @jameshertz2461
    @jameshertz2461 2 ปีที่แล้ว

    What really made me look cool was to use CTRL+L instead of clean 😎

  • @aster.ækes
    @aster.ækes 2 ปีที่แล้ว +1

    damn boy got the threadripper just to drive arch

  • @notuxnobux
    @notuxnobux 2 ปีที่แล้ว +1

    Protip: Use Ctrl+R in combination with the fzf program for a much better command search experience

    • @JoshuaGutz
      @JoshuaGutz 2 ปีที่แล้ว

      I use ctrl+r all the time, never heard of fzf, looking into it now. What's awesome about it?

    • @neoney
      @neoney 2 ปีที่แล้ว

      @@JoshuaGutz quick