Table of contents
No headings in the article.
- WHAT IS LINUX - Linux is an os it is open source and it is multitasking and multiuser with PowerShell and multiple flavours. Flavours like ubuntu, centos,redhat, fedora,kalilinux etc.
- LINUX FILE SYSTEM HIERARCHY - in Linux everything is represented as a file including a hardware program the files are stored in a directory and every directory contains a file with a tree structure that is called file system hierarchy.
1./ (Root): Primary hierarchy root and root directory of the entire file system hierarchy. Every single file and directory starts from the root directory The only root user has the right to write under this directory
2. /bin: Essential command binaries that need to be available in single-user mode; for all users, e.g., cat, ls, cp. Contains binary executables Commands used by all the users of the system are located here e.g. ps, ls, ping, grep, cp
3. /boot: Boot loader files, e.g., kernels
4. /dev: Essential device files, e.g., /dev/null. These include terminal devices, USB, or any device attached to the system.
5. /etc: Host-specific system-wide configuration files.
6. /home: Users’ home directories, containing saved files, personal settings, etc.Home directories for all users to store their files.
7. /lib: Libraries essential for the binaries in /bin/ and /sbin/.
8. /media: Temporary mount directory for removable devices.
9. /mnt: Temporarily mounted filesystems.
10. /opt Optional application software packages.
11. /sbin : Essential system binaries, e.g., fsck, init, route. Just like /bin, /sbin also contains binary executables. Example: iptables, reboot, fdisk, ifconfig, swapon
12. /tmp: Temporary files. Often not preserved between system reboots, and may be severely size restricted. The directory that contains temporary files created by the system and users. Files under this directory are deleted when the system is rebooted.
13. /usr: Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications. /usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look under /usr/bin. For example: at, awk, cc, less, scp
Linux Basics Command
ls - The most frequently used command in Linux to list directories
pwd - Print working directory command in Linux
cd - Linux command to navigate through directories
mkdir - Command used to create directories in Linux
mv - Move or rename files in Linux
cp - Similar usage as mv but for copying files in Linux
7.rm - Delete files or directories
touch - Create blank/empty files
ln - Create symbolic links (shortcuts) to other files
cat - Display file contents on the terminal
clear - Clear the terminal display
echo - Print any text that follows the command
less - Linux command to display paged outputs in the terminal
14. man - Access manual pages for all Linux commands
uname - Linux command to get basic information about the OS
whoami - Get the active username
17.tar - Command to extract and compress files in Linux
grep - Search for a string within an output
head - Return the specified number of lines from the top
tail - Return the specified number of lines from the bottom
diff - Find the difference between two files
export - Export environment variables in Linux
23. zip - Zip files in Linux
- unzip - Unzip files in Linux
25. ssh - Secure Shell command in Linux
26. service - Linux command to start and stop services
27. ps - Display active processes
28. kill and killall - Kill active processes by process ID or name
- df - Display disk filesystem information
30. mount - Mount file systems in Linux
chmod - Command to change file permissions
chown - Command for granting ownership of files or folders
33. ifconfig - Display network interfaces and IP addresses
34. wget - Direct download files from the internet
top - View active processes live with their system usage
useradd and usermod - Add new user or change existing users data
37. passwd - Create or update passwords for existing users
- history - used to view the previously executed command.
SAFIA_KHATOON