Beginner Linux for Ethical Hackers - Viewing, Creating, and Editing Files
Key Takeaways
This video covers the basics of viewing, creating, and editing files in Linux for ethical hackers, including the use of echo, cat, touch, nano, and gedit commands.
Full Transcript
okay so this is my second time recording this video the first time I forgot to turn my microphone on and performed for my cat so she approved of it let's see if you approve of it the second time around now that I have a little bit of practice so we're going to be talking today is we're talking about viewing creating and editing files so I've already showed you the echo command if you recall we used echo to create a file right we've created a hello Tex and we can just echo hello out to the terminal we could say echo hello and I'll say hello back so what we can do with echo is we can use it to write to a file so if we were to say echo hey and then we write it - hey dot txt well we can look and see that hey dot txt is here and you can see my files from the previous one so I'm trying to come with more ways of saying hello but we're going to use hey dot text here so if we cat hey dot Tex hey all cat does is print out to the screen what is in a file it says hey okay so let's say we want to append cat or we want to append hey dot txt well we can tab up here what if we just say hey again we've got this greater than symbol here and we're just putting it into the haida text file well that didn't work we didn't append it we actually overrode it so what if what can we use to actually over append this here what we can do is we could say hey again again right just to give us something different and we can add a second greater than symbol here so now if we cat the file you can see that we actually append it to the end of it so this becomes incredibly useful when we are either adding stuff to a list say we're gathering IP addresses if we just want to combine or lists or when we're creating a series of commands and we're going to use those commands to send all at once we're going to cover that later when we're talking about file transfers in the penetration testing section where we use a set of commands like this on a Windows machine to actually transfer files via FTP it's just so much easier than typing them all in one by one we can create a little document and run the document so this becomes useful when we have a series of commands and for other reasons as well as you'll learn as you go on in your Linux career so we've talked about echo and we've talked about cat so let's talk about some other ways to create a file we can use something called touch and to say new file dot txt and if we LS you could see that new file about Texas here but if we cat new file there's nothing in there because we haven't put anything in there yet so there's a few things that we can do we could use echo and append the file right we could also use a tool called Nano now Nano is a terminal text editor there are other terminal text editors like VY and vim I don't prefer those personally I like Nano the most some people have their preferences so I encourage you to play around with any of them as you wish by and them are the other two but for this course we're going to be using Nano so if I say Nano new file text I could type whatever I want in here and we're going to be using Nano a lot to create scripts to create Python scripts and to edit shell code as we get into a little bit of exploit development so I'm gonna hit control X I'm gonna hit Y for saving and then we'll save it to new file dot txt if we cap this now it says hey I could type whatever I want in here so that's one way of editing it another way of editing it is using a graphical interface so we can use G at it and say new file and if you don't like using a terminal you're more than welcome to use G edit here just type in new line here and save it and I I like using G edit it's a lot cleaner cuz I can you know highlight and delete I don't have to use my keyboard to navigate around like I do in the terminal so if you have the option to use G edit for sure but sometimes you're gonna be on another machine that's not your own or it's headless and doesn't have a GUI that you're gonna have to use now so get comfortable using bolt so we save this let's go ahead and cat it out and see what happens okay you can see that the new line is in there so really that's the overview that I wanted to cover so just know that you can create files pretty much using echo touch and actually you can create files using Nano as well if you say Nano this is new text I'll just say hello control X save it you LS you can see this is new Texas right here so you can use all of these tools in different ways to create files it's completely up to you how you want to do it personally what I'm creating a file I use Nano and I just create a new shell script Python script a text document that way you could also do it using G edit as well so just know that we're going to be using these a lot and try to get comfortable with these and from here we're going to be moving into controlling Kali services so we're just going to briefly talk about what services you need running on boot and how to do that [Music] [Music] you
Original Description
In this video, we will discuss the many ways to view, create, and edit files in Linux to include the use of echo, cat, touch, nano, and gedit.
Timestamps:
0:06 - Introduction
0:30 - echo
1:15 - cat
1:28 - appending/replacing with echo
3:00 - touch
3:10 - nano
4:18 - gedit
❓Info❓
___________________________________________
Need a Pentest?: https://tcm-sec.com
Learn to Hack: https://academy.tcm-sec.com
🔹The Cyber Mentor Merch🔹
___________________________________________
https://teespring.com/stores/the-cyber-mentor
📱Social Media📱
___________________________________________
Website: https://thecybermentor.com
Twitter: https://twitter.com/thecybermentor
Twitch: https://www.twitch.tv/thecybermentor
Discord: https://tcm-sec.com/discord
LinkedIn: https://www.linkedin.com/in/heathadams
💸Donate💸
___________________________________________
Like the channel? Please consider supporting me on Patreon:
https://www.patreon.com/thecybermentor
Support the stream (one-time): https://streamlabs.com/thecybermentor
Hacker Books:
Penetration Testing: A Hands-On Introduction to Hacking: https://amzn.to/31GN7iX
The Hacker Playbook 3: https://amzn.to/34XkIY2
Hacking: The Art of Exploitation: https://amzn.to/2VchDyL
The Web Application Hacker's Handbook: https://amzn.to/30Fj21S
Real-World Bug Hunting: A Field Guide to Web Hacking: https://amzn.to/2V9srOe
Social Engineering: The Science of Human Hacking: https://amzn.to/31HAmVx
Linux Basics for Hackers: https://amzn.to/34WvcXP
Python Crash Course, 2nd Edition: https://amzn.to/30gINu0
Violent Python: https://amzn.to/2QoGoJn
Black Hat Python: https://amzn.to/2V9GpQk
My Build:
lg 32gk850g-b 32" Gaming Monitor:https://amzn.to/30C0qzV
darkFlash Phantom Black ATX Mid-Tower Case: https://amzn.to/30d1UW1
EVGA 2080TI: https://amzn.to/30d2lj7
MSI Z390 MotherBoard: https://amzn.to/30eu5TL
Intel 9700K: https://amzn.to/2M7hM2p
G.SKILL 32GB DDR4 RAM: https://amzn.to/2M638Zb
Razer Nommo Chroma Speakers: https://amzn.to/30bWjiK
Razer BlackWido
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from The Cyber Mentor · The Cyber Mentor · 18 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
▶
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Buffer Overflows Made Easy - Part 1: Introduction
The Cyber Mentor
Buffer Overflows Made Easy - Part 2: Spiking
The Cyber Mentor
Buffer Overflows Made Easy - Part 3: Fuzzing
The Cyber Mentor
Buffer Overflows Made Easy - Part 4: Finding the Offset
The Cyber Mentor
Buffer Overflows Made Easy - Part 5: Overwriting the EIP
The Cyber Mentor
Buffer Overflows Made Easy - Part 6: Finding Bad Characters
The Cyber Mentor
Buffer Overflows Made Easy - Part 7: Finding the Right Module
The Cyber Mentor
Buffer Overflows Made Easy - Part 8: Generating Shellcode and Gaining Shells
The Cyber Mentor
HackTheBox - Sunday Walkthrough (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - TCP, UDP, and the Three-Way Handshake (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - Network Subnetting (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - Network Subnetting Part 2: The Challenge (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - Building A Basic Network with Cisco Packet Tracer (Re-Up)
The Cyber Mentor
HackTheBox - Fighter Walkthrough (Re-Up)
The Cyber Mentor
Beginner Linux for Ethical Hackers - Navigating the File System
The Cyber Mentor
Beginner Linux for Ethical Hackers - Users and Privileges
The Cyber Mentor
Beginner Linux for Ethical Hackers - Common Network Commands
The Cyber Mentor
Beginner Linux for Ethical Hackers - Viewing, Creating, and Editing Files
The Cyber Mentor
Beginner Linux for Ethical Hackers - Controlling Kali Services
The Cyber Mentor
Beginner Linux for Ethical Hackers - Scripting with Bash
The Cyber Mentor
Beginner Linux for Ethical Hackers - Installing and Updating Tools
The Cyber Mentor
Cracking Linux Password Hashes with Hashcat
The Cyber Mentor
Reminder: Twitch Hacking Live Stream Tonight! 2/26/19 at 8PM EST
The Cyber Mentor
Hacking Live Stream: Episode 1 - Kioptrix Level 1, HackTheBox Jerry, and Career Q&A / AMA
The Cyber Mentor
Hacking Live Stream: Episode 2 - HackTheBox Active, Vulnserver Buffer Overflow, and Career Q&A / AMA
The Cyber Mentor
Hacking Live Stream: Episode 3 - Hack The Box Blue, Devel, and Career Q&A / AMA
The Cyber Mentor
New Zero to Hero Pentest Course, New Website, and 2K Subs?!
The Cyber Mentor
Zero to Hero Pentesting: Episode 1 - Course Introduction, Notekeeping, Introductory Linux, and AMA
The Cyber Mentor
Zero to Hero Pentesting: Episode 2 - Python 101
The Cyber Mentor
Zero to Hero Pentesting: Episode 3 - Python 102, Building a Terrible Port Scanner, and a Giveaway
The Cyber Mentor
Zero to Hero Pentesting: Episode 4 - Five Phases of Hacking + Passive OSINT
The Cyber Mentor
Zero to Hero Pentesting: Episode 5 - Scanning Tools (Nmap, Nessus, BurpSuite, etc.) & Tactics
The Cyber Mentor
Zero to Hero Pentesting: Episode 6 - Enumeration (Kioptrix & Hack The Box)
The Cyber Mentor
Zero to Hero Pentesting: Episode 7 - Exploitation, Shells, and Some Credential Stuffing
The Cyber Mentor
Installing Windows Server 2016 on VMWare in 5 Minutes
The Cyber Mentor
Zero to Hero: Week 8 - Building an AD Lab, LLMNR Poisoning, and NTLMv2 Cracking with Hashcat
The Cyber Mentor
A Day in the Life of an Ethical Hacker / Penetration Tester
The Cyber Mentor
Active Directory Exploitation - LLMNR/NBT-NS Poisoning
The Cyber Mentor
Zero to Hero: Week 9 - NTLM Relay, Token Impersonation, Pass the Hash, PsExec, and more
The Cyber Mentor
Zero to Hero: Episode 10 - MS17-010/EternalBlue, GPP/cPasswords, and Kerberoasting
The Cyber Mentor
Writing a Pentest Report
The Cyber Mentor
Zero to Hero: Week 11 - File Transfers, Pivoting, and Reporting Writing
The Cyber Mentor
The Complete Linux for Ethical Hackers Course for 2019
The Cyber Mentor
Full Ethical Hacking Course - Beginner Network Penetration Testing (2019)
The Cyber Mentor
Popping a Shell with SMB Relay and Empire
The Cyber Mentor
Pentesting for n00bs: Episode 1 - Legacy (hackthebox)
The Cyber Mentor
Pentesting for n00bs: Episode 2 - Lame
The Cyber Mentor
Pentesting for n00bs: Episode 3 - Blue
The Cyber Mentor
Web App Testing: Episode 1 - Enumeration
The Cyber Mentor
Pentesting for n00bs: Episode 4 - Devel
The Cyber Mentor
Pentesting for n00bs: Episode 5 - Jerry
The Cyber Mentor
Web App Testing: Episode 2 - Enumeration, XSS, and UI Bypassing
The Cyber Mentor
Pentesting for n00bs: Episode 6 - Nibbles
The Cyber Mentor
Web App Testing: Episode 3 - XSS, SQL Injection, and Broken Access Control
The Cyber Mentor
How NOT to Approach a Cybersecurity Mentor
The Cyber Mentor
Web App Testing: Episode 4 - XXE, Input Validation, Broken Access Control, and More XSS
The Cyber Mentor
Pentesting for n00bs: Episode 7 - Optimum (hackthebox)
The Cyber Mentor
Pentesting for n00bs: Episode 8 - Bashed (hackthebox)
The Cyber Mentor
Pentesting for n00bs: Episode 9 - Grandpa
The Cyber Mentor
Top 5 Internal Pentesting Methods
The Cyber Mentor
More on: Linux & CLI
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Security Belongs on the Blueprint
Medium · Cybersecurity
# A 4-Line HTML File Stole the Admin’s Secret — Intigriti LeakyJar CTF Writeup
Medium · Cybersecurity
The Digital Gateway to Arabic Cybersecurity
Medium · Cybersecurity
Cybersecurity vs Cloud Computing – Which Career Will Dominate 2026? ☁️
Medium · Cybersecurity
Chapters (7)
0:06
Introduction
0:30
echo
1:15
cat
1:28
appending/replacing with echo
3:00
touch
3:10
nano
4:18
gedit
🎓
Tutor Explanation
DeepCamp AI