♦️توی لینوکس فایلها بهصورت ذاتی نیازی به پسوند ندارند.
این برخلاف سیستمعاملهایی مثل ویندوز هستش که از پسوند فایل برای تشخیص نوع اون استفاده میکنه! توی لینوکس، نوع فایلها بر اساس محتوای داخلی اونها تعیین میشه.
مثلا شما یه آهنگ داشته باشین نیازی نیست که حتما اسمش یا mp3. تموم شده باشه لینوکس از metadata اون تشخیص میده که آهنگه...
#Linux
این برخلاف سیستمعاملهایی مثل ویندوز هستش که از پسوند فایل برای تشخیص نوع اون استفاده میکنه! توی لینوکس، نوع فایلها بر اساس محتوای داخلی اونها تعیین میشه.
مثلا شما یه آهنگ داشته باشین نیازی نیست که حتما اسمش یا mp3. تموم شده باشه لینوکس از metadata اون تشخیص میده که آهنگه...
#Linux
♦️اگر فایلی را در لینوکس به اشتباه پاک کردید، سریع این دستورات رو بزنید تا بتونید ریکاوری کنید.
#Linux
#Linux
❤1
♦️ #Linux System Administration Essentials:
🔹 Command to check Disk usage?
📌 df -h - Check disk usage in human-readable format.
📌 du -sh <directory> - Check the size of a specific directory.
🔹 Difference between ps -aux & top command?
✅ ps -aux - Provides a snapshot of active processes.
✅ top - Real-time system performance monitoring.
🔹 What are the Ways to check CPU usage?
💻 top | htop | mpstat | vmstat | sar
🔹 How to check CPU details?
📌 lscpu or cat /proc/cpuinfo
🔹 Steps to create a partition & format with a file system?
1️⃣ fdisk /dev/sdX - Create a partition.
2️⃣ mkfs.ext4 /dev/sdX1 - Format the partition.
3️⃣ mount /dev/sdX1 /mnt - Mount the partition.
🔹 Steps to create LV?
1️⃣ pvcreate /dev/sdX
2️⃣ vgcreate vg_name /dev/sdX
3️⃣ lvcreate -L 10G -n lv_name vg_name
4️⃣ mkfs.ext4 /dev/vg_name/lv_name
🔹 Steps to reduce XFS & EXT file systems?
⚠️ XFS: Cannot be reduced directly.
✅ EXT: umount, resize2fs, lvreduce, mount
🔹 Significance of .bashrc file?
📝 User-specific shell configurations & aliases.
🔹 How to check the kernel version?
📌 uname -r
🔹 How to check the Red Hat release version?
📌 cat /etc/redhat-release or cat /etc/os-release
🔹 Significance of resolv.conf file?
🌍 Configures DNS name resolution.
🔹 What is DNS? How to resolve DNS? Types of DNS records?
🔍 DNS translates domain names to IP addresses.
✅ Resolve: nslookup or dig
📌 Types: A, AAAA, CNAME, MX, TXT, PTR
🔹 Difference between Nginx & HTTP Server?
🚀 Nginx: Event-driven | Apache: Process-based
🔹 Port numbers:
🌐 HTTP: 80 | 📂 FTP: 21 | 🔐 SSH: 22 | 🔒 HTTPS: 443
🔹 What is SSH? How to generate SSH-keys?
🔐 Secure Shell protocol for remote access.
📌 Generate keys: ssh-keygen
🔹 What are Private & Public keys? How do they authenticate?
🔑 Private key (kept secret) & Public key (shared).
✅ Authentication via asymmetric encryption.
🔹 Configuration file of SSH?
📌 /etc/ssh/sshd_config
🔹 Configuration file of HTTP?
📌 /etc/httpd/conf/httpd.conf (Apache)
🔹 What is Virtual Hosting? How to configure it?
🌐 Hosting multiple sites on a single server.
📌 Configure using <VirtualHost> in Apache.
🔹 Explain ifconfig command?
🌍 Displays/configures network interfaces.
🔹 Difference between IPv4 & IPv6?
✅ IPv4: 32-bit | ✅ IPv6: 128-bit
🔹 What is a MAC address? Can we change it?
📌 Unique network identifier.
⚠️ Change: ifconfig eth0 hw ether <MAC>
🔹 How to check system uptime?
📌 uptime
🔹 How to check memory information?
📌 free -m | cat /proc/meminfo
🔹 What is SWAP?
🛠️ Virtual memory when RAM is full.
| WWW.IT-MANAGER.IR |
🔹 Command to check Disk usage?
📌 df -h - Check disk usage in human-readable format.
📌 du -sh <directory> - Check the size of a specific directory.
🔹 Difference between ps -aux & top command?
✅ ps -aux - Provides a snapshot of active processes.
✅ top - Real-time system performance monitoring.
🔹 What are the Ways to check CPU usage?
💻 top | htop | mpstat | vmstat | sar
🔹 How to check CPU details?
📌 lscpu or cat /proc/cpuinfo
🔹 Steps to create a partition & format with a file system?
1️⃣ fdisk /dev/sdX - Create a partition.
2️⃣ mkfs.ext4 /dev/sdX1 - Format the partition.
3️⃣ mount /dev/sdX1 /mnt - Mount the partition.
🔹 Steps to create LV?
1️⃣ pvcreate /dev/sdX
2️⃣ vgcreate vg_name /dev/sdX
3️⃣ lvcreate -L 10G -n lv_name vg_name
4️⃣ mkfs.ext4 /dev/vg_name/lv_name
🔹 Steps to reduce XFS & EXT file systems?
⚠️ XFS: Cannot be reduced directly.
✅ EXT: umount, resize2fs, lvreduce, mount
🔹 Significance of .bashrc file?
📝 User-specific shell configurations & aliases.
🔹 How to check the kernel version?
📌 uname -r
🔹 How to check the Red Hat release version?
📌 cat /etc/redhat-release or cat /etc/os-release
🔹 Significance of resolv.conf file?
🌍 Configures DNS name resolution.
🔹 What is DNS? How to resolve DNS? Types of DNS records?
🔍 DNS translates domain names to IP addresses.
✅ Resolve: nslookup or dig
📌 Types: A, AAAA, CNAME, MX, TXT, PTR
🔹 Difference between Nginx & HTTP Server?
🚀 Nginx: Event-driven | Apache: Process-based
🔹 Port numbers:
🌐 HTTP: 80 | 📂 FTP: 21 | 🔐 SSH: 22 | 🔒 HTTPS: 443
🔹 What is SSH? How to generate SSH-keys?
🔐 Secure Shell protocol for remote access.
📌 Generate keys: ssh-keygen
🔹 What are Private & Public keys? How do they authenticate?
🔑 Private key (kept secret) & Public key (shared).
✅ Authentication via asymmetric encryption.
🔹 Configuration file of SSH?
📌 /etc/ssh/sshd_config
🔹 Configuration file of HTTP?
📌 /etc/httpd/conf/httpd.conf (Apache)
🔹 What is Virtual Hosting? How to configure it?
🌐 Hosting multiple sites on a single server.
📌 Configure using <VirtualHost> in Apache.
🔹 Explain ifconfig command?
🌍 Displays/configures network interfaces.
🔹 Difference between IPv4 & IPv6?
✅ IPv4: 32-bit | ✅ IPv6: 128-bit
🔹 What is a MAC address? Can we change it?
📌 Unique network identifier.
⚠️ Change: ifconfig eth0 hw ether <MAC>
🔹 How to check system uptime?
📌 uptime
🔹 How to check memory information?
📌 free -m | cat /proc/meminfo
🔹 What is SWAP?
🛠️ Virtual memory when RAM is full.
❤2
♦️اگه احیانا دیتابیسی چیز مهمی روی سرور آوردین بالا پورتش رو با فایروال ببندین برای اتصال بهش از سیستم شخصی نیازی نیست حتما پورتش باز باشه کافیه با ssh تونل کنید مثلا phpmyadmin روی پورت 8888 داشتین،
کافیه این دستورو بزنید
ssh -L 8888:localhost:8888 root@1.2.3.4
بعد توی سیستم خودتون میتونید تونل شده بهش از ادرس زیر دسترسی داشته باشین
localhost:8888
#Linux
کافیه این دستورو بزنید
ssh -L 8888:localhost:8888 root@1.2.3.4
بعد توی سیستم خودتون میتونید تونل شده بهش از ادرس زیر دسترسی داشته باشین
localhost:8888
#Linux