{"id":358,"date":"2025-03-03T10:02:40","date_gmt":"2025-03-03T10:02:40","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2014\/07\/21\/linux-commands-for-administrator\/"},"modified":"2025-03-03T10:02:40","modified_gmt":"2025-03-03T10:02:40","slug":"linux-commands-for-administrator","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/linux-commands-for-administrator\/","title":{"rendered":"Linux Tutorials: Commands for Linux Administrator"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"853\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/03\/linux-commands-admin.jpg\" alt=\"\" class=\"wp-image-48664\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/03\/linux-commands-admin.jpg 832w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/03\/linux-commands-admin-293x300.jpg 293w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/03\/linux-commands-admin-768x787.jpg 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">1. <code>sudo<\/code> &#8211; Execute commands with elevated privileges, a fundamental for system administration.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">2. <code>useradd<\/code> &#8211; Create a new user account, essential for managing user access.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">3. <code>usermod<\/code> &#8211; Modify a user account, useful for changing account properties.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">4. <code>userdel<\/code> &#8211; Delete a user account, important for managing system access.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">5. <code>groupadd<\/code> &#8211; Add a new group, crucial for managing group permissions.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">6. <code>groupmod<\/code> &#8211; Modify a group, allows changing group attributes.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">7. <code>groupdel<\/code> &#8211; Delete a group, used for removing group access.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">8. <code>chown<\/code> &#8211; Change file owner and group, vital for managing file permissions.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">9. <code>chmod<\/code> &#8211; Change file access permissions, key for securing system files.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">10. <code>chgrp<\/code> &#8211; Change group ownership, important for managing group file access.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">11. <code>passwd<\/code> &#8211; Update a user\u2019s password, critical for account security.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">12. <code>adduser<\/code> &#8211; Add a user account (more interactive than <code>useradd<\/code>).<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">13. <code>deluser<\/code> &#8211; Delete a user account (more user-friendly than <code>userdel<\/code>).<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">14. <code>visudo<\/code> &#8211; Edit the sudoers file, crucial for configuring sudo privileges.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">15. <code>systemctl<\/code> &#8211; Control and manage systemd units, essential for managing services.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. Start a service immediately<\/span>\nsystemctl start serviceName.service\n\n<span class=\"hljs-comment\"># 2. Stop a service immediately<\/span>\nsystemctl stop serviceName.service\n\n<span class=\"hljs-comment\"># 3. Restart a service<\/span>\nsystemctl restart serviceName.service\n\n<span class=\"hljs-comment\"># 4. Show the status of a service<\/span>\nsystemctl status serviceName.service\n\n<span class=\"hljs-comment\"># 5. Enable a service to start on boot<\/span>\nsystemctl enable serviceName.service\n\n<span class=\"hljs-comment\"># 6. Disable a service from starting on boot<\/span>\nsystemctl disable serviceName.service\n\n<span class=\"hljs-comment\"># 7. Check whether a service is enabled<\/span>\nsystemctl is-enabled serviceName.service\n\n<span class=\"hljs-comment\"># 8. Reload the service configuration without interrupting operations<\/span>\nsystemctl reload serviceName.service\n\n<span class=\"hljs-comment\"># 9. View all running services<\/span>\nsystemctl <span class=\"hljs-keyword\">list<\/span>-units --type=service --state=running\n\n<span class=\"hljs-comment\"># 10. Mask a service to prevent it from being started, manually or automatically<\/span>\nsystemctl mask serviceName.service\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">16. <code>journalctl<\/code> &#8211; Query and display messages from the journal, used for system logging.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. Display all log messages<\/span>\njournalctl\n\n<span class=\"hljs-comment\"># 2. Display log messages from the current boot<\/span>\njournalctl -b\n\n<span class=\"hljs-comment\"># 3. Display log messages from a previous boot<\/span>\njournalctl -b <span class=\"hljs-number\">-1<\/span>\n\n<span class=\"hljs-comment\"># 4. Follow the journal live (similar to tail -f)<\/span>\njournalctl -f\n\n<span class=\"hljs-comment\"># 5. Show kernel messages (similar to dmesg)<\/span>\njournalctl -k\n\n<span class=\"hljs-comment\"># 6. Filter log messages by a specific unit<\/span>\njournalctl -u nginx.service\n\n<span class=\"hljs-comment\"># 7. Filter log messages by priority (0=emerg to 7=debug)<\/span>\njournalctl -p err\n\n<span class=\"hljs-comment\"># 8. Show log messages in a specific time range<\/span>\njournalctl --since <span class=\"hljs-string\">\"2023-01-01\"<\/span> --until <span class=\"hljs-string\">\"2023-01-02\"<\/span>\n\n<span class=\"hljs-comment\"># 9. Show log messages for a specific process ID<\/span>\njournalctl _PID=<span class=\"hljs-number\">1234<\/span>\n\n<span class=\"hljs-comment\"># 10. Combine filters, e.g., show error messages for a specific unit since yesterday<\/span>\njournalctl -u apache2.service -p err --since yesterday\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">17. <code>top<\/code> &#8211; Display task manager, important for monitoring system performance.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># <span class=\"hljs-doctag\">Note:<\/span> Most examples are intended to be used within top's interactive mode<\/span>\n\n<span class=\"hljs-comment\"># 1. Start top with a specific delay between updates in seconds<\/span>\ntop -d <span class=\"hljs-number\">5<\/span>\n\n<span class=\"hljs-comment\"># 2. Display top for a specific user's processes<\/span>\ntop -u username<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">18. <code>htop<\/code> &#8211; Interactive process viewer, an enhanced alternative to <code>top<\/code>.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">19. <code>df<\/code> &#8211; Report file system disk space usage, crucial for monitoring disk usage.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">20. <code>du<\/code> &#8211; Estimate file space usage, useful for managing disk space.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">21. <code>free<\/code> &#8211; Display memory usage, important for memory management.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">22. <code>vmstat<\/code> &#8211; Report virtual memory statistics, helpful for performance monitoring.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. Basic usage - Display virtual memory statistics<\/span>\nvmstat\n\n<span class=\"hljs-comment\"># 2. Display vmstat output with a specific interval and count<\/span>\n<span class=\"hljs-comment\"># This will display the report every 2 seconds, 5 times<\/span>\nvmstat <span class=\"hljs-number\">2<\/span> <span class=\"hljs-number\">5<\/span>\n\n<span class=\"hljs-comment\"># 3. Show memory statistics in megabytes<\/span>\nvmstat -S M\n\n<span class=\"hljs-comment\"># 4. Display additional information including slab info<\/span>\nvmstat -m\n\n<span class=\"hljs-comment\"># 5. Display disk statistics<\/span>\nvmstat -d\n\n<span class=\"hljs-comment\"># 6. Display partition statistics<\/span>\nvmstat -p \/dev\/sda1\n\n<span class=\"hljs-comment\"># 7. Display event counter statistics<\/span>\nvmstat -s\n\n<span class=\"hljs-comment\"># 8. Show CPU activity as an average since the last reboot<\/span>\nvmstat -a\n\n<span class=\"hljs-comment\"># 9. Include timestamps in the output<\/span>\nvmstat -t\n\n<span class=\"hljs-comment\"># 10. Display statistics with a delay and include timestamp<\/span>\n<span class=\"hljs-comment\"># This will show the report every 3 seconds with the timestamp included<\/span>\nvmstat <span class=\"hljs-number\">3<\/span> -t\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">23. <code>iostat<\/code> &#8211; Monitor system input\/output device loading, used for diagnosing performance issues.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. Basic usage - Display the CPU and device utilization report<\/span>\niostat\n\n<span class=\"hljs-comment\"># 2. Display the report at 2-second intervals<\/span>\niostat <span class=\"hljs-number\">2<\/span>\n\n<span class=\"hljs-comment\"># 3. Display the extended statistics with more details<\/span>\niostat -x\n\n<span class=\"hljs-comment\"># 4. Display disk utilization report every 2 seconds, 3 times<\/span>\niostat <span class=\"hljs-number\">2<\/span> <span class=\"hljs-number\">3<\/span>\n\n<span class=\"hljs-comment\"># 5. Show only CPU statistics<\/span>\niostat -c\n\n<span class=\"hljs-comment\"># 6. Show only device utilization statistics<\/span>\niostat -d\n\n<span class=\"hljs-comment\"># 7. Display statistics in megabytes per second<\/span>\niostat -m\n\n<span class=\"hljs-comment\"># 8. Show extended statistics with device utilization, refreshing every 5 seconds indefinitely<\/span>\niostat -dx <span class=\"hljs-number\">5<\/span>\n\n<span class=\"hljs-comment\"># 9. Display statistics for a specific device (e.g., sda)<\/span>\niostat -d sda\n\n<span class=\"hljs-comment\"># 10. Display persistent device names and extended statistics<\/span>\niostat -Nx\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">24. <code>netstat<\/code> &#8211; Display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. List all ports (both listening and non-listening ports)<\/span>\nnetstat -a\n\n<span class=\"hljs-comment\"># 2. List all listening ports<\/span>\nnetstat -l\n\n<span class=\"hljs-comment\"># 3. Display TCP connections<\/span>\nnetstat -t\n\n<span class=\"hljs-comment\"># 4. Display UDP connections<\/span>\nnetstat -u\n\n<span class=\"hljs-comment\"># 5. Show statistics by protocol (e.g., TCP, UDP)<\/span>\nnetstat -s\n\n<span class=\"hljs-comment\"># 6. Display listening TCP ports with numeric addresses and don't resolve names<\/span>\nnetstat -lnt\n\n<span class=\"hljs-comment\"># 7. Display listening UDP ports with numeric addresses and don't resolve names<\/span>\nnetstat -lnu\n\n<span class=\"hljs-comment\"># 8. Show the routing table<\/span>\nnetstat -r\n\n<span class=\"hljs-comment\"># 9. Display all sockets, including listening and non-listening, without resolving names<\/span>\nnetstat -an\n\n<span class=\"hljs-comment\"># 10. Show which process is using a particular port<\/span>\nnetstat -tulnp\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">25. <code>ss<\/code> &#8211; Another utility to investigate sockets, replaces <code>netstat<\/code>.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">26. <code>ip<\/code> &#8211; Show \/ manipulate routing, devices, policy routing and tunnels, central for network configuration.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">27. <code>ifconfig<\/code> &#8211; Configure a network interface, traditionally used before <code>ip<\/code>.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">28. <code>iptables<\/code> &#8211; Administer IPv4 packet filtering and NAT, key for firewall management.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. List all current iptables rules<\/span>\niptables -L\n\n<span class=\"hljs-comment\"># 2. Block traffic from a specific IP address<\/span>\niptables -A INPUT -s <span class=\"hljs-number\">192.168<\/span><span class=\"hljs-number\">.1<\/span><span class=\"hljs-number\">.100<\/span> -j DROP\n\n<span class=\"hljs-comment\"># 3. Allow SSH access from a specific IP address<\/span>\niptables -A INPUT -p tcp -s <span class=\"hljs-number\">192.168<\/span><span class=\"hljs-number\">.1<\/span><span class=\"hljs-number\">.100<\/span> --dport <span class=\"hljs-number\">22<\/span> -j ACCEPT\n\n<span class=\"hljs-comment\"># 4. Reject all incoming traffic but allow outgoing traffic<\/span>\niptables -P INPUT REJECT\niptables -P OUTPUT ACCEPT\n\n<span class=\"hljs-comment\"># 5. Allow traffic to a specific port (e.g., HTTP port 80)<\/span>\niptables -A INPUT -p tcp --dport <span class=\"hljs-number\">80<\/span> -j ACCEPT\n\n<span class=\"hljs-comment\"># 6. Delete all rules in a specific chain (e.g., INPUT chain)<\/span>\niptables -F INPUT\n\n<span class=\"hljs-comment\"># 7. Block all traffic from a specific subnet<\/span>\niptables -A INPUT -s <span class=\"hljs-number\">192.168<\/span><span class=\"hljs-number\">.1<\/span><span class=\"hljs-number\">.0<\/span>\/<span class=\"hljs-number\">24<\/span> -j DROP\n\n<span class=\"hljs-comment\"># 8. Allow all incoming traffic on a specific interface (e.g., eth0)<\/span>\niptables -A INPUT -i eth0 -j ACCEPT\n\n<span class=\"hljs-comment\"># 9. Log dropped packets<\/span>\niptables -A INPUT -m limit --limit <span class=\"hljs-number\">5<\/span>\/min -j LOG --log-prefix <span class=\"hljs-string\">\"iptables dropped: \"<\/span> --log-level <span class=\"hljs-number\">7<\/span>\n\n<span class=\"hljs-comment\"># 10. Save iptables rules to be loaded on boot<\/span>\niptables-save &gt; \/etc\/iptables\/rules.v4\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">29. <code>firewalld<\/code> &#8211; Dynamically manage firewall with support for network zones.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. Start firewalld<\/span>\nsudo systemctl start firewalld\n\n<span class=\"hljs-comment\"># 2. Enable firewalld to start at boot<\/span>\nsudo systemctl enable firewalld\n\n<span class=\"hljs-comment\"># 3. Check the status of firewalld<\/span>\nsudo systemctl status firewalld\n\n<span class=\"hljs-comment\"># 4. Reload firewalld rules without losing state<\/span>\nsudo firewall-cmd --reload\n\n<span class=\"hljs-comment\"># 5. List all active zones<\/span>\nsudo firewall-cmd --get-active-zones\n\n<span class=\"hljs-comment\"># 6. Set the default zone<\/span>\nsudo firewall-cmd --set-<span class=\"hljs-keyword\">default<\/span>-zone=<span class=\"hljs-keyword\">public<\/span>\n\n<span class=\"hljs-comment\"># 7. Add a service to the default zone permanently<\/span>\nsudo firewall-cmd --permanent --add-service=http\n\n<span class=\"hljs-comment\"># 8. Open a port in the default zone permanently<\/span>\nsudo firewall-cmd --permanent --add-port=<span class=\"hljs-number\">8080<\/span>\/tcp\n\n<span class=\"hljs-comment\"># 9. Remove a service from the default zone permanently<\/span>\nsudo firewall-cmd --permanent --remove-service=http\n\n<span class=\"hljs-comment\"># 10. List all rules in the default zone<\/span>\nsudo firewall-cmd --<span class=\"hljs-keyword\">list<\/span>-all\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">30. <code>nftables<\/code> &#8211; Modern replacement for iptables, ip6tables, arptables, and ebtables.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">31. <code>crontab<\/code> &#8211; Schedule periodic background jobs, essential for automating tasks.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">32. <code>rsync<\/code> &#8211; Fast, versatile file copying tool, important for backups and synchronization.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">33. <code>tar<\/code> &#8211; Archive utility, used for packing and unpacking archive files.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">34. <code>gzip<\/code> \/ <code>bzip2<\/code> &#8211; Compress or expand files, crucial for managing file sizes.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">35. <code>unzip<\/code> \/ <code>zip<\/code> &#8211; Compress and decompress files in zip format.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">36. <code>mount<\/code> &#8211; Mount a filesystem, important for attaching storage devices.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">37. <code>umount<\/code> &#8211; Unmount file systems, counterpart to <code>mount<\/code>.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">38. <code>fsck<\/code> &#8211; Check and repair a Linux filesystem, crucial for filesystem maintenance.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">39. <code>lvm<\/code> &#8211; Logical Volume Manager, essential for managing disk storage.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">40. <code>ssh<\/code> &#8211; Secure Shell, a protocol for secure remote login and other secure network services.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">41. <code>scp<\/code> &#8211; Secure copy (remote file copy program), used for secure file transfer.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">42. <code>sftp<\/code> &#8211; Secure File Transfer Program, another secure file transfer utility.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">43. <code>wget<\/code> &#8211; Non-interactive network downloader, used for downloading files from the web.<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">44. <code>curl<\/code> &#8211; Tool to transfer data from or to a server, supports various protocols.<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># 1. Download a file<\/span>\ncurl -O http:<span class=\"hljs-comment\">\/\/example.com\/file.txt<\/span>\n\n<span class=\"hljs-comment\"># 2. Save the downloaded file with a specific filename<\/span>\ncurl -o newfilename.txt http:<span class=\"hljs-comment\">\/\/example.com\/file.txt<\/span>\n\n<span class=\"hljs-comment\"># 3. Use curl with a user agent<\/span>\ncurl -A <span class=\"hljs-string\">\"Mozilla\/5.0\"<\/span> http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 4. Send a GET request<\/span>\ncurl -X GET http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 5. Send a POST request with data<\/span>\ncurl -X POST -d <span class=\"hljs-string\">\"data=example\"<\/span> http:<span class=\"hljs-comment\">\/\/example.com\/post<\/span>\n\n<span class=\"hljs-comment\"># 6. Send a POST request with a file<\/span>\ncurl -X POST -F <span class=\"hljs-string\">\"file=@localfile.txt\"<\/span> http:<span class=\"hljs-comment\">\/\/example.com\/upload<\/span>\n\n<span class=\"hljs-comment\"># 7. Pass a header to the HTTP request<\/span>\ncurl -H <span class=\"hljs-string\">\"X-Custom-Header: value\"<\/span> http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 8. Follow HTTP redirects<\/span>\ncurl -L http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 9. Perform a basic HTTP authentication<\/span>\ncurl -u username:password http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 10. Use verbose mode to see request\/response details<\/span>\ncurl -v http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 11. Make a request to an HTTPS site that has a self-signed cert<\/span>\ncurl -k https:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 12. Resume a previous file transfer<\/span>\ncurl -C - -O http:<span class=\"hljs-comment\">\/\/example.com\/bigfile.zip<\/span>\n\n<span class=\"hljs-comment\"># 13. Limit the bandwidth for file download<\/span>\ncurl --limit-rate <span class=\"hljs-number\">100<\/span>K -O http:<span class=\"hljs-comment\">\/\/example.com\/bigfile.zip<\/span>\n\n<span class=\"hljs-comment\"># 14. Use a proxy for the HTTP request<\/span>\ncurl -x http:<span class=\"hljs-comment\">\/\/proxy-server:port http:\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 15. Get the HTTP headers of a URL<\/span>\ncurl -I http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 16. Use cookies with your request<\/span>\ncurl -b <span class=\"hljs-string\">\"name=value\"<\/span> http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 17. Store server's response cookies into a file<\/span>\ncurl -c cookies.txt http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 18. Send a custom request method<\/span>\ncurl -X PUT http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 19. Use IPv6 for the request<\/span>\ncurl <span class=\"hljs-number\">-6<\/span> http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n\n<span class=\"hljs-comment\"># 20. Include both request headers and response in the output<\/span>\ncurl -i http:<span class=\"hljs-comment\">\/\/example.com<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>1. sudo &#8211; Execute commands with elevated privileges, a fundamental for system administration. 2. useradd &#8211; Create a new user account, essential for managing user access. 3. usermod &#8211; Modify a user account, useful for changing account properties. 4. userdel &#8211; Delete a user account, important for managing system access. 5. groupadd &#8211; Add a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3667,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[4957],"tags":[1996,1993,378,460,2003,1994,1995,1999,1998,1997,2000,2002,2001],"class_list":["post-358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-admin-linux-commands","tag-administrator","tag-commands","tag-linux","tag-linux-admin-commands-reference","tag-linux-commands","tag-linux-commands-for-administrators","tag-linux-commands-for-administrators-guide","tag-linux-commands-for-administrators-reference","tag-linux-commands-for-administrators-tutorials","tag-linux-commands-guide","tag-linux-commands-reference","tag-linux-commands-tutorials"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":13,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":48665,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/358\/revisions\/48665"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3667"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}