Merge branch 'main' of github.com:SCAR-iT-COLO/LWM-Linux
This commit is contained in:
commit
e934bf7bd2
@ -5,49 +5,47 @@
|
||||
|
||||
### a) pwd (Print Working Directory)
|
||||
- Shows the current directory path
|
||||
- Usage: pwd
|
||||
- Usage: `pwd`
|
||||
|
||||
### b) ls (List)
|
||||
- Lists files and directories in the current directory
|
||||
- Common options:
|
||||
-l: Long format with details
|
||||
-a: Show hidden files
|
||||
-h: Human-readable file sizes
|
||||
- Usage: ls [options] [directory]
|
||||
- Usage: `ls` [options] [directory]
|
||||
#### Common options:
|
||||
- l: Long format with details
|
||||
- a: Show hidden files
|
||||
- h: Human-readable file sizes
|
||||
|
||||
### c) cd (Change Directory)
|
||||
- Changes the current directory
|
||||
- Usage:
|
||||
cd [directory]
|
||||
cd .. (move up one directory)
|
||||
cd ~ (go to home directory)
|
||||
- `cd [directory]`
|
||||
|
||||
### d) mkdir (Make Directory)
|
||||
- Creates a new directory
|
||||
- Usage: mkdir [directory_name]
|
||||
- Usage: `mkdir [directory_name]`
|
||||
|
||||
### e) rmdir (Remove Directory)
|
||||
- Removes an empty directory
|
||||
- Usage: rmdir [directory_name]
|
||||
- Usage: `rmdir [directory_name]`
|
||||
|
||||
### f) touch
|
||||
- Creates an empty file or updates timestamps
|
||||
- Usage: touch [filename]
|
||||
- Usage: `touch [filename]`
|
||||
|
||||
### g) cp (Copy)
|
||||
- Copies files or directories
|
||||
- Usage: cp [source] [destination]
|
||||
- Options:
|
||||
- Usage: `cp [source] [destination]`
|
||||
#### Common Options:
|
||||
-r: Recursive (for directories)
|
||||
|
||||
### h) mv (Move)
|
||||
- Moves or renames files and directories
|
||||
- Usage: mv [source] [destination]
|
||||
- Usage: `mv [source] [destination]`
|
||||
|
||||
### i) rm (Remove)
|
||||
- Deletes files or directories
|
||||
- Usage: rm [options] [file/directory]
|
||||
- Options:
|
||||
- Usage: `rm [options] [file/directory]`
|
||||
#### Options:
|
||||
-r: Recursive (for directories)
|
||||
-f: Force deletion without prompting
|
||||
|
||||
@ -55,58 +53,57 @@
|
||||
|
||||
### a) cat (Concatenate)
|
||||
- Displays file contents
|
||||
- Usage: cat [filename]
|
||||
- Usage: `cat [filename]`
|
||||
|
||||
### b) less
|
||||
- Views file contents page by page
|
||||
- Usage: less [filename]
|
||||
- Usage: `less [filename]`
|
||||
|
||||
### c) head
|
||||
- Displays the first few lines of a file
|
||||
- Usage: head [options] [filename]
|
||||
- Options:
|
||||
- Usage: `head [options] [filename]`
|
||||
#### Common Options:
|
||||
-n [number]: Specify number of lines
|
||||
|
||||
### d) tail
|
||||
- Displays the last few lines of a file
|
||||
- Usage: tail [options] [filename]
|
||||
- Options:
|
||||
- Usage: `tail [options] [filename]`
|
||||
#### Common Options:
|
||||
-n [number]: Specify number of lines
|
||||
-f: Follow file updates in real-time
|
||||
|
||||
### e) nano
|
||||
- Simple text editor
|
||||
- Usage: nano [filename]
|
||||
- Usage: `nano [filename]`
|
||||
|
||||
## 3. File Permissions and Ownership:
|
||||
|
||||
### a) chmod (Change Mode)
|
||||
- Modifies file permissions
|
||||
- Usage: chmod [options] [mode] [file/directory]
|
||||
- Example: chmod 755 file.txt
|
||||
|
||||
- Usage: `chmod [options] [mode] [file/directory]`
|
||||
|
||||
### b) chown (Change Owner)
|
||||
- Changes file ownership
|
||||
- Usage: chown [user]:[group] [file/directory]
|
||||
- Usage: `chown [user]:[group] [file/directory]`
|
||||
|
||||
## 4. System Information:
|
||||
|
||||
### a) uname
|
||||
- Displays system information
|
||||
- Usage: uname [options]
|
||||
- Options:
|
||||
- Usage: `uname [options]`
|
||||
#### Common Options:
|
||||
-a: All information
|
||||
|
||||
### b) df (Disk Free)
|
||||
- Shows disk space usage
|
||||
- Usage: df [options]
|
||||
- Options:
|
||||
#### Common Options:
|
||||
-h: Human-readable sizes
|
||||
|
||||
### c) du (Disk Usage)
|
||||
- Estimates file and directory space usage
|
||||
- Usage: du [options] [directory]
|
||||
- Options:
|
||||
- Usage: `du [options] [directory]`
|
||||
#### Common Options:
|
||||
-h: Human-readable sizes
|
||||
-s: Summary for directory
|
||||
|
||||
@ -114,69 +111,70 @@
|
||||
|
||||
### a) ps (Process Status)
|
||||
- Lists running processes
|
||||
- Usage: ps [options]
|
||||
- Common options:
|
||||
aux: Detailed information for all processes
|
||||
- Usage: `ps [options]`
|
||||
#### Common options:
|
||||
-aux: Detailed information for all processes
|
||||
|
||||
### b) top
|
||||
- Displays real-time system process information
|
||||
- Usage: top
|
||||
- Usage: `top -u [user]`
|
||||
#### Common Options:
|
||||
-u: active apps for specified user
|
||||
|
||||
### c) kill
|
||||
- Terminates processes
|
||||
- Usage: kill [options] [PID]
|
||||
- Options:
|
||||
- Usage: `kill [options] [PID]`
|
||||
#### Common Options:
|
||||
-9: Force kill
|
||||
|
||||
## 6. Network Commands:
|
||||
|
||||
### a) ping
|
||||
- Tests network connectivity
|
||||
- Usage: ping [options] [destination]
|
||||
- Usage: `ping [options] [destination]`
|
||||
|
||||
### b) ifconfig
|
||||
- Displays network interface information
|
||||
- Usage: ifconfig
|
||||
- Usage: `ifconfig`
|
||||
|
||||
### c) ssh (Secure Shell)
|
||||
- Connects to remote systems securely
|
||||
- Usage: ssh [user]@[host]
|
||||
- Usage: `ssh [user]@[host]`
|
||||
#### Common Options:
|
||||
-p: Specify a port
|
||||
|
||||
## 7. Package Management (for Debian-based systems):
|
||||
|
||||
### a) apt-get update
|
||||
- Updates package lists
|
||||
- Usage: sudo apt-get update
|
||||
- Usage: `sudo apt-get update`
|
||||
|
||||
### b) apt-get upgrade
|
||||
- Upgrades installed packages
|
||||
- Usage: sudo apt-get upgrade
|
||||
- Usage: `sudo apt-get upgrade`
|
||||
|
||||
### c) apt-get install
|
||||
- Installs new packages
|
||||
- Usage: sudo apt-get install [package_name]
|
||||
- Usage: `sudo apt-get install [package_name]`
|
||||
|
||||
## 8. File Compression:
|
||||
|
||||
### a) tar
|
||||
- Archives files
|
||||
- Usage: tar [options] [archive_name] [files/directories]
|
||||
- Common options:
|
||||
- Usage: `tar [options] [archive_name] [files/directories]`
|
||||
- Usage: `tar -cvf archive.tar files/` "compress files from 'files' directory into archive.tar"
|
||||
#### Common options:
|
||||
-c: Create archive
|
||||
-x: Extract archive
|
||||
-v: Verbose
|
||||
-f: Specify archive file
|
||||
- Example: tar -cvf archive.tar files/
|
||||
-t: List the contents inside the tar file
|
||||
-z: Gzip the file after tar'ing it. "Double compressed"
|
||||
|
||||
### b) gzip
|
||||
- Compresses files
|
||||
- Usage: gzip [filename]
|
||||
- Usage: `gzip [filename]`
|
||||
|
||||
### c) gunzip
|
||||
- Decompresses gzip files
|
||||
- Usage: gunzip [filename.gz]
|
||||
|
||||
- [(1) The beginner’s guide to using terminal on Linux Mint - FOSS Linux.](https://www.fosslinux.com/103546/the-beginners-guide-to-using-terminal-on-linux-mint.htm.)
|
||||
- [(2) Official User Guide - Linux Mint.](https://www.linuxmint.com/documentation/user-guide/Cinnamon/english_18.0.pdf.)
|
||||
- [(3) BEGINNER'S GUIDE FOR LINUX - Start Learning Linux in Minutes - Tecmint.](https://www.tecmint.com/free-online-linux-learning-guide-for-beginners/.)
|
||||
- [(4) Useful Basic Terminal Commands On Linux Mint 11 - HowtoForge.](https://www.howtoforge.com/useful-basic-terminal-commands-on-linux-mint-11.)
|
||||
- Usage: `gunzip [filename.gz]`
|
||||
|
||||
@ -38,6 +38,11 @@ These are designed for personal computers and laptops, focusing on user-friendli
|
||||
- Offers multiple desktop environments
|
||||
- Hardware detection and driver installation out of the box
|
||||
|
||||
### f) Pop-OS
|
||||
- Based off Ubuntu
|
||||
- User-friendly gamer oriented Distrobution
|
||||
- Works well with NVIDIA cards OOTB "Out Of The Box"
|
||||
|
||||
## 2. Server-Oriented Distributions:
|
||||
These focus on stability, security, and performance for server environments.
|
||||
|
||||
@ -46,16 +51,12 @@ These focus on stability, security, and performance for server environments.
|
||||
- Known for stability and long-term support
|
||||
- Widely used in corporate environments
|
||||
|
||||
### b) CentOS:
|
||||
- Free, community-supported version of RHEL
|
||||
- Recently shifted to CentOS Stream, which is upstream of RHEL
|
||||
|
||||
### c) Debian:
|
||||
### b) Debian:
|
||||
- Known for its stability and large software repositories
|
||||
- Forms the base for many other distributions
|
||||
- Strict adherence to free software principles
|
||||
|
||||
### d) Ubuntu Server:
|
||||
### c) Ubuntu Server:
|
||||
- Server version of Ubuntu
|
||||
- Popular for cloud deployments and container hosts
|
||||
- Regular releases and long-term support options
|
||||
@ -106,6 +107,7 @@ Designed for specific use cases or hardware.
|
||||
- Comes with audio, video, and graphics software pre-installed
|
||||
|
||||
## c) SteamOS:
|
||||
- ONLY AVAILABE on SteamDeck
|
||||
- Developed by Valve for gaming
|
||||
- Based on Debian, optimized for Steam and gaming performance
|
||||
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
# Linux has a fascinating history that dates back to the early 1990s.
|
||||
|
||||
1. **Origins**: Linux began as a personal project by Linus Torvalds, a Finnish student, in 1991. He aimed to create a free operating system kernel¹².
|
||||
2. **Unix Influence**: The development of Linux was heavily influenced by Unix, an operating system created by Ken Thompson and Dennis Ritchie at AT&T Bell Labs in 1969¹².
|
||||
3. **GNU Project**: In 1983, Richard Stallman started the GNU Project to create a free Unix-like operating system. Although the GNU kernel (Hurd) was incomplete, the project provided many essential tools for Linux¹².
|
||||
4. **Release of Linux**: Linus Torvalds released the first version of the Linux kernel on September 17, 1991. It quickly gained popularity among developers and the open-source community¹².
|
||||
5. **Growth and Development**: Over the years, Linux has grown significantly, with contributions from developers worldwide. It has become the foundation for many operating systems, including popular distributions like Ubuntu, Fedora, and Debian¹².
|
||||
1. **Origins**: Linux began as a personal project by Linus Torvalds, a Finnish student, in 1991. He aimed to create a free operating system kernel¹.
|
||||
2. **Unix Influence**: The development of Linux was heavily influenced by Unix, an operating system created by Ken Thompson and Dennis Ritchie at AT&T Bell Labs in 1969¹.
|
||||
3. **GNU Project**: In 1983, Richard Stallman started the GNU Project to create a free Unix-like operating system. Although the GNU kernel (Hurd) was incomplete, the project provided many essential tools for Linux¹.
|
||||
4. **Release of Linux**: Linus Torvalds released the first version of the Linux kernel on September 17, 1991. It quickly gained popularity among developers and the open-source community¹.
|
||||
5. **Growth and Development**: Over the years, Linux has grown significantly, with contributions from developers worldwide. It has become the foundation for many operating systems, including popular distributions like Ubuntu, Fedora, and Debian¹.
|
||||
|
||||
- [Wikipedia: History of Linux](https://en.wikipedia.org/wiki/History_of_Linux)¹
|
||||
- [LinuxSimply: History of Linux](https://linuxsimply.com/linux-basics/introduction/history-of-linux/)²
|
||||
|
||||
- [(1) History of Linux - Wikipedia.](https://en.wikipedia.org/wiki/History_of_Linux.)
|
||||
- [(2) History of Linux [A Complete Overview] - LinuxSimply.](https://linuxsimply.com/linux-basics/introduction/history-of-linux/.)
|
||||
= [(3) History of Linux - GeeksforGeeks.](https://www.geeksforgeeks.org/linux-history/.)
|
||||
- [(4) The Complete History of Linux: Everything You Need to Know.](https://www.historytools.org/companies/the-complete-history-of-linux-everything-you-need-to-know.)
|
||||
- [(1) History of Linux - Wikipedia.](https://en.wikipedia.org/wiki/History_of_Linux.)
|
||||
@ -1,7 +1,9 @@
|
||||
# Installing Linux Mint
|
||||
|
||||
## **Step 1: Download Linux Mint**
|
||||
- Go to the official Linux Mint website (https://www.linuxmint.com/) and download the latest version of Linux Mint for your system (e.g., 64-bit or 32-bit).
|
||||
- Go to the official Linux [Mint website](https://www.linuxmint.com/download.php) and download the latest version of Linux Mint for your system.
|
||||
- If you bought your PC in the past decade - use 64-bit!
|
||||
- Cinnamon is recommended for new users.
|
||||
- The download will be an ISO file, which is an image of the Linux Mint operating system.
|
||||
|
||||
## **Step 2: Create a Bootable USB or DVD**
|
||||
|
||||
@ -56,32 +56,27 @@
|
||||
- find (search for files and directories)
|
||||
|
||||
## 10. Piping and Redirection
|
||||
- | (pipe operator)
|
||||
- > and >> (output redirection)
|
||||
- < (input redirection)
|
||||
- | (pipe operator)
|
||||
- \> and >> (output redirection)
|
||||
- < (input redirection)
|
||||
|
||||
## 11. Shell Scripting Basics
|
||||
- Creating and running shell scripts
|
||||
- Variables and environment variables
|
||||
- Conditional statements (if, else, elif)
|
||||
- Loops (for, while)
|
||||
- Creating and running shell scripts
|
||||
- Variables and environment variables
|
||||
- Conditional statements (if, else, elif)
|
||||
- Loops (for, while)
|
||||
|
||||
## 12. Advanced CLI Features
|
||||
- Command history and shortcuts
|
||||
- Tab completion
|
||||
- Aliases
|
||||
- Regular expressions
|
||||
- Command history and shortcuts
|
||||
- Tab completion
|
||||
- Aliases
|
||||
- Regular expressions
|
||||
|
||||
## 13. System Logs and Troubleshooting
|
||||
- journalctl (view system logs)
|
||||
- dmesg (display kernel messages)
|
||||
- lsof (list open files)
|
||||
- journalctl (view system logs)
|
||||
- dmesg (display kernel messages)
|
||||
- lsof (list open files)
|
||||
|
||||
4. **Superuser Powers**:
|
||||
# **Superuser Powers**:
|
||||
- Some tasks require administrator privileges. To execute commands as the superuser (root), prefix them with `sudo`.
|
||||
- Be cautious with superuser access—it's powerful!
|
||||
|
||||
|
||||
- [(1) The Linux command line for beginners | Ubuntu.](https://ubuntu.com/tutorials/command-line-for-beginners.)
|
||||
- [(2) What is Terminal in Linux? The Ultimate Guide LinuxSimply.](https://linuxsimply.com/what-is-terminal-in-linux/.)
|
||||
- [(3) Ubuntu Terminal Beginner's Guide to Command Line Interface - FOSS Linux.](https://www.fosslinux.com/101137/the-ubuntu-terminal-getting-started-with-the-command-line-interface.htm.)
|
||||
- Be cautious with superuser access—it's powerful and WILL break your machine if used improperly!!!
|
||||
|
||||
@ -1,3 +1,79 @@
|
||||
# Linux Filesystem Hierarchy Standard (LFHS)
|
||||
|
||||
The Linux Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Linux and other Unix-like operating systems. It is maintained by the Linux Foundation and provides consistency across distributions. Let's explore the main directories and their purposes:
|
||||
|
||||
## 1. / (Root Directory)
|
||||
The root directory is the top-level directory of the filesystem. All other directories are subdirectories of the root.
|
||||
|
||||
## 2. /bin (Essential User Binaries)
|
||||
Contains essential command binaries that need to be available in single-user mode. Examples include ls, cp, and pwd.
|
||||
|
||||
## 3. /boot (Boot Loader Files)
|
||||
Contains files needed for the boot process, including the kernel, initrd, and boot loader configuration.
|
||||
|
||||
## 4. /dev (Device Files)
|
||||
Contains device files, which are interfaces for device drivers. Examples include /dev/sda for the first SATA drive and /dev/tty for terminals.
|
||||
|
||||
## 5. /etc (Configuration Files)
|
||||
Stores system-wide configuration files and scripts. Examples include /etc/passwd for user information and /etc/fstab for filesystem information.
|
||||
|
||||
## 6. /home (User Home Directories)
|
||||
Contains home directories for regular users. Each user typically has a subdirectory here, like /home/username.
|
||||
|
||||
## 7. /lib (Essential Shared Libraries)
|
||||
Holds library files needed by the binaries in /bin and /sbin.
|
||||
|
||||
## 8. /media (Removable Media)
|
||||
Mount point for removable media such as USB drives and CD-ROMs.
|
||||
|
||||
## 9. /mnt (Temporary Mount Points)
|
||||
Used for temporarily mounted filesystems.
|
||||
|
||||
## 10. /opt (Optional Software)
|
||||
Reserved for the installation of add-on application software packages.
|
||||
|
||||
## 11. /proc (Process Information)
|
||||
A virtual filesystem providing process and kernel information as files.
|
||||
|
||||
## 12. /root (Root User Home Directory)
|
||||
Home directory for the root user.
|
||||
|
||||
## 13. /run (Run-time Variable Data)
|
||||
Contains variable data files describing the system since the last boot.
|
||||
|
||||
## 14. /sbin (System Binaries)
|
||||
Similar to /bin, but contains binaries essential for system administration, usually to be run by root.
|
||||
|
||||
## 15. /srv (Service Data)
|
||||
Contains data for services provided by the system.
|
||||
|
||||
## 16. /sys (System Information)
|
||||
A virtual filesystem providing a standardized interface to kernel objects.
|
||||
|
||||
## 17. /tmp (Temporary Files)
|
||||
Directory for temporary files. Often cleared on reboot.
|
||||
|
||||
## 18. /usr (User Programs)
|
||||
Contains the majority of user utilities and applications. It has several subdirectories:
|
||||
- /usr/bin: Non-essential command binaries
|
||||
- /usr/lib: Libraries for /usr/bin and /usr/sbin
|
||||
- /usr/local: Local hierarchy for system administrators
|
||||
- /usr/sbin: Non-essential system binaries
|
||||
- /usr/share: Architecture-independent data
|
||||
|
||||
## 19. /var (Variable Files)
|
||||
Contains variable data files, including logs (/var/log), temporary email files (/var/mail), and spooled files (/var/spool).
|
||||
|
||||
## 20. Key Principles of FHS:
|
||||
- 1. Separation of core system files from user files
|
||||
- 2. Consistency across distributions
|
||||
- 3. Backward compatibility
|
||||
- 4. Flexibility for system administrators
|
||||
|
||||
## 21. Benefits of FHS:
|
||||
- 1. Easier system administration
|
||||
- 2. Improved security through proper file organization
|
||||
- 3. Compatibility across different Linux distributions
|
||||
- 4. Easier software development and deployment
|
||||
|
||||
[LFHS](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html)
|
||||
|
||||
@ -26,6 +26,7 @@ Certainly! Let's explore how to manage firewalls in **Linux Mint** using the ter
|
||||
sudo apt install gufw
|
||||
```
|
||||
- Open it from the menu: "Firewall Configuration."
|
||||
- For example: In Firewall configuration make sure Port TCP:32400 is open for Plex Server.
|
||||
|
||||
Remember, firewalls protect your network by filtering traffic based on predefined rules. Choose the method that suits your preference! 😊🔥
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user