All About Linux
All About Linux
Kali Linux, a Debian-based distribution, is widely used for penetration testing and
security auditing. To leverage its full potential, a comprehensive understanding of
the Linux file system, essential commands, and file permissions is necessary.
ls -al : Lists all files, including hidden ones, with detailed information.
2. Directory Navigation
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 1
: Creates a new empty file named
touch [file] file or updates its
timestamp if it exists.
2. User Information
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 2
id : Displays user identity information.
3. Process Management
kill [pid] : Terminates the process with the given process ID ( pid ).
sudo apt update : Updates the list of available packages and their versions.
sudo apt remove [package_name] : Removes the specified package but keeps
configuration files.
sudo apt purge [package_name] : Removes the specified package along with its
configuration files.
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 3
1. Permission Types
2. User Categories
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 4
2. Using chown Command
chown [owner]:[group] [file] : Changes the owner and group of the file.
Example: chown root:root [file] : Sets the owner to root and the group to
root .
Example: chgrp staff [file] : Sets the group of the file to staff .
2. /bin
3. /boot
4. /dev
5. /etc
6. /home
7. /lib
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 5
Contains shared libraries and kernel modules.
8. /media
9. /mnt
10. /opt
11. /proc
12. /root
13. /sbin
14. /srv
15. /tmp
16. /usr
17. /var
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 6
2. Checking File System Disk Usage
fsck [device] : Checks and repairs the file system on the specified device.
Practical Examples
1. Navigating the File System
cd /home/user
pwd
ls -a
mkdir /home/user/test
cd /home/user/test
touch example.txt
echo "Hello, World!" > example.txt
cat example.txt
cp example.txt example_copy.txt
mv example_copy.txt new_name.txt
rm new_name.txt
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 7
chmod u+w example.txt
chmod g-w example.txt
chmod o=r example.txt
Conclusion
Mastering the basic commands, file permissions, and file system structure in Kali
Linux is essential for effective system administration and security. These skills
provide a strong foundation for managing files, securing data, and maintaining the
overall health of the system.
FOLLOW:
https://www.linkedin.com/in/wh04m1i/
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 8
wh04M1i - Overview
Founder of the art act and foxfoster | Top 1% TryHackMe |
Cybersecurity Enthusiast | Pentester | CTF Player | OSINT |
Digital Forensics | Programmer - wh04M1i
https://github.com/wh04M1i
Instagram (@who4m1i)
Instagram photos and videos
https://www.instagram.com/who4m1i
All About Linux: Essential Commands, File Permissions, and File System Structure by GOVERDHAN 9