{"id":122,"date":"2026-10-12T09:31:26","date_gmt":"2026-10-12T09:31:26","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2009\/03\/07\/basic-of-unix-presentation\/"},"modified":"2026-10-12T09:31:26","modified_gmt":"2026-10-12T09:31:26","slug":"basic-of-unix-presentation","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/basic-of-unix-presentation\/","title":{"rendered":"Unix Basics for DevOps Engineers: Commands, Permissions, Pipes, and Workflow"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>Originally published on 2009-03-07; fully revised and updated.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unix fundamentals are still central to modern DevOps work, from troubleshooting CI runners to managing containers and servers. This guide gives you a clear, practical starting point: what Unix is, how commands run, and which commands you will use daily.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/03\/unix-presentation.png\" alt=\"unix-presentation\" width=\"600\" height=\"400\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Original presentation and attribution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The original post was primarily an embedded SlideShare presentation. It is preserved below for attribution and historical reference.<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/www.slideshare.net\/slideshow\/embed_code\/key\/MR3QwXbr7fXTi1\" width=\"595\" height=\"485\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><\/iframe>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/www.slideshare.net\/rajeshatbuzz\/basic-unix\" target=\"_blank\" rel=\"noopener\">Basic Unix<\/a><\/strong> from <strong><a href=\"https:\/\/www.slideshare.net\/rajeshatbuzz\" target=\"_blank\" rel=\"noopener\">Rajesh Kumar<\/a><\/strong>. View more presentations on <a href=\"https:\/\/www.slideshare.net\/\" target=\"_blank\" rel=\"noopener\">SlideShare<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Unix fundamentals every DevOps engineer should know<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In practice, most engineers work on Unix-like systems (commonly Linux and BSD-derived environments). The command model and tooling patterns below are broadly transferable across shells and distributions.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Everything is file-oriented:<\/strong> devices, logs, configs, and process interfaces are often exposed through filesystem-like paths.<\/li><li><strong>Small tools compose well:<\/strong> combine commands with pipes to solve bigger tasks quickly.<\/li><li><strong>Permissions matter:<\/strong> ownership and mode bits control what users and services can read, write, or execute.<\/li><li><strong>Processes are first-class:<\/strong> service operation, debugging, and incident response all rely on process inspection.<\/li><li><strong>Text is the universal interface:<\/strong> logs and config files are frequently plain text and easy to automate.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How a Unix command is executed<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding this path helps with debugging command failures, permission errors, and path issues in CI\/CD jobs.<\/p>\n\n\n\n<pre class=\"mermaid\">\nflowchart TD\n    A[User types command in shell] --> B[Shell parses command and expands variables]\n    B --> C{Built in command}\n    C -- yes --> D[Shell executes built in]\n    C -- no --> E[Shell locates executable in PATH]\n    E --> F[Kernel starts process]\n    F --> G[Program reads input and files]\n    G --> H[Program writes stdout or stderr]\n    D --> I[Shell returns exit code]\n    H --> I\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The shell captures an <strong>exit code<\/strong> after each command. A zero value usually means success; non-zero values indicate an error condition.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Essential Unix commands at a glance<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Best for<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>pwd<\/code>, <code>cd<\/code>, <code>ls<\/code><\/td><td>Navigation and directory inspection<\/td><td><code>ls -lah \/var\/log<\/code><\/td><\/tr><tr><td><code>cat<\/code>, <code>less<\/code>, <code>head<\/code>, <code>tail<\/code><\/td><td>Reading files and logs<\/td><td><code>tail -n 100 app.log<\/code><\/td><\/tr><tr><td><code>grep<\/code>, <code>sort<\/code>, <code>uniq<\/code>, <code>wc<\/code><\/td><td>Text filtering and aggregation<\/td><td><code>grep \"ERROR\" app.log | wc -l<\/code><\/td><\/tr><tr><td><code>find<\/code>, <code>xargs<\/code><\/td><td>File discovery and bulk operations<\/td><td><code>find . -name \"*.yaml\"<\/code><\/td><\/tr><tr><td><code>chmod<\/code>, <code>chown<\/code><\/td><td>Permissions and ownership<\/td><td><code>chmod 640 secrets.txt<\/code><\/td><\/tr><tr><td><code>ps<\/code>, <code>kill<\/code>, <code>top<\/code><\/td><td>Process visibility and control<\/td><td><code>ps aux | grep nginx<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Practical Unix command examples<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use these examples as a starter lab in a non-production directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Navigate files and inspect directories<\/h3>\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 language-bash\">mkdir -p ~\/unix-lab\/logs\ncd ~\/unix-lab\npwd\ntouch notes.txt\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"hello unix\"<\/span> &gt; notes.txt\nls -lah\ncat notes.txt<\/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<h3 class=\"wp-block-heading\">Read, search, and transform text<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript language-bash\">grep -R <span class=\"hljs-string\">\"ERROR\"<\/span> \/<span class=\"hljs-keyword\">var<\/span>\/log <span class=\"hljs-number\">2<\/span>&gt;<span class=\"hljs-regexp\">\/dev\/<\/span><span class=\"hljs-literal\">null<\/span> | head\nfind . -type f -name <span class=\"hljs-string\">\"*.log\"<\/span> -mtime <span class=\"hljs-number\">-1<\/span>\nsort app.log | uniq -c | sort -nr | head<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Permissions and processes<\/h3>\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 language-bash\">chmod <span class=\"hljs-number\">640<\/span> notes.txt\nchown $USER:$USER notes.txt\nps aux | grep ssh\nkill -TERM <span class=\"hljs-number\">12345<\/span><\/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<h2 class=\"wp-block-heading\">Redirection and pipeline operators<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Operator<\/th><th>Meaning<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>&gt;<\/code><\/td><td>Write stdout to a file (overwrite)<\/td><td><code>command &gt; out.txt<\/code><\/td><\/tr><tr><td><code>&gt;&gt;<\/code><\/td><td>Append stdout to a file<\/td><td><code>command &gt;&gt; out.txt<\/code><\/td><\/tr><tr><td><code>2&gt;<\/code><\/td><td>Write stderr to a file<\/td><td><code>command 2&gt; err.txt<\/code><\/td><\/tr><tr><td><code>2&gt;&amp;1<\/code><\/td><td>Send stderr to same target as stdout<\/td><td><code>command &gt; all.log 2&gt;&amp;1<\/code><\/td><\/tr><tr><td><code>|<\/code><\/td><td>Pipe stdout of one command to next command input<\/td><td><code>cat app.log | grep ERROR<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Best practices and common pitfalls<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Use <code>pwd<\/code> and <code>ls<\/code> often to avoid running commands in the wrong directory.<\/li><li>Quote paths with spaces: <code>\"my file.txt\"<\/code>.<\/li><li>Be careful with recursive operations like <code>rm -rf<\/code> and broad <code>find<\/code> patterns.<\/li><li>Check permissions before assuming a command is broken.<\/li><li>Read command help with <code>man<\/code> pages or <code>--help<\/code> flags.<\/li><li>In production, prefer non-destructive dry runs when available.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you are new to Unix, focus first on navigation, text processing, and permissions. Those three areas solve a large share of daily DevOps troubleshooting tasks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This revised guide turns a legacy Unix slide embed into a practical reference for beginners and DevOps engineers. Learn core Unix concepts, essential commands, and command execution flow with hands-on examples.<\/p>\n","protected":false},"author":1,"featured_media":4025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4957],"tags":[3096,3104,3103,3094,169,3097,3100,3098,3102,3099,3095,3101],"class_list":["post-122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-basic-unix","tag-basic-unix-concept","tag-learn-unix","tag-presentation","tag-unix","tag-unix-basics","tag-unix-guide","tag-unix-introduction","tag-unix-learning-reference","tag-unix-ppt","tag-unix-presentation","tag-unix-tutorial"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/122","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=122"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":78971,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/122\/revisions\/78971"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/4025"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}