8 super heroic Linux commands that you probably aren't using

  Рет қаралды 725,768

Engineer Man

Engineer Man

Күн бұрын

Linux has tons of nifty commands, here's eight more to add to your toolbox.
Hope you enjoyed the video!
Check out this code here:
github.com/engineer-man/youtu...
Join my Discord server to chat with me:
/ discord
Check out some code on my GitHub:
github.com/ebrian/engineerman
Tweet me something funny on Twitter:
/ _engineerman
Say hi over at Facebook:
/ engineermanyt
Sincerely,
Engineer Man

Пікірлер: 1 700
@deineroehre
@deineroehre 5 жыл бұрын
Finally! A KZfaq video with content straight to the point, no useless babble, no unnerving background music.
@1pcfred
@1pcfred 4 жыл бұрын
I was watching a video last night that had good content but before it was done the looping background music caused me to stop it. Half the comments were a complaint about the music too. So it wasn't just me. I'm not saying background music is always bad, but it is not easy to get it right.
@saidelbiev5326
@saidelbiev5326 3 жыл бұрын
'Hello my name is XXXX XXXX welcome to my channel. Today I'm going to show you show to XXXX. I hope you like the video. If you do, click the Like and Subscribe button. Well, enough talk, lets dive into it!! *** 10 secs of intro music *** Do you also have the problem that XXXX? Sometimes you think XXXX and you dont know what to do? There is a way out of this problem! *** Actual video content *** More or less like that, every damn youtube video.
@johnlovell8299
@johnlovell8299 3 жыл бұрын
Amen!
@lmnts556
@lmnts556 3 жыл бұрын
This right here is very underrated. Assholes forcing 10 minute videos for ads and just fills them with useless thoughts no one wants to hear or care about.
@darylthomas7317
@darylthomas7317 3 жыл бұрын
You guys must be fun at parties :P
@AnkhArcRod
@AnkhArcRod 5 жыл бұрын
I am always doubtful of videos claiming "....you probably aren't using". But, this video did not miss its mark! Thanks for the info.
@sirius4k
@sirius4k 4 жыл бұрын
Most of the "x things you didn't know" videos are shit. Regarding Linux, I know that there way waaaaay more things than 8-9, that I know, so it's safe to check it out. I ended up knowing 1.
@dingdong2103
@dingdong2103 3 жыл бұрын
I use most of those daily. I must be a super hero then...
@AnkhArcRod
@AnkhArcRod 3 жыл бұрын
@@dingdong2103 Lol...sure, whatever makes you feel good about yourself!
@SriNiVi
@SriNiVi 4 жыл бұрын
Very precise. No BS introductory talks. Information dense. No interrupts. No distracting elements on the video or the narration. Extremely well made. Love this format of yours. Keep 'em coming.
@martinusvanbrederode4080
@martinusvanbrederode4080 5 жыл бұрын
Alternative to number 5: ^abc^abd this repeats the last command, replacing abc by abd
@mrBrownstoneist
@mrBrownstoneist 4 жыл бұрын
gem
@raygervais4513
@raygervais4513 5 жыл бұрын
I normally don't comment, but I have to say just stumbling onto your channel and this video changed the very tone of my night. I went from wanting to relax and be unproductive to wanting to hack away more on a Linux terminal in the late hours and discover more hidden gems. Seriously this is great content I'm sharing with all my coworkers and programmer friends alike.
@EngineerMan
@EngineerMan 5 жыл бұрын
Thanks for the kind words, glad I was able to provide some inspiration :)
@tobortine
@tobortine 5 жыл бұрын
Currently using 0/9 but will use one or two of them in the future. Great format please do more.
@mark_pape
@mark_pape 5 жыл бұрын
tobortine same here
@QU3D45
@QU3D45 5 жыл бұрын
and here...
@richtraube2241
@richtraube2241 5 жыл бұрын
Same here.
@AdamWebbadamwbb
@AdamWebbadamwbb 4 жыл бұрын
I do alot of linux. I am certified in linix and even these commands escaped me. The one that will be most likely used the most would be sudo !!
@aidenlangley6439
@aidenlangley6439 5 жыл бұрын
Definitely getting a crontab going on my buddy's computer to create 10000 folders every second
@justanotheryoutuber739
@justanotheryoutuber739 5 жыл бұрын
and disown that command with an added sleep so the chaos begins an hour after you leave the laptop
@kevinbillingsley8256
@kevinbillingsley8256 5 жыл бұрын
You could use awk and create the folders plus put a locked file in each one. :)
@DaVince21
@DaVince21 4 жыл бұрын
A crontab that runs every second? How does that work?
@svampebob007
@svampebob007 3 жыл бұрын
@@DaVince21 */1 * * * * ( /get/fucked/noob.sh) */1 * * * * ( sleep 1 ; /get/fucked/noob.sh) */1 * * * * ( sleep 2 ; /get/fucked/noob.sh) */1 * * * * ( sleep 3 ; /get/fucked/noob.sh) */1 * * * * ( sleep 59 ; /get/fucked/noob.sh) sure you'd be executing 60 jobs every minute, but hey it's not your pc :)
@AbhishekBM
@AbhishekBM 3 жыл бұрын
After seeing all these comments Satan: Just wanna say, huge fan.
@AlexRamsbey
@AlexRamsbey 3 жыл бұрын
I know this is an older video of yours, but I do like this format and I find it very educational! Thank you for your content.
@chuckn2x
@chuckn2x 5 жыл бұрын
If you aren't root but need to store stuff in RAM, you can create files in /dev/shm
@alherrera9390
@alherrera9390 5 жыл бұрын
I`ve seen a lot of SSH tunneling tutorials and you, in no time, clearify a lot of stuff in no time. Kudos for that.
@ooorkanooo
@ooorkanooo 5 жыл бұрын
I guess he did it in no time!
@HotShotMechPilot
@HotShotMechPilot 5 жыл бұрын
That disown command is exactly what I needed for a script and could not find the solution anywhere else! Great Work!
@benkramer3194
@benkramer3194 5 жыл бұрын
Screen instead of disown for unreliable connections :)
@farazsaidan
@farazsaidan 5 жыл бұрын
better even, tmux
@armynyus9123
@armynyus9123 5 жыл бұрын
when you know before that you'll be gone until it finishes - yes. But normally you don't work *always* in screen and friends - then disown is perfect when boss wants unscheduled meeting right now and you need your laptop in the meeting room, i.e. disconnect - but that build is running, having spawned subprocesses ....
@benkramer3194
@benkramer3194 5 жыл бұрын
@@armynyus9123 unreliable connections, not unreliable bosses :)
@wiredrat1
@wiredrat1 5 жыл бұрын
@@farazsaidan you can upgrade to byobu
@senantiasa
@senantiasa 4 жыл бұрын
I use tmux on commonly used systems, but there have been times where I touch systems I don't own/maintain and I think this command could be useful (just found out about it).
@yrussq
@yrussq 5 жыл бұрын
Short, straight to the point, useful. Brilliant!
@PeterGalbraith
@PeterGalbraith 5 жыл бұрын
Been using linux from terminals for 25 years and most were new to me. Awesome!
@sysstemlord
@sysstemlord 4 жыл бұрын
I have been using Linux for about 5 years and I know most of them, what have you been using Linux for? :)
@PeterGalbraith
@PeterGalbraith 3 жыл бұрын
@@sysstemlord There was no KZfaq or even web sites when I started to show you tips. 🤷
@joshharding6925
@joshharding6925 5 жыл бұрын
Got to admit, most of these commands I didn't know about and I've been using Linux for over 20 years! Subscribed! Can't wait for the next KZfaq installment
@marloelefant7500
@marloelefant7500 5 жыл бұрын
8:11 I'd recommend a terminal multiplexer such as gnu screen or tmux for such use-cases. Not only will it continue running all your processes when you detatch (or the connection fails), but when you come back, you will see everything the same way as you left it (if you didn't restart the machine). Moreover, it allows you to have multiple screens and multiple sessions in only one window. It's an incredibly useful tool especially for ssh connections.
@smichaud7
@smichaud7 4 жыл бұрын
I wanted to give the same comment. Tmux is very useful.
@mau5che
@mau5che 5 жыл бұрын
here's a command many people probably don't use: man bash
@james_gemma
@james_gemma 5 жыл бұрын
lol
@AliasdHacker
@AliasdHacker 5 жыл бұрын
​@@james_gemma​ Is that a command to make a man bash something?
@MrFace
@MrFace 4 жыл бұрын
feminist flavor of *nix
@james_gemma
@james_gemma 4 жыл бұрын
@@MrFace Feminist only use SystemVag or SystemV for short. Others use SystemDick or SystemD
@seanshuping
@seanshuping 4 жыл бұрын
man mount... If you're into that sort of thing 😁
@jasong2269
@jasong2269 5 жыл бұрын
love this format. also, i didn’t know about hitting space before a command or about fc. awesome.
@DraganovDesigns
@DraganovDesigns 3 жыл бұрын
Loved the video format! I learned a lot about issues I have been having and clearly didn’t know the solution to them. Thanks. Keep up the good work!
@redamastouri
@redamastouri 4 жыл бұрын
We need more of this commands, they’re extremely helpful to my task I’m doing. Thanks for the video
@normangeist890
@normangeist890 5 жыл бұрын
It might be worthwhile to mention that you can control the editor program to use for ctnl+x+e or fc with exporting the environmental variable EDITOR, e.g.: export EDITOR=nano
@patrickFREE.
@patrickFREE. 4 жыл бұрын
bro how it works for arch?
@xrafter
@xrafter 3 жыл бұрын
@@patrickFREE. The same thing why? And this is. Bash variable you may used zsh in arch
@brianh.000
@brianh.000 11 ай бұрын
I was looking for this comment. I got an error saying, "emacs: command not found", and assumed there was a default editor set. (I'm a vi user). $ EDITOR=vim did the trick.
@Andrath
@Andrath 5 жыл бұрын
Reverse a file, handy for last/lastcomm: tac (cat in reverse)
@fiddlermikey
@fiddlermikey 5 жыл бұрын
I have used 2 of these regularly (#3 and #8) when creating automation build scripts. I was always trying to speed up portions of the build and would try to farm out disk-intensive tasks to virtual RAM disks whenever possible. Being able to partition output from different parts of the build to different logs would not have been possible without the tee command. I plan to try to use more of these techniques.
@bwleeds
@bwleeds 4 жыл бұрын
That's one of the most informative videos I've seen. Straight to the point and perfect explanations for each. Good video format too!
@MathiasHomann
@MathiasHomann 5 жыл бұрын
Like he says at the start... you can be using linux for 25 years and still learn something. 1, 2, 5, and the bonus trick were totally new for me.
@lorincszabo7411
@lorincszabo7411 5 жыл бұрын
exact same for me
@HoldFastFilms
@HoldFastFilms 5 жыл бұрын
sudo bang bang
@yegorpl9973
@yegorpl9973 5 жыл бұрын
Bang батя в здании
@Crux161
@Crux161 5 жыл бұрын
HOLD FAST he shot me down, sudo bang bang - my terminal shot me - down. 😂
@HighestRank
@HighestRank 5 жыл бұрын
Bad system call
@phil.4688
@phil.4688 5 жыл бұрын
I was Linux, he a -nix We root systems made of X He wore Spark, and I wore ARM He would always win the stack Bang bang I shut him down Bang bang He bit the Grub Bang bang Systemd shut us down
@KaplaBen
@KaplaBen 5 жыл бұрын
sudo gang bang. Oops I made a typo
@tutao2008
@tutao2008 4 жыл бұрын
Dude that’s great, I’m an old man restarting on Linux world and loads to learn, bg, exit from terminal and leave running I’ve tried the rest just saw it briefly. Tks dude and the format is really good, doesn’t cover the screen and ur presence doesn’t cause any inconvenience at all. Congrats man 👏🏼👏🏼👏🏼
@SalmanEstyak
@SalmanEstyak 2 жыл бұрын
Thanks for this. The use case for "disown" reminded me of another useful command that is the "screen" command, which allows us to have multiple sessions using the same terminal. We can get in a session, start some code, get out and things will run in background; and later, we can resume the session.
@circli
@circli 5 жыл бұрын
Yes! More amazing videos! Keep it up. :)
@vibheeshavelayudha1903
@vibheeshavelayudha1903 5 жыл бұрын
Woah this was super useful.... thanks a lot.... need a part 2 of this
@Warlock1515
@Warlock1515 5 жыл бұрын
I didn't know a single one and I loved the format. Way easier to follow along! Thanks!
@DogAndLinuxLover
@DogAndLinuxLover 4 жыл бұрын
Great video. To the point and super informative. I'll probably use at least half of these moving forward. The only one I knew was the creation of folders using the curly braces... Please do more! And thank you!
@chrisshyi8999
@chrisshyi8999 5 жыл бұрын
I learned so much, thanks for sharing!
@theboogymaster
@theboogymaster 5 жыл бұрын
For the last one with disown personally I use tmux or screen this way you can still re attach and have input output available for the command. Nice commands even though I use them all keep up the good work 👍
@ekkehardehrenstein180
@ekkehardehrenstein180 5 жыл бұрын
Dude, im super excited for this video. I understood everything but have no practice using linux. Normally I get over explabored but you hit the mark with the pace and interesting content.
@godgivin4
@godgivin4 5 жыл бұрын
Awesome video, I used 4-5 of the commands but this video format is the exact format I was thinking about doing!
@JamieBainbridge
@JamieBainbridge 5 жыл бұрын
Add "conv=fsync" to your dd command, which flushes pages to disk after dd has finished writing. Otherwise you're writing to pagecache (which is RAM anyway) and will get imprecise results.
@crimsontorso4126
@crimsontorso4126 5 жыл бұрын
Video starts at 0:00 Thank me later
@vibheeshavelayudha1903
@vibheeshavelayudha1903 5 жыл бұрын
Video ends at 8:37 Fuck me later
@ShivamJha00
@ShivamJha00 5 жыл бұрын
Hahaha
@MichaelMantion
@MichaelMantion 5 жыл бұрын
HA
@shikhanshu
@shikhanshu 5 жыл бұрын
this is very helpful... i will thank you right away
@HighestRank
@HighestRank 5 жыл бұрын
Kai West don’t thank me but my video starts at 0:31 and the previous video ends at 0:00, leaving 0:30 for a commercial.
@bruceleealmighty
@bruceleealmighty 3 жыл бұрын
I'm absolutely loving your unobtrusive PnP with no frame. I've only used one of these commands on a regular basis. Thanks for the tutorial.
@ricktardif
@ricktardif 5 жыл бұрын
Great format! I like the disown. Easier and quicker than using screen.
@KevRunsOnDunkin
@KevRunsOnDunkin 5 жыл бұрын
This video is life changing
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
Here’s another one: “mmv” to do bulk renames of files, e.g. mmv «old-pre»\*«old-post» «new-pre»\#1«new-post» will rename all files with names beginning with «old-pre» and ending with «old-post» so they begin with «new-pre» and end with «new-post», keeping the part in the middle the same. This command can be quite dangerous if you get it wrong. So if you try it first with “mmv -n”, it will tell you what it would do without doing it. Then when you are sure you’ve got the patterns right, change the “-n” to “-v”, and it will go ahead and do it, and report what it has done as it goes.
@grim.reaper
@grim.reaper 4 жыл бұрын
Loving all your videos, especially the new rust Lang series... 🥰 thanks a lot for these precious content !!
@s977382
@s977382 5 жыл бұрын
Great video! You are right, there are always new commands and techniques to learn. Thanks for the tutorial
@GRBtutorials
@GRBtutorials 5 жыл бұрын
You forgot to mention that the !! trick works with any command, not just sudo.
@frannelk
@frannelk 5 жыл бұрын
True 👏🏼👏🏼👏🏼
@cartersherman925
@cartersherman925 5 жыл бұрын
Does it just run the previous line with whatever is typed before !! ?
@cll1out
@cll1out 5 жыл бұрын
Also saves in bash history in expanded form so when you use the up arrow for recent commands it doesn’t say “Sudo !!” like you actually typed it it shows the whole effective command.
@nachiketagrawal5154
@nachiketagrawal5154 4 жыл бұрын
@@cartersherman925 !! just basically replaces itself with previous command. Example if you typed ls as first command, then you can do the following: sudo !! -al to do sudo ls -al
@____-gy5mq
@____-gy5mq 4 жыл бұрын
!-1 !-2
@ItsMeooooooo
@ItsMeooooooo 5 жыл бұрын
for history ignoring lines with whitespaces you need 'HISTCONTROL=ignoreboth' to be set
@poe12
@poe12 5 жыл бұрын
If you want to not show your ascii art in the history, vi :sh
@kingneutron1
@kingneutron1 5 жыл бұрын
Thanks for that! You shouldn't rely on the "leading space" method tho, if you want to guarantee commands don't make it into history you can always ' unset HISTFILE '
@deleatur
@deleatur 5 жыл бұрын
Well, these are not commands but are useful tips: 1) Ctrl+t, if you need to swap last two typed letters, i.e. "daet"->"date" 2) To correct a mistyped executed last command without rewriting, i.e. you typed "daet" and pressed enter. You can fix it this way: ^et^te, press enter and see the results (obviously this suits better with long commands). In short: ^(wrong)^(right) Just for clarity, one more example: You executed "sotr". You fix it executing ^tr^rt.
@mightymoon420
@mightymoon420 5 жыл бұрын
Thanks for the video mate! I like the format and it is very informative this way.
@chlordk
@chlordk 5 жыл бұрын
When new to the curly bracket stuff, debug by prefix it with "echo". Try: echo mkdir -p folder/{sub1,sub2}/{sub3,sub4}
@divine_swine9665
@divine_swine9665 5 жыл бұрын
Awesome format. I’m not new to terminal commands, but I’m now to the Linux distros. Im enjoying them. Good stuff Edit: My comment doesn’t make sense. I’m now to Linux, but not new to using terminals. Edit #2: editing for *1st Edit:* comment: *new* to Linux...
@bakedutah8411
@bakedutah8411 5 жыл бұрын
[YT Comment Linter v3.4] ERROR 23, Line #6: Too many colons. [YT Comment Linter v3.4] WARN 12, Line #6: Too much gibberish.
@dushk0
@dushk0 5 жыл бұрын
Just edit the comment, dude!
@noweare1
@noweare1 5 жыл бұрын
Give it up : )
@dewebbutler2829
@dewebbutler2829 3 жыл бұрын
That RAM disk trick is awesome! Straight up subscribed to your channel right away.
@devbites77
@devbites77 3 жыл бұрын
Really informative, and straight to the point. I didn’t know about most of these, especially the disown. Thanks.
@sethbrown1763
@sethbrown1763 5 жыл бұрын
I didn't know about "disown". I'd use "screen" for this purpose since it allows re-connecting to a running shell later. I don't use "fc" since I have "set -o vi" set in my shell, so Esc, v does the same thing. I've never had need to use a RAM disk (other than the initrd). What's your use case for RAM disks from the command line? Thank you for this video. I think it's a good idea to find obscure & useful commands that get forgotten over time.
@brymstoner
@brymstoner 5 жыл бұрын
I use Byobu. Makes maintaining my servers a dream.
@miguelandrade5964
@miguelandrade5964 5 жыл бұрын
Ramdisks can be useful in some (but not very frequent) workflows. Example: ETL Extract Transform Load. Extract to Ramdisk, do whatever you must do, load from ramdisk. If the transformation part is long you'll start loving Ramdisks .
@celivalg
@celivalg 5 жыл бұрын
When I did some data manipulation for deep learning, I had to transform my data set into something more sensible to be used for training, did a small python script for it, but due to the amount of data, it took a few minutes to run, this could have helped me reduce the time by a lot.. I could also have reduced the complexity of the script but not without a few hours of work, so not worth it
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
screen is very useful. It is also what I would probably use to perform multiple tasks or time-consuming tasks on a remote machine.
@celivalg
@celivalg 5 жыл бұрын
Lawrence D’Oliveiro I don’t use it a lot since I don’t work that much with remote machines and I got I3... I know there are some other features that screen has but i3 doesn’t but I still prefer using i3 over screen for tiling terminals...
@nathanlewis42
@nathanlewis42 5 жыл бұрын
I always used nohup to keep processes from being killed. Good to know there’s another way.
@ktear
@ktear 5 жыл бұрын
Hardcore man, great format! I’ve been a Unix guy for over 20 years and learned a couple things from this video. I may have known them at one time but there’s so much to forget that I’m not sure at this point.
@xenialxerous2441
@xenialxerous2441 5 жыл бұрын
Hey there!! Super amazing video, loved it thoroughly.. I knew the first cmd(sudo!!) & other 2/3 more, but the others were awesome!! Thnk you so much!!
@skaltura
@skaltura 5 жыл бұрын
You do not need to create a ramdisk under linux, just use /dev/shm directly. Fully POSIX compliant, you will not know the difference from a regular Ext4 FS. In essence mount -t tmpfs tmpfs works pretty much like mount -o bind :)
@MichaelMantion
@MichaelMantion 5 жыл бұрын
you lost me. does the folder /dev/shm automatically run on ram or something?
@skaltura
@skaltura 5 жыл бұрын
@@MichaelMantion Yes. SHM stands for SHared Memory. www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html THO! Unlike on that page, i don't think you need to mount it specifically, i cannot recall ever doing that.
@skaltura
@skaltura 5 жыл бұрын
@@MichaelMantion Checked, Ubuntu based distros auto mount it by default, but i recall years ago using on Debian we didn't even mount it and it was available as it is a device. Might be that the mounting thing is more of convenience type of thing (easy clearing and assurance to end user)
@lylestavast7652
@lylestavast7652 5 жыл бұрын
@@skaltura kernel configurable. You're eating your system semiconductor ram to use it, so if you're on a low memory system compared to useage needs - you might consider a disk based option ...
@jamestanis3274
@jamestanis3274 5 жыл бұрын
This is true for linux, but what abut Solaris, or HP(s)UX (do hey still exist) or any of the other unixen out there? Do the embedded unixen all have /dev/shm? It's worth understanding what's going on. Besides I believe the /dev/shm is often just the result of an fstab entry, so it's really just the same thing as what the presenter said.
@ankurbhatia24
@ankurbhatia24 5 жыл бұрын
1/9. Thanks for sharing. Keep sharing.
@bpoole007
@bpoole007 3 жыл бұрын
I’ve been using Linux professionally for a long time and never knew about Ctrl+x+e and fc. the rest I use pretty often, so thanks for helping out
@azenpunk
@azenpunk 4 жыл бұрын
This is the quickest I've ever subbed to a channel. One video and done. Thank you, sir. These will be super helpful.
@EngineerMan
@EngineerMan 4 жыл бұрын
Welcome! Glad you enjoyed the video!
@chaturvedikuldeep
@chaturvedikuldeep 5 жыл бұрын
Currently using 8 of 9, disown is the new command I have to own. Thanks for this interesting post.
@LinuxPlayer9
@LinuxPlayer9 4 жыл бұрын
This is amazing I am so impressed by the power of Linux
@SevenThunderful
@SevenThunderful 5 жыл бұрын
Good stuff. Reminds me of when I first learned about pushd and popd to keep a history of the directories I had visited on a stack.
@stucorbishley
@stucorbishley 4 жыл бұрын
This is great! Some real nifty things in there, the command+editor stuff is gold!
@dvo66
@dvo66 5 жыл бұрын
2:39 Hackerman Intensifies
@LarsHolmVV46
@LarsHolmVV46 5 жыл бұрын
Great video - nice fast speaking tempo. I knew only 3 and I gotta try the sudo !! Damn...
@philipnelson5
@philipnelson5 5 жыл бұрын
I add this alias to my bashrc alias pls='sudo $(fc -ln -1)' Then when I need to re-run a command as root I just need to ask nicely ;)
@LarsHolmVV46
@LarsHolmVV46 5 жыл бұрын
Yeah, Thats Korn Shell syntax, adapted by Bash. I Think the variable LINENO -eq the number of last command executed.
@EdnovStormbrewer
@EdnovStormbrewer 3 жыл бұрын
Been a linux user since 2012 and taught myself how ls -l works. Very useful and handy command. So glad to see that this is being spoken out and recommended by an engineer along side of other commands I never heard of.
@sagarsutar7318
@sagarsutar7318 4 жыл бұрын
Amazing! That Folder command was mind blowing! I started to learn Linux a few week back and also am encouraging First year graduates to learn Linux too!! Will share this video later on with them!
@linuxgaminginfullhd60fps10
@linuxgaminginfullhd60fps10 5 жыл бұрын
You already have /dev/shm mounted by default to store things and files in memory.
@jamestanis3274
@jamestanis3274 5 жыл бұрын
In Linux sure. On other unixen too? Anyhow, I'm also wary that I will fill up /dev/shm and forget, thus causing the machine to start to thrash. SSD are a better answer -- and not that expensive.
@Andrath
@Andrath 5 жыл бұрын
For people using real editors (vim), if you need to write a file with sudo: :w !sudo tee %
@ibjacked
@ibjacked 5 жыл бұрын
Cool, that's a good one, thanks!
@tetrahedrontri
@tetrahedrontri 5 жыл бұрын
Jesus thank you.
@markus-hermannkoch1740
@markus-hermannkoch1740 5 жыл бұрын
Ah, Vim :-). Attempting to understand your example: User finds ':w' won't work. Permission denied. Instead pipe all the editor's content into 'sudo tee %' (the '!' executes a shell command). That will overwrite the currently open file since '%' in that command line context will be replaced by the current file name. At least this feels sensible.
@kevinbillingsley8256
@kevinbillingsley8256 5 жыл бұрын
People who use _real_ editors tend to be _real_ arrogant jackasses.
@markus-hermannkoch1740
@markus-hermannkoch1740 5 жыл бұрын
@@kevinbillingsley8256 , vim has a certain learning curve. Once a certain point is passed it proves to become quite the swiss army knife and very versatile. Myself, I am using it for about 20 years now virtually every day at work, am happy, and sometimes enjoying the text-adventure that also is vim. Recommend vim to fellow nerds (e.g., people watching videos like this one). Just do not badger the non-IT people and you are socially fine. Btw. nothing against nano. IMHO any Linux fanboy ought to bring nano basics if only for the fact that it seems to replace vim as the default onboard command line editor. Meaning, a fresh Linux will probably already have nano available where vim still would need being installed.
@julsbende3427
@julsbende3427 5 жыл бұрын
Thanks for this video.. Really didn't know about "sudo !!" so far.. I had already days where this command could have saved me time to go for 2-3 extra coffes :'D Yeah the video format is awesome and I would love to see similar videos in the future! Really appreciate your work!
@zapy422
@zapy422 5 жыл бұрын
You saved the best for the last, now I can my notebook without worrying about closing the terminal. Thank you so much. We want more. One worth mentioning also may be the parallel command
@dawiss9418
@dawiss9418 5 жыл бұрын
Zapy i recommend you tmux or screen or byobu... to rule them all
@DanDanciu13
@DanDanciu13 5 жыл бұрын
You used bg. Why not include it in the list? I doubt there are many people that use that too.
@nilsirl
@nilsirl 5 жыл бұрын
yeah, This is the most useful command I learned by watching this video.
@wulymammoth
@wulymammoth 5 жыл бұрын
It it then necessary to share the rest of the useful commands: - suspend the current process (I use this to suspend Vim to run tests in the same window): ctrl+z - list processes: jobs - foreground one of the options listed in jobs: % - foreground the most recently suspended process: fg EDIT: 12/23/18 - change background to suspend
@tekvax01
@tekvax01 5 жыл бұрын
you can also put a & at the end of the line to place the command in the background and not use ctrl Z ie sleep 120 &
@SeverityOne
@SeverityOne 5 жыл бұрын
@@wulymammoth You don't :put it in the background", you suspend it with Ctrl+Z. To put it in the background, that's what bg is for.
@wulymammoth
@wulymammoth 5 жыл бұрын
@@SeverityOne you're right! Gotta use bg for that. corrected :)
@kirkanos771
@kirkanos771 5 жыл бұрын
the space character to avoid history doesnt work on most of latest linux distrib. the command with the space is stored in the history aswell.
@techworld7716
@techworld7716 4 жыл бұрын
I agree. I tried it on Centos7 and it didn't work.
@lazarborisov3664
@lazarborisov3664 4 жыл бұрын
try HISTCONTROL="ignorespace" and then a command with a space
@jakistam1000
@jakistam1000 4 жыл бұрын
I tried it on Mint 19 without changing any settings and it works
@KanishkkaKeshav
@KanishkkaKeshav 4 жыл бұрын
there is a specific word that needs to be added to your .bashrc only then it would work ---- never by default.
@jakistam1000
@jakistam1000 4 жыл бұрын
@@KanishkkaKeshav I've found it - HISTCONTROL=ignoreboth. However, it was this way by default.
@Iain0101
@Iain0101 5 жыл бұрын
Nice to learn about disown as I’m always leaving terminal windows open with running processes. Good stuff.
@spaceiswater6539
@spaceiswater6539 5 жыл бұрын
wow this is totally awesome, please keep making Linux videos I learned so much from just 8+mins thank you so much.
@davidhernandeze
@davidhernandeze 5 жыл бұрын
1:20 lol I always try to hide my own nudes folder
@benjaminforest1176
@benjaminforest1176 3 жыл бұрын
maybe it was nodes, like server nodes :DD not nudes :DDD
@bruhdabones
@bruhdabones 5 жыл бұрын
[up arrow key] + [home key] and then you type “sudo”. EASY!
@love-hammer
@love-hammer 5 жыл бұрын
Thank you! So many commenters here need to learn how to use their keyboard first, apparently. It's also safer because you always know what you're running as root instead "what ever the last thing I said because there are no consequences to my commands." Might as well use "sudo -s".
@maramauu
@maramauu 5 жыл бұрын
You have to strike 7 keys, sudo!! Only 6 :-P
@MichaelMantion
@MichaelMantion 5 жыл бұрын
except my laptop doesn't have a dedicated home key so i have to do a FN home.. Easier to just do sudo !!.
@Zestysoft
@Zestysoft 5 жыл бұрын
@SaltyBrains Using Putty (Windows), when I CTRL+A I get ^A. When I try the home key, it capitalizes the previous character. This is using the bash shell in Fedora 27. sudo !! works without dealing with this crap and I'm not a fish -- I can remember the last command I just typed.
@F3Ibane
@F3Ibane 5 жыл бұрын
@SaltyBrains get on that tmux game and embrace ctrl+b
@deutscher649
@deutscher649 4 жыл бұрын
That last command is bad ass. Really helped me put with a project I'm working on. Thank you good sir.
@nickarts6595
@nickarts6595 2 жыл бұрын
Man I enjoy your videos, and always learn something! Thanks a lot!
@alexvasser5104
@alexvasser5104 5 жыл бұрын
i'm a linux super linux noob so i'm hyped that i knew one or two of these already. sudo bang bang FTW
@handsomepixel5193
@handsomepixel5193 5 жыл бұрын
I know this is meant for Linux, but that "sudo !!" command also works on mac! I didn't even know something like that existed! The amount of times I've run commands, only to forget that they require root, is more than the grains of rice I've ate in my life.
@samuelhackson828
@samuelhackson828 5 жыл бұрын
Most, if not all of the commands will work on Mac OSX because it uses the same shells that you can run on Linux. It‘s bash by default.
@flanadu
@flanadu 5 жыл бұрын
!! is a bash operator. I believe bash is the default shell on macos.
@handsomepixel5193
@handsomepixel5193 5 жыл бұрын
@@flanadu It is, it's just that I didn't find out about these commands before, and some commands require installing packages on macOS using brew, which is why things like this surprise me since I didn't need to install anything beforehand. I've changed my default shell to zsh, no difference in commands whatsoever, I just like the sub string search functionality :)
@flanadu
@flanadu 5 жыл бұрын
@@handsomepixel5193 I also use zsh as my shell on both macos and linux. You should checkout oh-my-zsh if you're a zsh fan. github.com/robbyrussell/oh-my-zsh
@handsomepixel5193
@handsomepixel5193 5 жыл бұрын
@@flanadu I've used oh-my-zsh before, but it was too much "zsh power" for me too handle. The plugins were nice, but I wanted a simpler and faster setup, so I instead downloaded the individual plugins myself and auto-source them through my .zshrc I use zsh-syntax-highlighting and zsh-async-git-prompt, and I consider that enough for now.
@sordahl
@sordahl 5 жыл бұрын
The Redis port one... mind blowing, thanks mate!
@robinhahn6987
@robinhahn6987 4 жыл бұрын
This is about the best video *ever* on the premise "Commands you probably aren't using" - totally taking notes and will be invoking these, most DEFINITELY!
@JasonFavrod1
@JasonFavrod1 5 жыл бұрын
sudo !! : I use ctrl+x+e : I didn't know about, will probably use ramdisk : I didn't know about, will may use if the situation arises, good to know about no history : I use fc : I didn't know about, will probably use ssh -L : use regularly bash curly brace sets : I use tee : I remember it now that you show it. Will probably use. disown : good bonus, saved the best (for me) for last Cheers!
@BR-lx7py
@BR-lx7py 5 жыл бұрын
The "space trick" to exclude a command from history does not work in bash 4.4.19, at least on a Mac.
@charleysheets8142
@charleysheets8142 4 жыл бұрын
Balazs Rau there’s a bash variable called HISTIGNORE that has to be set properly for that trick to work.
@NomadicDmitry
@NomadicDmitry 3 жыл бұрын
Nice, thank you! I especially liked the command "disown". Didn't knew about it at all.
@PieterBreedt
@PieterBreedt 5 жыл бұрын
Great video. I loved the format and found the content very informative.
@treyquattro
@treyquattro 5 жыл бұрын
as expected, !! will repeat the previous command in the shell; it's not a special argument to sudo, e.g.
@HadToChangeMyName_YoutubeSucks
@HadToChangeMyName_YoutubeSucks 5 жыл бұрын
This is correct. if you did blah and then did mkdir !! it would give you mkdir blah, it works with any text
@mladenkorunoski654
@mladenkorunoski654 5 жыл бұрын
The two most helpful commands for me currently are: 1. cd - 2. ( )
@seanshuping
@seanshuping 4 жыл бұрын
cd - is one of my favorites. followed closely by reverse search ctrl + r
@emberleona9278
@emberleona9278 4 жыл бұрын
@@seanshuping rm basename and rm dirname destroyed my distro... i want to replace with zenity xdg-open.
@JessieCrypto
@JessieCrypto 4 жыл бұрын
Video was great. I didn't know like 6 of those and using Linux full time for 2 years and part time since like 2008. Good job.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 жыл бұрын
2:50 This is controlled by the HISTCONTROL variable in Bash. You have options to ignore commands with leading blanks, ignore duplicates, and even erase duplicates before inserting a new entry. There is also HISTIGNORE for more fine-grained control of which commands go into the history list.
@sufiyanadhikari8716
@sufiyanadhikari8716 5 жыл бұрын
For the last one, I personally prefer tmux.
@EngineerMan
@EngineerMan 5 жыл бұрын
Yes, I too like tmux.
@Uneke
@Uneke 5 жыл бұрын
Terminals best friend “Tab” 😉
@johnwythe1409
@johnwythe1409 3 жыл бұрын
Oh yeah, love tab when typing long file names or can’t remember how to spell something. Works at a CMD prompt on that other OS that should not be named. Lol. Slightly different though, sequences through all files that match. Use tab in vi on command line as well to fill out a file name.
@Uneke
@Uneke 3 жыл бұрын
@@johnwythe1409 right!? Oh and the other OS’s name is Linux’s challenged stepbrother 😂
@johnwythe1409
@johnwythe1409 3 жыл бұрын
@@Uneke I meant love it on Linux. Just happened to note what it does under the cmd prompt. I thought since this seems to be a Linux video, I thought I would make a joke vis a vie Voldemort/ Windows.
@cyrustakem7993
@cyrustakem7993 4 жыл бұрын
I knew none of these, but started using a couple of them after seeing this video, and they are very usefull in my work life. Thanks
@sachinchavan2698
@sachinchavan2698 5 жыл бұрын
Once I had to create subdirectory 1...10, For that I created a for loop which runs mkdir Man how noob I was, I wasn't aware of mkdir -p..... Thanks.
@AlexanderBukh
@AlexanderBukh 5 жыл бұрын
It is not -p, it is the curly braces wildcard/expansion/comprehension thing, i think.
@lylestavast7652
@lylestavast7652 5 жыл бұрын
@@AlexanderBukh Yes. The -p makes the parent directory structures needed if they don't exist... the curly brace stuff was the number magic work ;)
@HadToChangeMyName_YoutubeSucks
@HadToChangeMyName_YoutubeSucks 5 жыл бұрын
@@AlexanderBukh -- The braces use recursion to create multiple folders (first brace are the parents, next brace is the child folders to be created in the parents, etc...). The -p creates parent folders if they don't exist. mkdir -p not_a_folder/not_a_subfolder/another_not_a_folder will create all three where if you don't include the -p it will fail because not_a_folder doesn't exist.
@sachinchavan2698
@sachinchavan2698 5 жыл бұрын
@@AlexanderBukh dude I meant.... That command
@SeverityOne
@SeverityOne 5 жыл бұрын
Why on earth are you piping into cat?
@rosangelaserra4552
@rosangelaserra4552 5 жыл бұрын
Damn furries everywhere
@SeverityOne
@SeverityOne 5 жыл бұрын
​@@rosangelaserra4552 In hindsight, perhaps I should have phrased that differently. 🙂
@F3Ibane
@F3Ibane 5 жыл бұрын
Either it's an in-joke for the "useless use of cat" crowd, or maybe it's because it's just a demonstration you silly pedant. 🐱
@monday6740
@monday6740 5 жыл бұрын
The entire command is weird ... why would someone TEE a static file ? Either something other is going on, or it is a very bad example
@karoshi2
@karoshi2 5 жыл бұрын
@@monday6740 the static input seems like an example to me, guess examples are fine. Personally I find | cat > /dev/null much worse. 😱
@juanpabloamorochod.752
@juanpabloamorochod.752 5 жыл бұрын
1st time viewer! Nice video! I've used 5of9 of the commands. Those fc and disown are new to me and are pure gold! Thanks for that. If anyone is interested: More info on those two commands can be found with $help fc or $help disown where $ is means the prompt.
@marcharter839
@marcharter839 4 жыл бұрын
Awesome video, I will definitely use some of these commands. I am new to Linux but I'm loving the power I have.
@iammaxhailme
@iammaxhailme 5 жыл бұрын
Never used ssh -L much, but I used ssh -R to get into my work computer after IT started being security nazis
@OscarSommerbo
@OscarSommerbo 5 жыл бұрын
The security nazis are just protecting the company from users like you.
@TechnoTinker
@TechnoTinker 5 жыл бұрын
And evidently not quite well enough.
@jamestanis3274
@jamestanis3274 5 жыл бұрын
@@TechnoTinker Well that depends on how how you look at it. At a recent job, I created a virtual P2P link over ssh from my home to my desktop at work, so that I would have normal network access to work, so long as I initiated the connection from my home. Since I used ssh(1) with the key they provided, it was technically legal even though it wasn't quite what they expected. It let me get a lot more done because I had certain network-based facilities (like new-email notifications) working for me when I was home and I could check on servers and what not all using the normal commands. I think our security guys must have noticed it, but they didn't mind because, to repeat one last time, the transport was ssh(1).
10 things you can do with Linux that you can't do with Windows
9:05
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 7 МЛН
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 147 МЛН
Understanding Fork Bombs in 5 Minutes or Less
5:55
Engineer Man
Рет қаралды 150 М.
How The 'awk' Command Made Me A 10x Engineer
10:40
RobertElderSoftware
Рет қаралды 167 М.
Tmux Tutorial for Beginners
11:58
Linux Training Academy
Рет қаралды 15 М.
Linus Torvalds: Speaks on Fatigue and the Future of Linux
6:04
Automating Everything in Linux with ENTR!
10:24
Luke Smith
Рет қаралды 190 М.
Tmux will SKYROCKET your productivity - here’s how
10:02
typecraft
Рет қаралды 65 М.
60 Linux Commands you NEED to know (in 10 minutes)
10:50
NetworkChuck
Рет қаралды 1,3 МЛН
How Do Linux Kernel Drivers Work? - Learning Resource
17:02
LiveOverflow
Рет қаралды 531 М.
Linux Command-Line Tips & Tricks: Over 15 Examples!
31:37
Learn Linux TV
Рет қаралды 211 М.
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 3,2 МЛН
Samsung or iPhone
0:19
rishton vines😇
Рет қаралды 9 МЛН
Карточка Зарядка 📱 ( @ArshSoni )
0:23
EpicShortsRussia
Рет қаралды 442 М.
Nokia 3310 versus Red Hot Ball
0:37
PressTube
Рет қаралды 3,8 МЛН
Apple, как вас уделал Тюменский бренд CaseGuru? Конец удивил #caseguru #кейсгуру #наушники
0:54
CaseGuru / Наушники / Пылесосы / Смарт-часы /
Рет қаралды 4,6 МЛН
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 2 МЛН