you need to HACK faster!! (Linux Terminal hacks YOU NEED!!)
Вставка
- Опубліковано 31 тра 2024
- Access your FREE Linux lab here: ntck.co/htbacad (HTB Academy)
Check out hack the box RIGHT NOW:
HTB - ntck.co/htb
Academy - ntck.co/htbacad
Bug Bounty Path - bit.ly/3KVQsSq
Become a wicked fast ninja and learn the best hacks to be fast and efficient when hacking!! As a hacker or really just anyone who uses Linux, you need to know how to navigate the linux terminal FAST!! In this video, NetworkChuck will show you some amazing tips and tricks to help you become a bash shell beast, a linux terminal ninja!!
🔥🔥Join the NetworkChuck Academy!: ntck.co/NCAcademy
**Sponsored by HackTheBox
SUPPORT NETWORKCHUCK
---------------------------------------------------
➡️NetworkChuck membership: ntck.co/Premium
☕☕ COFFEE and MERCH: ntck.co/coffee
Check out my new channel: ntck.co/ncclips
🆘🆘NEED HELP?? Join the Discord Server: / discord
STUDY WITH ME on Twitch: bit.ly/nc_twitch
READY TO LEARN??
---------------------------------------------------
-Learn Python: bit.ly/3rzZjzz
-Get your CCNA: bit.ly/nc-ccna
FOLLOW ME EVERYWHERE
---------------------------------------------------
Instagram: / networkchuck
Twitter: / networkchuck
Facebook: / networkchuck
Join the Discord server: bit.ly/nc-discord
0:00 ⏩ Intro - Becoming a super fast Ninja Hacker
0:30 ⏩ How do you get Linux?!
1:32 ⏩ Launch your bash shell
1:50 ⏩ First hack (cd hacks)
2:42 ⏩ Second Hack!!
4:52 ⏩ Third Hack!!
6:11 ⏩ Using LS
6:20 ⏩ Quick Hack for you!
6:56 ⏩ a Dark Hack - use al
7:45 ⏩ 2 Beautiful Hacks!
9:00 ⏩ Another Quick Hack
9:50 ⏩ Quick Hits
10:41 ⏩ Life Changing Hacks
12:46 ⏩ You Become a Ninja
14:07 ⏩ Log Hacks
15:08 ⏩ A Hack you did not see coming!!
17:08 ⏩ Real Time Logs
17:55 ⏩ A Hack that’s perfect for this time in the video!
AFFILIATES & REFERRALS
---------------------------------------------------
(GEAR I USE...STUFF I RECOMMEND)
My network gear: geni.us/L6wyIUj
Amazon Affiliate Store: www.amazon.com/shop/networkchuck
Buy a Raspberry Pi: geni.us/aBeqAL
#Linuxtutorial #Linux #linuxforhackers - Наука та технологія
As someone who is learning linux ( and has taught myself ) thank you for taking time from your life, to share this valuable information.
I mean, it's not like he does it for free haha. He benefits a lot from these videos as well, it's not like he is giving away "time from his life" as you mentioned lol. He is 1) practicing what he has learned (you solidify your knowledge by teaching), 2) building his brand, and 3) getting ad revenue.
@@0Ciju0 you are 100 correct, but how many people do you know ( regardless of compensation ) would take time to share their knowledge. Personally, if I had his skill set, idk that I'd have the will to sit back, and do what he is doing.
@@toby-aprilseegren3872 I guess what I was trying to say is that some people get satisfaction from helping others, myself included. Its almost "selfish" if you think about it, since helping people makes me feel nice, hehe :)
@@0Ciju0 You can only keep what you have, by giving it away. :)
@@toby-aprilseegren3872 Those who can do...Those who can't teach.
Alternatives to [Ctrl] + [A] = [Home]
[Cttrl] + [E] = [End]
The [Home] and [End] key can be found above the arrow keys
not in every keyboard 🥲
I use this as well as holding Ctrl and pressing left or right arrows to jump word by word, jumping to the beginning or end of each word depending on the direction.
I use home and end on the ssh app on my iPhone. It’s much faster but I use a Bluetooth keyboard with out the home and end keys. The CTRL-A and CTRL-E commands will come in very handy when I’m in an ssh session that did not know
Not on Mac keyboard 😊
@@DaBomb340 Wow I can't believe I never knew about ctrl with the arrows!!! Thanks mate
2 more I would add:
1. !cmd will pull off the last command we used with cmd For example- !cd will pull off last command we used with cd
!ls will pull off last command used with ls
2. Alt+. will scroll through arguments of previous commands
Thanks Chuck for the other hacks🤩😘
Just to add
Ctrl + left or right arrow to skip through words
@@usmanatif5922 Thanks man!
`!#` for numbered commands from `history`, which will persist for quite a while if you come back to a command often.
Alt + < || Alt + >
And thank u for this great information ❤
To Take OUT last word you can use "Ctrl + w"
To search in History you can use "Ctrl + R"
try "Ctrl + (left arrow or right arrow)" while typing in vim editor or any long command
Ctrl + Z to keep file in Background
command:- fg is for to take Background file in foreground
incase multiple files are in Background you can use fg %1 for first file and fg %2 for second file and so on
Chuck's most important tip is at 15:43
Ctrl + p --> previous command
Ctrl + n --> next command
Alternative to arrows keys when browsing command history
Just some random knowledge, you can use ctrl + alt + T to launch the terminal and that way you won't be needing a mouse either. And that way we are even faster.
Or even better, add terminal to startup applications 😁
Not all DEs have Ctrl Alt T mapped to terminal
Me just going ctrl-alt-f1 brrrrr
i just keep terminal as a startup up application lol
I use arch BTW
@@shauryagupta7233 oh I see. I haven't used arch much, I used it just to learn about pacman pkg. Manager. I, so far, have been using ubuntu and kali mostly.
Hey Chuck! I started HTB because of you and I have to say it's a real game changer. I remember hitting my head against a wall trying to learn Linux 10 years ago. However, I've already done this terminal and you add so many little helpful tidbits that aren't exactly explained or presented in HTB (at least not yet). Also, the way you break things down makes more sense than when I read it most of the time so I selfishly want you to basically have a teaching series going through each module haha. Keep up the amazing work, you're the best IT mentor on here and I've been working in IT for 8 yrs (never had to use coding or significant Linux knowledge). Going for my BSIT in Cybersecurity now and I'll be watching every one of your videos!
I've decided after 18 years of HVAC, I'm going to spend the next two years getting certifications for ethical hacking and whatever else I can get, and call it quits and start a new career in networking. All thanks to you Chuck, thank you for the videos, it's been extremely inspirational and educational. Hopefully in 2 years I can call myself a network engineer. Wish me luck!
HVAC makes more money.
Chuck, You were correct with you the less command is called that. Orignally there was a command "more", and most Linux systems still have the command, but it was missing a lot of features so someone rewrite it and released it as "less" which was named for less is more.
I see that 'more' and 'less' commands are still available in some distros.. Thanks for sharing
I think a good followup to this would be the 'alt' commands. You used ctrl commands, like ctrl-u for 'Delete from beginning of line to cursor', but alt does things like "move back a whole word' instead of arrow arrow arrow, and capitalize the word, etc. (So Alt-B to back up to the beginning of a word, alt-C to Capatalize it, or alt-U to uppercase the whole word)
THANKS MAN
Freaking love it bro! As an avid Linux User, this was like playing Jeopardy lol. I knew some things but not all.
Love your teaching style too bro. Great content!
Chuck, " Tail -n 20 /var/log/auth.log " Will get you the last 20 lines of that file. If you use "head -n 20 /var/log/auth.log" will get you the start of the file....and 20 lines down.
If you use only tail /your/file it Will cat 10
line at the end of file
@@defyteryt2452 Than change the number to something else. like 40.
Bro, you're killing it every single time!
Great teacher,
Great stuff!
You can use the less command to tail live logs as well less +F . Then you can use CTRL+c to pause the live logs and you are in viewer mode. This way you don’t have to exit tail and use less to view the log line again because it scrolled by too fast for you to read.
Please do you have any help I can't find the sniffjoke directory
Hey Chuck. really big fan here. I really love your enthusiastic teaching style. I don't think anyone else gets as excited as you about this stuff as you do and I love it.
For those of us currently in IT or looking to get in, we need to Google things all the time. there are 1000s of results.
Could you create something for us to know how to use Google modifiers and how to find a goos forum to look up answers vs bad forums? That would be amazing!
you teach me more than my job and training does :) thanks for helping
You are awesome chuck , i love your series , very informational , keep the good work from a big fan to you.
Fun content as usual! I've been using the alias "nope" to clear my terminal for years ha ha. The cursor jump controls are the best things since split str's. That reverse search was one I didn't know and now I'm in love ha ha. Great stuff!
Thanks a lot, Chuck. As a Linux user for decades I've found something new today
I rarely feel the need to comment on videos, but just wanted to say thank you 😊🙏 some great nuggets in there, and really well delivered! Making an otherwise opaque topic very accessible, which is much appreciated
Another cool thing for people is the "watch" command. If you are trying to monitor a certain command's output but don't want keep using the up arrow + enter, use:
"watch -n1 yourcommand -andargs"
where 1 = number of seconds between each iteration.
for example:
"watch -n5 ls -alh"
this will print the "ls -alh" command every 5 seconds (useful if you're uploading a file to your server and want to see its progress) the "h" part makes the file size human readable (shows kilobytes, megabytes, gigabytes, etc..).
I have been waiting for content like this for months, now finally got it, please make content like this a bit often please.
Two commands:
fping: ping a range of devices
watch: execute a command every few seconds and overwrite previous result
Use watch and ip -s -c addr to show interface counters live
Use watch and fping to see a network slowly coming up live
I knew the basic ones but the ctrl squences were awesome and will help me in the future. Thanks
Thank you for this Chuck! It's very helpful!
Please keep creating all your insightful and genuinely funny content, dude! You were really born to it. Almost an year learning and having fun here😄😄. Congrats from Brazil
Man, you're rocks! Thank You for your course !!! I've learned so much!!!
I’m at the end of my cohert and am studying for the security+ and this was a good refresher on some linux! You are what got me excited into learning cyber security
Been going through hack the box starting section. This is definitely what I needed!
When my mind gets sucked into something i become obsessed and rn I am OBSESSED with your videos. My journey begins
Thanks Chuck...as always brilliant explanation methods. I also wanted to add that hitting "Home" Tab on keyboard can get you right before the line, or "End" Tab to go at the end.
I'm a Endpoint Engineer and damn it there so much new things I want to learn out there. I'm in the middle of studying for my AZ104, thereafter AWS cloud Practitioner, and then I see the Linux/hacking videos you and David Bombal are pumping out and it's like damn it more fun a new things how do I fit it all and make time for it all lol. Great Stuff like always. Thank you for putting these videos out there. 😊
I was teased years ago for not knowing the shortcut of pressing up ↑ for previous commands...lol Great stuff. Love your channel.
I would add the importance of "*" since you can use it with so many commands such as rm, cp or mv. it means "everything" so if for example you wanna erase everything on a directory you just hit "rm *". Personally it has saved me so much time when it comes to writing the names of all the docs I wanna interact with (even when using the tab lol)
@NetworkChuck Perfect video. I was just working on some of these commands in this video; it cleared things up. I was just randomly testing out different key commands and found out about some of these.💪 I hope you make PowerShell video series.
Awesome episode, one of the best quick Linux cli ninja videos ever.. I learned a few cool new ones, thanks Chuck! :)
I think I learned more in this video than I have watching any Linux for beginners videos.
Your videos are much appreciated, very informative and FUN. Thank you
Ctrl a and Ctrl e
That's very helpful , every time I made a mistake I had to delete the whole command , and start over!
Won't happen anymore with these tips Thanks network chuck you're the best 🙂
Super video Chuck Your videos are awesome And informative Now my doubts Are All Cleared
Was doing the overthewire bandit challenge last night and really needed this tbh.
Thank you for this, really helps and love the content.
You were right! These really were life changing! They help me to be more professional and FAST in the terminal! Thanks so much Chuck!
great video as always. There were a handful of tricks and shortcuts that I wasn't aware of which will come in handy for my CyberPatriot kids as we head into the next year of competition. (especially the 'sudo !!' re-execute previous command with root... fantastic)
b.t.w. sudo !! is pronounced as "sudo bang bang" ;-)
wow this a amazing video!!! I like how fast it is! Keep it up man!!!
I sent this to my parents (76 and 80), because we use Manjaro. 90% of this is review, but it is perfect and added knowledge. YOU ROCK CHUCK!
The *Linux For Hackers* playlist should be required in the orientation for all IT professors. Keep up the great content!
That was sick, thx for the lesson bro
Crazy, I'm using linux as my main desktop os for years and I didn't knew sudo !!, did I live under a rock? Very helpful.
Alt + F = Forward one word
Alt + B = Back one word
Can also use Ctrl + Arrow Keys
Ctrl + F/B will also move by one character
Ctrl + Shift + X = Clear
Ctrl + L = bring bottom line to top of screen
By the way thanks for the commands you saved me thousands and thousands of hours just using the keyboard. I love your vid!!!
Tip Vertical Pane Ctrl + Shift + R (I think) on Kali.
Tip for anyone using Kali Linux on VMARE terminal if you like to have vim open on a different pane in the same terminal tab. By default it's Alt + Right for the right pane and Alt + Left for the left pane. I updated it to Alt + [ (left) & Alt + ] (right). Saves time only having to save the file and switch right over to terminal only using the keyboard. Just learned today for anyone out there who likes vim.
Chuck, very informative tutorial!
Hey man you got me into hacking and I thank you for that! But I miss some of the old videos where you were showing how to use different kinds of tools maybe you can bring back
the series?
Great video btw
We love you Chuck ! Thank you for your awesome and engaging content.
This is so good thanks Chuck!
Thanks for this amazing tips!!!! OMG... Congrats!
The entire video I found my self going "I much prefer....." and then you went into the follow up commands....lol (happened with tail, ll/la, and sudo !!)
Although I was expecting you to go into the history command, rather than the reverse search. Also, where is grep man! grep is probably my all time favorite command, it SOOOOOO powerful!
All in all man, I really enjoy your content. I'm a SysAdmin by trade, and have a def weakness in the Network Admin stuff, and your vids have been super helpful and easy to watch. Much appreciated.
Network chuck you are doing great job!!! Thank you so much for such content! 😊
that was just epic! thanks man🤘
esc + . is a really handy one, once you learn it you'll use it a lot. I pastes the last word of your most recent command handy if you're moving files or if you opened a file with one command and then want to change it.. For instance maybe you did cat a file at first, realized it was too large and wanted to less it instead... so just: less + .
Maybe to avoid confusion it's better to write it as "esc ." I use it all the time.
Nice video Chuck. You can continue this Linux terminal hack series talking more about tar, gzip and especially grep, zegrep ...becoming ninja in archiving and searching files and archives and of course piping the commands to get the best result. Cheers ;)
Control + L doesnt really clear the terminal. The stuff is still there if you scroll up. Hence I prefer clear
Clear also shows the stuff if you scroll up
U can also try reset command
@@ethan7930 No, by default clear includes the scrollback buffer.
They're both the same
@@ethan7930 it doesn't. or atleast not on Kali and arch
Used some of the commands and it's awesome!!
This is really fun. I always wanted to learn Linux, and this is helping a lot.
I've also never seen Ctrl+x e, very cool. And the saying I think you're looking for is "less is more" because, well, it's a better "more" command
I just found pushd, popd, and dirs recently, may fit in w these navigation shortcuts.
One of the first Linux tricks I found that I cannot live without is the use of the middle click. Highlight text somewhere and when you middle click it pastes the text from the selection. No copy command necessary. Works most of the time, even between applications.
Yes, I know this is not a keyboard command, but you must master all tools in your inventory. A ninja doesn't always fight with a sword!
@@Batwam0 Same to you. 🍻
Ctrl+p = previous (aka up arrow)
Ctrl+n = next (aka down arrow)
Ctrl+b = back (aka left arrow)
Ctrl+f = forward (aka right arrow)
Ctrl+d = delete
Ctrl+h = backspace
Ctrl+j Ctrl+m = new line/carriage return (aka enter)
If you use this, you not only won't have to reach for your mouse but you won't have to reach to the arrow keys, enter or backspace. And if you map the ctrl to the caps lock button, you won't have to reach to the corner of your keyboard, but slide your left pinky a bit.
This was a really useful and instructive video. Thanks for sharing.
If you like vim, you can have vim bindings in the bash shell, just add (set -o vi) to your bashrc or vimrc and you will be able to edit text really fast. I use it all the time.
i am using vim mode for long time, but i thought how everyone else even using tetminal without it, why it ian't default in terminal... but wow now only i understand there are shortcuts terminal to edit it faster without vim mode...
:) gpod thing i didnt skiped this video thinking i know these things for years...
Good job really love (ALL) your videos, (these same command also works with VIM if you want to take your speed to the next level) There is just one thing I cannot the wrap around my head..
Such a good video dude best one in a while
Nice! thx. 3 new tipps learned.
A true ninja uses zsh, do a vid on that chuck that would be awesome. Love your presentation and content, and your coffee is the nicest too!
Bro I have been doing everything manually on Linux. You have definitely extended my life span with these tips XDDD
That coffee is doing wonders for you! LOL. Love these vids bro. I'm learning so much. Thanks for making these!!
One of the best ones. Thank you!!!
Friendly Interactive SHell or "fish" has some neat tricks up it's sleeve. My favourite being typing part of a command and pressing up arrow to go back through commands that match.
Thank you soo much chuck! love you
Thanks lern sum new commands like sudo !! Very nice video ❤️❤️
Thank you for demonstrating Emacs key bindings and nano rather than holding vim up on a pedestal like many others do
Ctrl+Alt+T will launch terminal with no mouse
Love ur channel. Thanks a bunch
Thank you very much for the great video, that's just what everyone needs.
I think CTRL + C was missing to stop a process.
You probably mentioned it in an early video though to be fair.
I also like to use history | grep (I have an alias for this) “string-to-search” instead of the reverse search. The advantage of this is I can see all the matches in one output and by running !“number in history”, I can select one of them to run. Loved the video!
That’s cool.
Same here buddy, the same alias with -i appended, i call it hfind
Chuck your soo good that UA-cam stopped giving me notifications and putting you in my feed.
you are the first one to convince me using linux man chuck bro i cant im using linux in my browser for the first time i only know pwd ls cd thanks man
Almost have all my tech ninja outfit put together... Lol perfect timing chuck!!!
Fantastic video as always, Chuck! The only thing I'd want to point out is that when adding aliases to the ~/.bashrc file, you have to tell your terminal/shell to reload the .bashrc file for the new alias to take effect. This is the case both if you edit the .bashrc file with a text editor like Vim or Nano, or if you just echo an alias into the .bashrc file a la `echo "alias lh='ls -lah'" >> .bashrc`. I usually append a `&& source .bashrc` to the end of the alias if you're echoing the alias to the file, or if you want to move further into ninja territory, you can add an alias like 'src' to your .bashrc file that runs the command `source .bashrc` so you can echo further aliases with something similar to `echo "alias doc='cd ~/Documents'" >> .bashrc && src`
Hech Yeah!
That work's....
Just starting out with this and loving the knowledge base in these comments. Thank You
Thank you for another very educational video, keep it up
Can you do an in depth video on what is better for coding Mac or windows.. Please...I love your vids btw
as i started watching i was like.. "chuck... come on man.. these are the basic commands.. what are you doing?".. then there were the ctrl+a/e/r/u/y/k .... now thats interesting.. so ty.. im glad you are so fun to watch id even watch things i alredy know.. if that wasnt the case i would have missed the shortcuts there... ^.^
OK... brain fried whilst watching the CTRL commands... Unreal, thanks Chuck.
Hey Chuck, great video. Can you do a video about hydra ??
Thanks Chuck, I threw away my mouse like you mentioned. Then I realized that the mouse was needed, but my wife had thrown the trash out. I managed to watch this video by pressing the tab key lol. Great video, keep them coming.
Gonna have.to watch this one a few times to get all of the shortcuts. You should have labeled this one wax on wax off keyboard shortcuts. I already knew a few, but there were a bunch that I didn't know. Thanks Chuck! It was time for a new Linux vid. How about a new bash video, or maybe a series on awk , sed and grep?
Thanks man, You're making me better and better , I am a beginner and I 'v just get in about three 5 days ago with your help in top 40 commands for win, I began my way and Iam relying on you to make a great cyber security eng, or just good enough to deal with threats if happens, thanks alot man,
Damn man this is a good video!
Thanks
Man I love the way just say the command you are using again and again like "Ctl + L" it makes us memories them easy. I guess. ❤️
😂😂😂love your humor. Thank you. Will be back soon to join.
Chuck, Ive used linux for a long time and didnt know CTRL X E (just tried it on Mac and works!) also the !! hack. Thank you!! can you make a longer video with linux command hacks from basic to advanced?