{"id":190,"date":"2011-09-19T14:55:00","date_gmt":"2011-09-19T14:55:00","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=190"},"modified":"2026-04-28T16:23:55","modified_gmt":"2026-04-28T10:53:55","slug":"linux-commands","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/linux-commands\/","title":{"rendered":"Basic Linux Commands for Server Management"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Introduction<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Linux command-line tools are essential for server administration and daily operations. Understanding basic commands helps in managing files, monitoring system usage, and troubleshooting issues efficiently.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Prerequisites<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before using these commands, ensure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access to a Linux server via SSH<\/li>\n\n\n\n<li>Basic familiarity with terminal usage<\/li>\n\n\n\n<li>Required permissions for executing commands<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Linux Commands<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Disk Usage<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">du -sch *<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Displays total disk usage of files and directories in the current location<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">df -h<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Shows overall disk space usage of all mounted filesystems<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. File &amp; Directory Management<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">ls -la<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lists all files (including hidden) with details<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/path\/to\/directory<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change directory<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">pwd<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Show current directory path<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir dirname<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a new directory<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">rm -rf dirname<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Remove directory or files (use with caution)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. File Viewing &amp; Editing<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">cat filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Display file contents<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">less filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>View file page by page<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">nano filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Edit file using nano editor<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">vi filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Edit file using vi editor<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. File Permissions &amp; Ownership<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">chmod 755 filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change file permissions<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">chown user:user filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change file ownership<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Process Management<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">top<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>View running processes in real-time<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">ps aux<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>List all running processes<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">kill -9 PID<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Terminate a process<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Network Commands<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">ping google.com<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check network connectivity<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">ifconfig<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Display network interfaces (or use <code>ip a<\/code>)<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -tulpn<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Show open ports and services<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. System Monitoring<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">uptime<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Show system uptime<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">free -m<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Display memory usage<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">who<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Show logged-in users<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. Archive &amp; Compression<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">tar -czvf file.tar.gz folder\/<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Compress files<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">tar -xzvf file.tar.gz<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Extract compressed files<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>9. Search &amp; Find<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">find \/ -name filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Search for files<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">grep \"text\" filename<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Search text inside files<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Notes<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <code>--help<\/code> or <code>man &lt;command><\/code> to learn more about any command<\/li>\n\n\n\n<li>Be cautious with commands like <code>rm -rf<\/code> and <code>kill -9<\/code><\/li>\n\n\n\n<li>Some commands require root privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Basic Linux commands are the foundation of server management. Mastering these commands will improve efficiency, troubleshooting capabilities, and overall system control.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Linux command-line tools are essential for server administration and daily operations. Understanding basic commands helps in managing files, monitoring [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-web-architecture","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-34","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":10058,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/190\/revisions\/10058"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}