<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arie Bregman</title>
    <description>The latest articles on DEV Community by Arie Bregman (@abregman).</description>
    <link>https://dev.to/abregman</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F270498%2Fa4190921-b1df-4185-895b-4d0b29d10183.jpeg</url>
      <title>DEV Community: Arie Bregman</title>
      <link>https://dev.to/abregman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abregman"/>
    <language>en</language>
    <item>
      <title>How to prepare for DevOps &amp; SRE interviews?</title>
      <dc:creator>Arie Bregman</dc:creator>
      <pubDate>Thu, 02 Jan 2020 16:41:31 +0000</pubDate>
      <link>https://dev.to/abregman/how-to-prepare-for-devops-sre-interviews-enj</link>
      <guid>https://dev.to/abregman/how-to-prepare-for-devops-sre-interviews-enj</guid>
      <description>&lt;p&gt;Note: the following is opinionated.&lt;br&gt;
Note2: the most updated version of this post is located in my GitHub &lt;a href="https://github.com/bregman-arie/devops-interview-questions/blob/master/prepare_for_interview.md"&gt;project&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Skills you should have
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Linux
&lt;/h4&gt;

&lt;p&gt;Every DevOps Engineer should have a deep understanding of at least one operating system and if you have the option to choose then I would say it should definitely be Linux as I believe it's a requirement of at least 90% of the DevOps jobs postings out there.&lt;/p&gt;

&lt;p&gt;Usually, the followup question is "How extensive should my knowledge be?" Out of all the DevOps skills, I would say this, along with coding, should be your strongest skills. Be familiar with OS processes, debugging tools, filesystem, networking, ... know your operating system, understand how it works, how to manage issues, etc.&lt;/p&gt;

&lt;p&gt;Not long ago, I've created a list of Linux resources right &lt;a href="https://dev.to/abregman/collection-of-linux-resources-3nhk"&gt;here&lt;/a&gt;. There are some good sites there that you can use for learning more about Linux.&lt;/p&gt;

&lt;h4&gt;
  
  
  Coding
&lt;/h4&gt;

&lt;p&gt;My personal belief is that any DevOps engineer should know coding, at least to some degree. Having this skill you can automate manual processes, improve some of the open source tools you are using today or build new tools &amp;amp; projects to provide a solution to existing problems. Knowing how to code =  a lot of power.&lt;/p&gt;

&lt;p&gt;When it comes to interviews you'll notice that the level of knowledge very much depends on the company or position you are interviewing for. Some will require you just to be able to write simple scripts while others will deep dive into common algorithms, data structures, etc. It's usually clear from the job requirements or phone interview.&lt;/p&gt;

&lt;p&gt;The best way to practice this skill is by doing some actual coding - scripts, online challenges, CLI tools, web applications, ... just code :)&lt;/p&gt;

&lt;p&gt;Also, the following is probably clear to most people but let's still clarify it: when given the chance to choose any language for answering coding tasks/questions, choose the one you have experience with! Some candidates prefer to choose the language they think the company is using and this is a huge mistake since giving the right answer is always better than a wrong answer, no matter which language you have used :)&lt;/p&gt;

&lt;p&gt;I recommend the following sites for practicing coding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.hackerrank.com"&gt;HackerRank&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com"&gt;LeetCode&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://exercism.io"&gt;Exercism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pab5OiHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.kym-cdn.com/photos/images/original/001/525/884/7ed.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pab5OiHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.kym-cdn.com/photos/images/original/001/525/884/7ed.jpg" width="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Architecture and Design
&lt;/h4&gt;

&lt;p&gt;This is also an important aspect of DevOps. You should be able to describe how to design different systems, workflows, and architectures. Also, the scale is an important aspect of that. A design which might work for a dozen of hosts or X amount of data, will not necessarily work well with bigger scale.&lt;/p&gt;

&lt;p&gt;Some ideas for you to explore: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to design and implement a CI pipeline (or pipelines) for verifying PRs, run multiple different types of tests, package the project and deploy it somewhere&lt;/li&gt;
&lt;li&gt;How to design and implement secured ELK architecture which will get logs from 10,000 apps and will display the data eventually to the user&lt;/li&gt;
&lt;li&gt;Microservices designs are also quite popular these days&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I recommend going over the following GitHub projects as they are really deep-diving into System Design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/donnemartin/system-design-primer"&gt;https://github.com/donnemartin/system-design-primer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tools
&lt;/h4&gt;

&lt;p&gt;Some interviews will focus on specific tools or technologies. Which tools? this is mainly based on a combination of what you mentioned in your C.V &amp;amp; those that are mentioned in the job posting and used in the company. Here are some questions I believe anyone should know to answer regarding the tools he/she is familiar with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What the tool does? What it allows us to achieve that we couldn't do without it?
&lt;/li&gt;
&lt;li&gt;What its advantages over other tools in the same area, with the same purpose? Why did you choose to use it?&lt;/li&gt;
&lt;li&gt;How it works?
&lt;/li&gt;
&lt;li&gt;How to use it?
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's deep dive into practical preparation steps&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenarios || Challenges || Tasks
&lt;/h3&gt;

&lt;p&gt;This is a very common way to interview today for DevOps roles. The candidate is given a task which represents a common task of DevOps Engineers or a piece of common knowledge and the candidate has several hours or days to accomplish the task.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;This is a great way to prepare for interviews and I recommend to try it out before actually interviewing. How? Take requirements from job posts and convert them into scenarios. Let's see an example:&lt;/p&gt;

&lt;p&gt;"Knowledge in CI/CD" -&amp;gt; Scenario: create a CI/CD pipeline for a project.&lt;/p&gt;

&lt;p&gt;At this point, some people ask: "but what project?" and the answer is: what about GitHub? it has only 9125912851285192 projects...and a free way to set up CI to any of them (also a great way to learn how to collaborate with others :) )&lt;/p&gt;

&lt;p&gt;Let's convert another scenario:                                                                                                                                              &lt;/p&gt;

&lt;p&gt;"Experience with provisioning servers" -&amp;gt; Scenario: provision a server (to make it more interesting: create a web server).&lt;/p&gt;

&lt;p&gt;And the last example:                                                                                                                                                        &lt;/p&gt;

&lt;p&gt;"Experience with scripting" -&amp;gt; Scenario: write a script. Don't waste too much time thinking "what script should I write?". Simply automate something you are doing manually or even implement your own version of common small utils.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start your own DevOps project
&lt;/h3&gt;

&lt;p&gt;Starting a DevOps project is a good idea because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It will make you practice coding&lt;/li&gt;
&lt;li&gt;It will be something you can add to your resume and talk about with the interviewer&lt;/li&gt;
&lt;li&gt;Depends on size and complexity, it can teach you something about design in general&lt;/li&gt;
&lt;li&gt;Depends on adoption, it can you teach you about managing Open Source projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same here, don't overthink what your project should be about. Just go and build something :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample interview questions
&lt;/h3&gt;

&lt;p&gt;Make a sample list of interview questions on various topics/areas like technical, company, role, ... and try to answer them.&lt;br&gt;
See if you can manage to answer them in a fluent, detailed way.&lt;/p&gt;

&lt;p&gt;I've gathered "a couple" of questions &lt;a href="https://github.com/bregman-arie/devops-interview-questions"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Better yet, ask a good friend/colleague to challenge you with some questions. Your self-awareness might be an obstacle in objective self-review of your knowledge :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UaWVLXRw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgflip.com/3l06t0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UaWVLXRw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgflip.com/3l06t0.jpg" width="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Networking
&lt;/h3&gt;

&lt;p&gt;For those who attend technical meetups and conferences, it can be a great opportunity to chat with people from other companies on their interviewing process. But don't start with it, it can be quite awkward. Say at least hello first... (:&lt;/p&gt;

&lt;p&gt;Doing so can give you a lot of information on what to expect from an interview at some companies or how to how to better prepare.&lt;/p&gt;

&lt;h3&gt;
  
  
  Know your resume
&lt;/h3&gt;

&lt;p&gt;It may sound trivial but the idea here is simple: be ready to answer any question regarding any line you included in your resume.&lt;br&gt;
Sometimes candidates surprised when they are asked on a skill or line which seems to be not related to the position but the simple truth is: if you mentioned something on your resume, it's only fair to ask you about it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Know the company
&lt;/h3&gt;

&lt;p&gt;Be familiar with the company you are interviewing at. Some ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What the company does?&lt;/li&gt;
&lt;li&gt;What products it has?&lt;/li&gt;
&lt;li&gt;Why its products are unique (or better than other products)? This can also be a good question for you to ask&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Books
&lt;/h3&gt;

&lt;p&gt;From my experience, this is not done by many candidates but it's one of the best ways to deep dive into topics like operating system, virtualization, scale, distributed systems, etc.    &lt;/p&gt;

&lt;p&gt;In most cases, you will do fine without reading books but for the AAA interviews (hardest level) you'll want to read some books and overall if you inspire to be better DevOps Engineer, books (also articles, blog posts) is a great way :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Consider starting in non-DevOps position
&lt;/h3&gt;

&lt;p&gt;While not a preparation step, you should know that landing DevOps as a first position can be challenging. No, it's not impossible but still, since DevOps covers many different practices, tools, ... it can be quite challenging and also overwhelming for someone to try and achieve it as a first position.&lt;br&gt;&lt;br&gt;
A possible path to becoming a DevOps engineer is to start with actually a different (but related) position and switch from there after 1-2 years or more.&lt;/p&gt;

&lt;p&gt;Some ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;System Administrator - This is perfect because every DevOps Engineer should have a solid understanding of the OS and sysadmins know their OS :)&lt;/li&gt;
&lt;li&gt;Software Developer/Engineer - A DevOps should have coding skills and this position will provide more than the required knowledge in most cases&lt;/li&gt;
&lt;li&gt;QA Engineer - This is a more tricky one because IMHO there are less overlapping areas/skills with DevOps Engineer. Sure, DevOps engineers should have some knowledge about testing but usually, it seems their solid skills/background is mainly composed out of system internals and coding skills.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What to expect from a DevOps interview?
&lt;/h3&gt;

&lt;p&gt;DevOps interviews can be very different. Some will include design questions, some will focus on coding, others will include short technical questions and you might even have an interview where the interviewer only goes over your resume and discussing your past experience.&lt;/p&gt;

&lt;p&gt;There are a couple of things you can do about it so it will be a less overwhelming experience:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can and probably should ask the HR (in some cases even the team lead) how the interview process looks like. Some will be kind enough to even tell you how to prepare.&lt;/li&gt;
&lt;li&gt;Usually, the job posting gives more than a hint on where the focus will be and what you should focus on in your preparations so read it carefully.&lt;/li&gt;
&lt;li&gt;There are plenty of sites that have notes or a summary of the interview process in different companies, especially big enterprises.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Don't forget to be an interviewer as well
&lt;/h3&gt;

&lt;p&gt;Some people tend to look at interviews as a one-way road of "Determining whether a candidate is qualified" but in reality, a candidate should also determine whether&lt;br&gt;
the company he/she is interviewing at, is the right place for him/her.            &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do I care about team size? More specifically, do I care about being a one-man show or being part of a bigger team?&lt;/li&gt;
&lt;li&gt;Do I care about work-life balance?
&lt;/li&gt;
&lt;li&gt;Do I care about personal growth and how it's practically done?
&lt;/li&gt;
&lt;li&gt;Do I care about knowing what are my responsibilities as part of the role?
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you do, you should also play the interviewer role :)&lt;/p&gt;

&lt;h3&gt;
  
  
  One Last Thing
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://youtu.be/Xz-UvQYAmbg?t=29"&gt;Good luck&lt;/a&gt; :)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>career</category>
      <category>linux</category>
    </item>
    <item>
      <title>5 Open Source Projects That Will Make You Smile</title>
      <dc:creator>Arie Bregman</dc:creator>
      <pubDate>Thu, 28 Nov 2019 22:50:02 +0000</pubDate>
      <link>https://dev.to/abregman/5-funny-open-source-projects-5c5k</link>
      <guid>https://dev.to/abregman/5-funny-open-source-projects-5c5k</guid>
      <description>&lt;h2&gt;
  
  
  Volkswagen CI
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/auchenberg/volkswagen"&gt;volkswagen&lt;/a&gt; - "Volkswagen detects when your tests are being run in a CI server, and makes them pass."&lt;/p&gt;

&lt;p&gt;Remember the Volkswagen emissions scandal back in 2015? You know, the one where Volkswagen had software in their diesel engines that could detect when they were being tested and change the performance accordingly to improve results.&lt;br&gt;
Shortly after the scandal, some developers thought it will be funny to have an open source project with a similar idea of "let's just fake good results whenever running tests" and the &lt;a href="https://github.com/auchenberg/volkswagen"&gt;volkswagen&lt;/a&gt; project is the outcome.&lt;/p&gt;

&lt;p&gt;As you know, CI is the practice of testing and integrating your code often. When submitting a code that breaks your service, the CI pipeline will prevent it from being merged. That's a real bummer for people who write bad code. But fear no more, installing the Volkswagen project on the CI server will make the CI always pass, just like the software Volkswagen installed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/oVaFojz2xefoIONASs/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/oVaFojz2xefoIONASs/giphy.gif" alt="" width="480" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bash Insulter
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/hkbakke/bash-insulter"&gt;bash-instuler&lt;/a&gt; - "Insults the user when typing wrong command"&lt;/p&gt;

&lt;p&gt;If you ever used the command line you know that doing mistakes is inevitable. At some point, you will either misspell some words or miss some characters. But that's fine, right? well not according to the bash-insulter project.&lt;/p&gt;

&lt;p&gt;This project insults the user whenever he/she types a wrong command. Some of the insults are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"This is why nobody likes you"&lt;/li&gt;
&lt;li&gt;"So, I'm just going to go ahead and run rm -rf / for you."&lt;/li&gt;
&lt;li&gt;"This is not a search engine."&lt;/li&gt;
&lt;li&gt;"This is why you get to see your children only once a month." (this is where it escalates too quickly in my opinion)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full list of insults that were contributed by multiple contributors can be found &lt;a href="https://github.com/hkbakke/bash-insulter/blob/master/src/bash.command-not-found#L6"&gt;here&lt;/a&gt;. It's always heartwarming to see how the community works together to make the world a better place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanos JS
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/anandundavia/thanos-js"&gt;thanos-js&lt;/a&gt; - "A casual (but dangerous) package that will let Thanos snap fingers and delete random files inside a directory"&lt;/p&gt;

&lt;p&gt;Whether you are a Marvel fan or not, you probably have watched the Avengers movies or at least heard about them. In the last two Avengers movies, the main villain is a purple being called Thanos. And Thanos is a true believer in balance. He believes that overpopulation can, and should, be fixed by wiping out half of the galaxy population.&lt;br&gt;
Whether he manages to do that or not is something I will not reveal here, to not spoil the ending to anyone (although it's a Marvel Disney movie, what do you think happened?...)&lt;/p&gt;

&lt;p&gt;Anyway, Thanos was a true hero for many people and a great inspiration. This inspiration led to great (and very useless) projects like &lt;a href="https://github.com/anandundavia/thanos-js"&gt;thanos-js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;thanos-js will remove exactly half of the files on your computer. Each file is given a chance to be part of the 50% removed files or the 50% lucky untouched files. Eventually, you'll have a perfectly balanced system, like all systems should be. Assuming it will still run...&lt;/p&gt;

&lt;h2&gt;
  
  
  Bullshit.js
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mourner/bullshit.js"&gt;bullshit.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't let the name of the project to fool you. This project is no bullshit. It has a mission-critical purpose of translating marketing-speak into human-readable text. In this case, a demo worth thousands of words: &lt;a href="https://mourner.github.io/bullshit.js"&gt;https://mourner.github.io/bullshit.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/xThtalMViID4iGemWI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/xThtalMViID4iGemWI/giphy.gif" alt="" width="480" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pizza-Dough
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/hendricius/pizza-dough"&gt;pizza-dough&lt;/a&gt; - "This recipe is dedicated to helping you make the best possible pizza dough for Neapolitan pizza"&lt;/p&gt;

&lt;p&gt;The pizza-dough is actually a very serious project. I mean, just show me a more scientific, serious and accurate source for making pizza dough. And that's also exactly why it's amusing. Who would imagine that through the effort of pull requests and issues, we'll get possibly the best pizza recipe to date.&lt;br&gt;
It seems like open source recipes are the next big thing (and remember where you first read it).&lt;/p&gt;

&lt;p&gt;It's also good that GitHub now preserves open source code in an Arctic vault. Humanity will need this Pizza dough recipe in the post-apocalyptic era.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/lrAG3NWoiwhYk/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/lrAG3NWoiwhYk/giphy.gif" alt="" width="245" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  More open source projects that will make us smile :)
&lt;/h2&gt;

&lt;p&gt;That's it. I hope you enjoyed this post. Very different from what I'm usually writing about, but for me, it was fun :)&lt;br&gt;
If you know about other open source projects that will make us smile, let us know in the comments.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>funny</category>
      <category>linux</category>
      <category>pizza</category>
    </item>
    <item>
      <title>Collection of Linux Resources</title>
      <dc:creator>Arie Bregman</dc:creator>
      <pubDate>Tue, 26 Nov 2019 16:00:04 +0000</pubDate>
      <link>https://dev.to/abregman/collection-of-linux-resources-3nhk</link>
      <guid>https://dev.to/abregman/collection-of-linux-resources-3nhk</guid>
      <description>&lt;p&gt;Below, you'll find a collection of Linux resources categorized into resource types - videos, books, sites, etc. I hope it will serve you well in your journey of becoming a Linux Master ;)&lt;/p&gt;

&lt;p&gt;For the most updated version of this page, please visit &lt;a href="http://devopsbit.com/resources/linux"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn Linux Sites for Beginners
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://linuxjourney.com"&gt;Linux Journey&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Guides ordered by topic with exercises&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.tecmint.com/free-online-linux-learning-guide-for-beginners"&gt;Techmint Linux&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;written articles/lessons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://linuxsurvival.com/linux-tutorial-introduction"&gt;Linux Survival&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Interactive guide&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://linuxcommand.org"&gt;Linuxcommand&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Learn the ways of the command line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://ryanstutorials.net/linuxtutorial"&gt;Ryanstutorials&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;written guides for beginners&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://vim-adventures.com"&gt;Vim Adventures&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Learn how to use Vim by playing a game&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://lym.readthedocs.io/en/latest"&gt;LYM&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Focuses on the command line. While it's great, I wouldn't start from it&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Linux Videos
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Video&lt;/th&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=wBp0Rb-ZJak&amp;amp;t=6578s"&gt;The Complete Linux Course: Beginner to Power User!&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Beginner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.learnlinux.tv"&gt;learnlinux.tv&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;All&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=bju_FdCo42w&amp;amp;list=PLtK75qxsQaMLZSo7KL-PmiRarU7hrpnwK"&gt;The Linux Basics Course&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Beginner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=wBp0Rb-ZJak"&gt;The Complete Linux Course: Beginner to Power User!&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Beginner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=HIXzJ3Rz9po"&gt;Learning the Linux File System&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Beginner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=NodKFuUocQY"&gt;Linux Hands On: The Advanced Terminal Commands&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Beginner...name is misleading&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=l0QGLMwR-lY&amp;amp;t=812s"&gt;10 Linux Interview Questions&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Beginner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=xHu7qI1gDPA&amp;amp;list=PLX1h5Ah4_XcfL2NCX9Tw4Hm9RcHhC14vs"&gt;Unix System Calls&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Advanced&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Blogs &amp;amp; News sites
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Comments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.phoronix.com"&gt;Phoronix&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;News&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://cyberciti.biz"&gt;nixCraft&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Blog, Linux Tips, Hacks, Tutorials&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://www.thegeekstuff.com"&gt;thegeekstuff&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Blog on Linux, Open Source and other topics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://www.brendangregg.com/overview.html"&gt;Brendangregg&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Blog which focuses on Linux Performances&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.redhat.com/sysadmin"&gt;Enable Sysadmin&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Red Hat blog which focuses on Linux System Administration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Linux Books
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;Comments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://linuxcommand.org/tlcl.php"&gt;The Linux Command Line&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Free. Great for learning the command line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.wiley.com/en-us/Linux+Bible%2C+9th+Edition-p-9781118999875"&gt;Linux Bible&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free, covers many beginner and advanced topics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.amazon.com/Practical-Commands-Editors-Programming-ebook/dp/B002ZM6KDM"&gt;A Practical Guide to Linux Commands, Editors, and Shell Programming&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free. Focusing on practical learning with many examples&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://www.ubuntupocketguide.com/index_main.html"&gt;Ubuntu Pocket Guide and Reference&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;There is a free version&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.amazon.com/Linux-Bible-Christopher-Negus/dp/1118999878/ref=sr_1_1?keywords=linux+bible&amp;amp;qid=1574779258&amp;amp;sr=8-1"&gt;Linux Bible&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free. Covers many beginner and also advanced topics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://linux-training.be"&gt;linux-training.be&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Free. Little bit outdated (2015)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.amazon.com/Modern-Operating-Systems-Andrew-Tanenbaum/dp/013359162X/ref=sr_1_1?keywords=Modern+Operating+Systems&amp;amp;qid=1574779749&amp;amp;sr=8-1"&gt;Modern Operating Systems&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free. Covers advanced topics. Deep dive into Linux Internals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.amazon.com/Understanding-Linux-Kernel-Third-Daniel/dp/0596005652/ref=sr_1_1?keywords=Understanding-Linux-Kernel&amp;amp;qid=1574780622&amp;amp;sr=8-1"&gt;Understanding the Linux Kernel&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free. Advanced. Deep dive into Linux kernel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://pages.cs.wisc.edu/~remzi/OSTEP"&gt;Operating Systems: Three Easy Pieces&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Great book on Operating System internals&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;Comments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://man7.org/linux/man-pages"&gt;Man pages&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The online version of &lt;code&gt;man&lt;/code&gt; command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://tldp.org"&gt;The Linux Documentation Project&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;pure greatness&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Linux Development Books
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;Comments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.amazon.com/Debugging-GDB-GNU-Source-Level-Debugger/dp/1680921436/ref=sr_1_1?keywords=Debugging+with+GDB&amp;amp;qid=1574779408&amp;amp;sr=8-1"&gt;Debugging with GDB: The GNU Source-Level Debugger&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.amazon.com/Unix-Network-Programming-Sockets-Networking/dp/0131411551/ref=sr_1_1?keywords=Unix+Network&amp;amp;qid=1574779572&amp;amp;sr=8-1"&gt;Unix Network Programming&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.amazon.com/Linux-Kernel-Development-Robert-Love/dp/0672329468/ref=as_li_ss_tl?keywords=linux+system+programming&amp;amp;qid=1571742142&amp;amp;sr=8-8&amp;amp;linkCode=sl1&amp;amp;tag=coderscat-20&amp;amp;linkId=04de37d03084c2135921c9f15e858ac1&amp;amp;language=en_US"&gt;Linux Kernel Development&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not Free&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Forums and Communities
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Comments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.linuxquestions.org"&gt;linuxquestions.org&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://unix.stackexchange.com"&gt;unix.stackexchange.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://askubuntu.com"&gt;askubuntu.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.reddit.com/r/linux"&gt;Reddit Linux&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.linux.org/forums"&gt;Linux.org&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.reddit.com/r/commandline"&gt;Reddit Commandline&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not exclusive to Linux command line&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Online Courses (Not Free)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://linuxacademy.com"&gt;Linux Academy&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;great courses. pay yearly or monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.udemy.com"&gt;Udemy&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;payment per course&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Random
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Comments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.kernel.org"&gt;Kernel.org&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Linux Kernel archives&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.gamingonlinux.com"&gt;GamingOnLinux&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Gaming on Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://distrowatch.com"&gt;DistroWatch&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Discussions and reviews of Linux distributions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://distrotest.net"&gt;DistroTest&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Test a distro online before actually using it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://www.linuxfromscratch.org"&gt;Linux From Scratch&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;For crazy people who would like to build a custom Linux :)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.kalitutorials.net"&gt;KaliTutorials&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;shhh...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://explainshell.com"&gt;explainshell&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;write down a command-line to see the help text that matches each argument&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://en.wikipedia.org/wiki/Unix_philosophy"&gt;Unix Philosophy&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Name says it all...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.commandlinefu.com/commands/browse"&gt;CommandlineFu&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Great command-line gems&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>books</category>
      <category>collection</category>
    </item>
    <item>
      <title>Linux Checklist for Beginners</title>
      <dc:creator>Arie Bregman</dc:creator>
      <pubDate>Sat, 16 Nov 2019 00:04:16 +0000</pubDate>
      <link>https://dev.to/abregman/linux-checklist-for-beginners-32al</link>
      <guid>https://dev.to/abregman/linux-checklist-for-beginners-32al</guid>
      <description>&lt;h3&gt;
  
  
  File System Hierarchy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;/&lt;/code&gt; (aka root)&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/bin&lt;/code&gt; and &lt;code&gt;/sbin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/opt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/usr&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/var&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/home&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/etc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/proc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[ ] &lt;code&gt;/tmp&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;[ ] Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] What is '/'?&lt;/li&gt;
&lt;li&gt;[ ] What is stored in '/bin'? what about &lt;code&gt;/etc&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;[ ] What '/home' is usually used for?&lt;/li&gt;
&lt;li&gt;[ ] What type of files can you find in '/var'?&lt;/li&gt;
&lt;li&gt;[ ] What is unique about &lt;code&gt;/tmp&lt;/code&gt;?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Navigation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Commands

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;pwd&lt;/code&gt; - where am I?&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;cd&lt;/code&gt; - change directory&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[ ] relative vs. absolute paths&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] How to check your current path?&lt;/li&gt;
&lt;li&gt;[ ] Where &lt;code&gt;cd ..&lt;/code&gt; will take you?&lt;/li&gt;
&lt;li&gt;[ ] What would be the effect of running &lt;code&gt;cd .&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;[ ] What will happen when running 'cd -'?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Files
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;[ ] Types of files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Regular&lt;/li&gt;
&lt;li&gt;[ ] Directory&lt;/li&gt;
&lt;li&gt;[ ] Socket&lt;/li&gt;
&lt;li&gt;[ ] Character Device&lt;/li&gt;
&lt;li&gt;[ ] Block Device&lt;/li&gt;
&lt;li&gt;[ ] Link&lt;/li&gt;
&lt;li&gt;[ ] Named Pipe&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;ls&lt;/code&gt; - list files and directories&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-a&lt;/code&gt; for listing hidden files&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-l&lt;/code&gt; for list formt&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-t&lt;/code&gt; order by time&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-F&lt;/code&gt; better distinguish between regular files and directories&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;touch&lt;/code&gt; - creating files (original intention is updating timestamp)&lt;/li&gt;
&lt;li&gt;[ ] nice to know: &lt;code&gt;touch file{1..5}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;rm&lt;/code&gt; - remove files&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-r&lt;/code&gt; for recursive&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-f&lt;/code&gt; to force removal, no questions asked&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;mkdir&lt;/code&gt; - create directories&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-p&lt;/code&gt; - for creating multiple nested directories&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;rmdir&lt;/code&gt; - remove directories&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;cat&lt;/code&gt; - concatenate files (common usage: read a file)&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;mv&lt;/code&gt; - move files directories (also rename files and directories)&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;cp&lt;/code&gt; - copy a file&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-r&lt;/code&gt; for recursive (copy a directory)&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;less&lt;/code&gt; - display files on a page-by-page basis&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] How to list hidden files?&lt;/li&gt;
&lt;li&gt;[ ] How to create an empty new file?&lt;/li&gt;
&lt;li&gt;[ ] How to remove a directory?&lt;/li&gt;
&lt;li&gt;[ ] How to rename a file?&lt;/li&gt;
&lt;li&gt;[ ] How to copy an entire directory with all its files?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pattern Matching
&lt;/h3&gt;

&lt;p&gt;This also known as File Globbing&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Patterns

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;*&lt;/code&gt; - matches zero or more of any character&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;?&lt;/code&gt; - matches one of any character&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;man&lt;/code&gt; - manual for commands&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;which&lt;/code&gt; - get full path for given command&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;whatis&lt;/code&gt; - one-line manual page descriptions&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;history&lt;/code&gt; - command history list

&lt;ul&gt;
&lt;li&gt;[ ] use ![number line] to execute a command from the list&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Random
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;[ ] Terminal&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;clear&lt;/code&gt; - clear the terminal screen (ctrl+l can be also used)&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ctrl+r&lt;/code&gt;- history search of commands&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;exit&lt;/code&gt; (or &lt;code&gt;logout&lt;/code&gt;) - terminate a process, quit the shell&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;echo&lt;/code&gt; - display a line of text&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;alias&lt;/code&gt; - define or display command shortcuts/aliases&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;wc&lt;/code&gt; - count lines, words, ...&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Distributions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Fedora&lt;/li&gt;
&lt;li&gt;[ ] Ubuntu&lt;/li&gt;
&lt;li&gt;[ ] RHEL, CentOS&lt;/li&gt;
&lt;li&gt;[ ] Mint&lt;/li&gt;
&lt;li&gt;[ ] Debian&lt;/li&gt;
&lt;li&gt;[ ] Arch Linux&lt;/li&gt;
&lt;li&gt;[ ] openSUSE&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  I/O redirection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] File Descriptor

&lt;ul&gt;
&lt;li&gt;[ ] stdin 0 (standard input) &amp;lt;&lt;/li&gt;
&lt;li&gt;[ ] stdout 1 (standard output) &amp;gt;&lt;/li&gt;
&lt;li&gt;[ ] stderr 2 (standard error) 2&amp;gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[ ] Append &amp;gt;&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Pipe&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] For example: &lt;code&gt;cat file | wc -l&lt;/code&gt; to count number of lines&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] &lt;code&gt;tee&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Writing output to two different streams&lt;/li&gt;
&lt;li&gt;[ ] Test&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[ ] How to redirect output?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[ ] What would be the result of the following command &lt;code&gt;blop 2&amp;gt; file&lt;/code&gt;?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Text Editor
&lt;/h3&gt;

&lt;p&gt;Learning how to use one of them is more than enough&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] vim

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;i&lt;/code&gt; to start typing&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;:wq&lt;/code&gt; to exit (or &lt;code&gt;shit+zz&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;[ ] nano&lt;/li&gt;
&lt;li&gt;[ ] emacs&lt;/li&gt;
&lt;li&gt;[ ] atom&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[ ] sublime&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Test (mainly for vim)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] How to remove an entire line?&lt;/li&gt;
&lt;li&gt;[ ] How to copy 5 lines?&lt;/li&gt;
&lt;li&gt;[ ] How to jump to the end of the line&lt;/li&gt;
&lt;li&gt;[ ] How to remove one word&lt;/li&gt;
&lt;li&gt;[ ] How to jump to the end of the file&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Users
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;[ ] Types of users&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] regular&lt;/li&gt;
&lt;li&gt;[ ] root&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;useradd&lt;/code&gt; - add users&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;usermod&lt;/code&gt; - modify users&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;userdel&lt;/code&gt; - delete users&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;who&lt;/code&gt; - show who is logged on&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;lastlog&lt;/code&gt; - recent login of users&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;/etc/passwd&lt;/code&gt; - stores users information&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/etc/shadow&lt;/code&gt; - passwords&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] how to add a new user?&lt;/li&gt;
&lt;li&gt;[ ] should you be using your user or root?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Network
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;[ ] Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;ping&lt;/code&gt; - test the reachability of a host&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-c&lt;/code&gt; for number of packets&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip&lt;/code&gt; - manage routing, network devices, interfaces and tunnels&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip a&lt;/code&gt; for interfaces &lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip r&lt;/code&gt; for routing&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip neigh&lt;/code&gt; for any ARP related operation&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ethtool&lt;/code&gt; - query and manipulate driver and hardware settings&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-p&lt;/code&gt; for interface led blinking&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-t&lt;/code&gt; for running tests to check your network interface&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-S&lt;/code&gt; for getting statistics&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;arp&lt;/code&gt;- manipulate the system ARP cache&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;dhclient&lt;/code&gt;- DHCP client&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;netstat&lt;/code&gt; - display network connections&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-n&lt;/code&gt; for IP addresses instead of hostnames&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-t&lt;/code&gt; to show only TCP connections&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-p&lt;/code&gt; to show the PID of the program&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-l&lt;/code&gt; to show only listening sockets&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;lsof&lt;/code&gt; - list open files&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-i&lt;/code&gt; for sockets&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;traceroute&lt;/code&gt; - print the route packets trace to network host&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;mtr&lt;/code&gt; - network diagnostic tool (traceroute + ping)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;/proc/net/dev&lt;/code&gt; - network interfaces list&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/pro/net/arp&lt;/code&gt; - ARP table&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/etc/sysconfig/network-scripts/*&lt;/code&gt; - network configuration files in RHEL based OSs &lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/etc/network/interfaces&lt;/code&gt; - network configuration files in Ubuntu&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Types of interfaces&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Regular&lt;/li&gt;
&lt;li&gt;[ ] Dummy&lt;/li&gt;
&lt;li&gt;[ ] Virtual IP&lt;/li&gt;
&lt;li&gt;[ ] Veth&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Bonding&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Modes&lt;/li&gt;
&lt;li&gt;[ ] How to activate&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Network Namespaces&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;ip netns&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip netns add&lt;/code&gt; for adding namespaces&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip netns list&lt;/code&gt; for listing namespaces&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip netns del&lt;/code&gt; for removing namespaces&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;ip netns exec&lt;/code&gt; for executing commands inside a network namespace&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Network Kernel Parameters&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;sysctl net.*&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/proc/sys/net/*&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Packet Sniffers (one is enough)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;tcpdump&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;wireshark&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;dhcpdump&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;httpry&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] How to list the interfaces in your system?&lt;/li&gt;
&lt;li&gt;[ ] How to display the routing table?&lt;/li&gt;
&lt;li&gt;[ ] How to change the MTU of an interface?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Debugging &amp;amp; Troubleshooting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;[ ] CPU and Memory&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;top&lt;/code&gt; - processes memory and cpu consumption&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;free&lt;/code&gt; - amount of free and used memory&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;-g&lt;/code&gt; for the amount of memory in gigabytes&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;vmstat&lt;/code&gt; - virtual memory statistics&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;htop&lt;/code&gt; - interactive process viewer&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;atop&lt;/code&gt; - system and process monitor&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/proc/meminfo&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Network Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;netstat&lt;/code&gt; - network connections&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;traceroute&lt;/code&gt; - network connections&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;IPTraf&lt;/code&gt; - IP LAN monitoring&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;iftop&lt;/code&gt; - network bandwidth monitoring&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Disk and Filesystem&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;iotop&lt;/code&gt; - I/O monitor&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;iostat&lt;/code&gt; - I/O statistics for devices and partitions&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Processes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;[ ] States&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Running&lt;/li&gt;
&lt;li&gt;[ ] Waiting&lt;/li&gt;
&lt;li&gt;[ ] Stopped&lt;/li&gt;
&lt;li&gt;[ ] Zombie&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;/proc/[PID]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Running in the background&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] For example: &lt;code&gt;my_program &amp;amp;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Archives
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;[ ] Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] tar&lt;/li&gt;
&lt;li&gt;[ ] gzip&lt;/li&gt;
&lt;li&gt;[ ] zip&lt;/li&gt;
&lt;li&gt;[ ] unzip&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] How to create an archive?&lt;/li&gt;
&lt;li&gt;[ ] How to extract the content of an archive?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Files - Part 2
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Commands

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;find&lt;/code&gt; - search for files&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;sort&lt;/code&gt; - sort, merge, or sequence check text files&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;sort&lt;/code&gt; - sort, merge, or sequence check text files&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Storage &amp;amp; Filesystem
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;[ ] inode&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;[ ] Links&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] soft link&lt;/li&gt;
&lt;li&gt;[ ] hard link&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;file&lt;/code&gt; - determine file type&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;stat&lt;/code&gt; - file or file system status&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] LVM&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] pv&lt;/li&gt;
&lt;li&gt;[ ] vg&lt;/li&gt;
&lt;li&gt;[ ] lv&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;[ ] Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Can you create soft links between different file systems? what about hard links?&lt;/li&gt;
&lt;li&gt;[ ] What information inode stores?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hardware
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Commands

&lt;ul&gt;
&lt;li&gt;[ ] &lt;code&gt;lshw&lt;/code&gt; - list hardware&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;lspci&lt;/code&gt; - list all PCI devices&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;dmidecode&lt;/code&gt; - DMI table decoder&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For latest updated checklist visit &lt;a href="https://devopsbit.com/linux/linux-checklist"&gt;DevOpsBit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>checklist</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Getting started with Pipenv</title>
      <dc:creator>Arie Bregman</dc:creator>
      <pubDate>Thu, 14 Nov 2019 15:20:36 +0000</pubDate>
      <link>https://dev.to/abregman/getting-started-with-pipenv-15kl</link>
      <guid>https://dev.to/abregman/getting-started-with-pipenv-15kl</guid>
      <description>&lt;h2&gt;
  
  
  Whas is Pipenv?
&lt;/h2&gt;

&lt;p&gt;A package management tool which makes combined use of&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pip – Python package manager&lt;/li&gt;
&lt;li&gt;virtualenv – used for creating isolated Python environments so you can easily use different packages in different projects&lt;/li&gt;
&lt;li&gt;Pipefile – records the package versions used in a given project so you can easily install them on any other system you want. Also considered as the replacement of Python requirements files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So basically with one short pipenv command you can install a package in a virtual environment and record it in pipfile and pipefile.lock files. Think of pipenv as next gen package management tool that should save you time and also provide you with new shiny utilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why using Pipenv?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One tool to rule them all – as stated a second ago, no need to use pip and virtualenv separately. You will benefit from all the tools I just mentioned, by using one simple command.&lt;/li&gt;
&lt;li&gt;Provides you with many great utilities like creating a graph of your dependency tree, checking for security vulnerabilities and even assists you with creating issues on Github when bumping into a problem (more on that later on).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, pipenv feels like the proper way to manage packages and dependencies in your Python projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not using Pipenv?
&lt;/h2&gt;

&lt;p&gt;It probably seems unusual to have a “why not” section in a tutorial post but I prefer you’ll know the full truth on pipenv rather than getting the feeling it's ultimate package management tool.&lt;/p&gt;

&lt;p&gt;Pipenv is not a free-from-bugs tool (like any other software) but in my short experience with it, I have bumped into numerous problems. Sometimes it’s the price you have to pay when switching to newer technology but some will say it’s too buggy to use at this point. Personally, I think you should still give it a try but don't expect a smooth experience.&lt;br&gt;
It also has controversial behaviors that you might not like. This &lt;a href="https://github.com/pypa/pipenv/issues/2910#event-2048173851"&gt;issue&lt;/a&gt; describes how pipenv ignores user chosen shell and spawns sh instead (I can confirm it as I’m experiencing the same).&lt;/p&gt;

&lt;p&gt;Nonetheless, I'm still using it and before you choose whether to use it or not, it’s best to give it a try so let's see how to use it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Install pipenv
&lt;/h2&gt;

&lt;p&gt;This step depends on which operating system you are using. If you are using Fedora like me (ore CentOS/RHEL) run the following&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dnf install pipenv -y
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Hello Pipenv
&lt;/h2&gt;

&lt;p&gt;Let’s start using pipenv by installing a requirement. I'm going to install flask, you can install whatever you are using for your projects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pipenv install flask
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This short command will result in:&lt;/p&gt;

&lt;p&gt;Creating a new virtual environment automatically&lt;br&gt;
Creating a new Pipfile &amp;amp; Pipfile.lock files&lt;br&gt;
Installing flask&lt;/p&gt;

&lt;p&gt;Pretty nice, no?&lt;/p&gt;
&lt;h2&gt;
  
  
  Pipfile
&lt;/h2&gt;

&lt;p&gt;Once the package is installed, you’ll notice pipenv has created a file called ‘Pipfile’ (and ‘Pipfile.lock'). This file basically records all the packages you installed in your virtual environment so when you want to send someone the project, or install it in another environment you can easily do so by using the Pipfile file.&lt;/p&gt;

&lt;p&gt;Let’s see how a Pipfile file looks like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[source]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

flask = “*”

[dev-packages]

[requires]

python_version = “3.7”
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;First part, &lt;code&gt;source&lt;/code&gt;, is pretty standard and fixed for probably most of the projects. It specifies the source for the different packages. In our case, PyPi. The largest (and official) source for Python packages.&lt;/p&gt;

&lt;p&gt;Next one is &lt;code&gt;packages&lt;/code&gt; section which specifies the packages you installed in the virtual environment. An asterisk means no specific version was given. If you installed a specific version of flask, you’d see there a number/version instead of an asterisk.&lt;/p&gt;

&lt;p&gt;The last section is ‘requires’ where you can specify which Python version your application should be using. In our case we can see Python 3.7 was used while installing flask.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pipfile.lock
&lt;/h2&gt;

&lt;p&gt;At first glance, Pipfile.lock might look similar in its content to the Pipfile file. It also specifies the packages mentioned in Pipfile and their versions but one major difference is that it includes the download hashes.&lt;/p&gt;

&lt;p&gt;It includes download hashes since the purpose of this file is to provide deterministic builds, meaning it includes all dependencies and download hashes so you can easily reproduce builds with the exact packages that were used originally when you developed the project.&lt;/p&gt;

&lt;p&gt;Note that you can and probably should manage both Pipfile and Pipfile.lock with version control. Similarly to how you are managing requirements files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Work within the virtualenv
&lt;/h2&gt;

&lt;p&gt;So far you created a new virtaulenv with pipenv and installed requirements into it but you didn’t actually activate it. So any command you’ll execute (which is not pipenv) will run outside the virtualenv pipenv created for you.&lt;/p&gt;

&lt;p&gt;In order to switch to the virtualenv created by pipenv run the following command&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pipenv shell&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;This will basically spawns a shell inside the virtualenv created by pipenv.&lt;/p&gt;

&lt;p&gt;If don’t want to spawn a shell but simply execute one or more specific commands, you can use&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;pipenv run &amp;lt;command&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and it will run the command inside the virtualenv pipenv created.&lt;/p&gt;
&lt;h2&gt;
  
  
  Removing virtual environment
&lt;/h2&gt;

&lt;p&gt;If you want to remove your virtualenv you can do it with&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;pipenv --rm command&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Don’t worry about Pipfile files. It will not remove them which means you can instantly recreate the environment you used before removing the virtual environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install local packages
&lt;/h2&gt;

&lt;p&gt;You might be working on a project, locally on your computer and at some point, you would like to install it in your virtualenv and see how it works. It’s possible by using the following command&lt;/p&gt;

&lt;p&gt;pipenv install -e .&lt;br&gt;
It’s equivalent to pip install . which used for the same purpose of local project installations.&lt;/p&gt;

&lt;p&gt;Note it will update your Pipfile content with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;project_name&amp;gt; = {editable = true, path = "."}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Update Pipfile.lock
&lt;/h2&gt;

&lt;p&gt;It’s possible you’ll make changes in your environment not using pipenv. After all, it takes time to get used to new tools. In case it happens, you can still update your Pipfile.lock accordingly with pipenv lock&lt;/p&gt;

&lt;p&gt;This will update your pipfile.lock to reflect the packages used in your virtualenv. If the file doesn’t exist, it will generate it from scratch, allowing you, or anyone using your project, to run deterministic builds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pipenv issues
&lt;/h2&gt;

&lt;p&gt;As I wrote at the beginning of the post, there is a high probability you’ll bump into some issue with pipenv while trying it out. Fortunately, pipenv developers made it quite easy to collect information on your environment with the --supprt flag. Some of the information it collects is:&lt;/p&gt;

&lt;p&gt;Python version&lt;br&gt;
PEP 508 information (dependency specification)&lt;br&gt;
System environment variables&lt;br&gt;
The content of Pipfile and Pipfile.lock files&lt;br&gt;
You can then easily copy the output you get from running pipenv --support and paste into a GitHub issue which describes your problem.&lt;/p&gt;

&lt;p&gt;I like this approach as it saves time for both users and project maintainers since a user doesn’t need to guess which information would be useful for the maintainers and the maintainers are used to process the same format with every issue.&lt;/p&gt;

&lt;h3&gt;
  
  
  More content
&lt;/h3&gt;

&lt;p&gt;If you liked this post, perhaps you would like other posts I'm publishing on &lt;a href="//devopsbit.com"&gt;DevOpsBit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pipenv</category>
      <category>python</category>
      <category>packages</category>
    </item>
    <item>
      <title>10 Ansible Interview Questions</title>
      <dc:creator>Arie Bregman</dc:creator>
      <pubDate>Wed, 13 Nov 2019 20:07:38 +0000</pubDate>
      <link>https://dev.to/abregman/10-ansible-interview-questions-38j2</link>
      <guid>https://dev.to/abregman/10-ansible-interview-questions-38j2</guid>
      <description>&lt;h2&gt;
  
  
  Core Components
&lt;/h2&gt;

&lt;p&gt;Describe each of the following components in Ansible, including the relationship between them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Task&lt;/li&gt;
&lt;li&gt;Module&lt;/li&gt;
&lt;li&gt;Play&lt;/li&gt;
&lt;li&gt;Playbook&lt;/li&gt;
&lt;li&gt;Role&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;Task – a call to a specific Ansible module&lt;br&gt;
Module – the actual unit of code executed by Ansible on your own host or a remote host. Modules are indexed by category (database, file, network, …) and also referred to as task plugins.&lt;/p&gt;

&lt;p&gt;Play – One or more tasks executed on a given host(s)&lt;/p&gt;

&lt;p&gt;Playbook – One or more plays. Each play can be executed on the same or different hosts&lt;/p&gt;

&lt;p&gt;Role – Ansible roles allows you to group resources based on certain functionality/service such that they can be easily reused. In a role, you have directories for variables, defaults, files, templates, handlers, tasks, and metadata. You can then use the role by simply specifying it in your playbook.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdevopsbit.com%2Fassets%2Fimages%2Fblog%2Fansible%2Fcomponents.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdevopsbit.com%2Fassets%2Fimages%2Fblog%2Fansible%2Fcomponents.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Simple Task
&lt;/h2&gt;

&lt;p&gt;Write a task to create the directory ‘/tmp/new_directory’&lt;/p&gt;
&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;A very basic question, but indicates how you work with Ansible. Many will answer this question by using the shell or command modules. It doesn’t necessarily bad, but the best practice is always to use an explicit Ansible module (in our case, the ‘file’ module).&lt;/p&gt;

&lt;p&gt;Why? Mainly due to readability. Some actions execute differently on different operating systems, but the module use is always the same and any Ansible user will know what you meant when reading the task (especially if it’s a long shell command).&lt;/p&gt;

&lt;p&gt;Note: it doesn’t necessarily mean that modules are faster than the command(s) you specified with ‘shell’ or ‘command’.&lt;/p&gt;

&lt;p&gt;The task of creating the directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Create a new directory&lt;/span&gt;
  &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/tmp/new_directory"&lt;/span&gt;
      &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;directory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What is the result?
&lt;/h2&gt;

&lt;p&gt;What would be the result of the following play?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Print information about my host&lt;/span&gt;
  &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;localhost&lt;/span&gt;
  &lt;span class="na"&gt;gather_facts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;no'&lt;/span&gt;
  &lt;span class="na"&gt;tasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Print hostname&lt;/span&gt;
        &lt;span class="na"&gt;debug&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;msg&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;It's&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;me,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;ansible_hostname&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;When given a written code, always inspect it thoroughly. If your answer is “this will fail” then you are right. We are using a fact (ansible_hostname), which is a gathered piece of information from the host we are running on. But in this case, we disabled facts gathering (gather_facts: no) so the variable would be undefined which will result in failure.&lt;/p&gt;

&lt;p&gt;The purpose of this question is to check if you know what is a fact but also whether you are paying attention to the small details.&lt;/p&gt;

&lt;p&gt;Similar/follow-up questions can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to list all facts available?&lt;/li&gt;
&lt;li&gt;How to set a fact of your own?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Write a playbook
&lt;/h2&gt;

&lt;p&gt;Write a playbook to install ‘zlib’ and ‘vim’ on all hosts if the file ‘/tmp/mario’ exists on the system&lt;/p&gt;

&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
  &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;mario_file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/tmp/mario&lt;/span&gt;
      &lt;span class="na"&gt;package_list&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;zlib'&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;vim'&lt;/span&gt;
  &lt;span class="na"&gt;tasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Check for mario file&lt;/span&gt;
        &lt;span class="na"&gt;stat&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;mario_file&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;
        &lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mario_f&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install zlib and vim if mario file exists&lt;/span&gt;
        &lt;span class="na"&gt;become&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;yes"&lt;/span&gt;
        &lt;span class="na"&gt;package&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;
            &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;present&lt;/span&gt;
        &lt;span class="na"&gt;with_items&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;package_list&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;
        &lt;span class="na"&gt;when&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mario_f.stat.exists&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To answer this question you have to be familiar with register, conditionals, and loops*.&lt;/p&gt;

&lt;p&gt;The first task uses the ‘stat’ module to check if the file exists on each system then captures the output in a variable called ‘mario_f’ using the ‘register’ term. You can then use the registered variable in any other task. In our case, we capture the stats of ‘/tmp/mario’ file and in the next task, we install the package list if the file exists.&lt;/p&gt;

&lt;p&gt;As you can see, for installing the packages we used the “with_items” loop which allow us to iterate over a list and perform the module/task per item in the list. Loops, as in any other language, is a fundamental part of Ansible and you should be aware of the different types of loops supported with Ansible.&lt;/p&gt;

&lt;p&gt;Another worth to mention line is ‘become: yes’ which allows us to run the task as root, but can be used with any user we will specify (e.g. become: ‘toad’). The task installing package list will fail unless this line is included since package installation can be done only with sudo permissions on the machine.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bonus: Some Ansible modules can receive a list as an argument. In our case, the loop process could have been removed completely by simply providing the package_list variable straight to the ‘package’ module.
Also, we could have removed the “stat” module completely by using the Ansible ‘with_fileglob’ loop, which iterates a list of files found by a regex.
To sum this up:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
  &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;package_list&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;zlib'&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;vim'&lt;/span&gt;
  &lt;span class="na"&gt;tasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install zlib and vim if mario file exists&lt;/span&gt;
        &lt;span class="na"&gt;become&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;yes"&lt;/span&gt;
        &lt;span class="na"&gt;package&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="s"&gt;name:"{{ package_list }}"&lt;/span&gt;
            &lt;span class="s"&gt;state&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s"&gt;present&lt;/span&gt;
        &lt;span class="na"&gt;with_fileglob&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tmp/mario'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using Templates
&lt;/h2&gt;

&lt;p&gt;Write a playbook to deploy the file ‘/tmp/system_info’ on all hosts except for controllers group, with the following content&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;I'm [HOSTNAME] and my operating system is [OS]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;replace [HOSTNAME] and  [OS] with the actual data for the specific host you are running on&lt;/p&gt;

&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;The playbook to deploy the system_info file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy /tmp/system_info file&lt;/span&gt;
  &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;all:!controllers&lt;/span&gt;
  &lt;span class="na"&gt;tasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy /tmp/system_info&lt;/span&gt;
        &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;system_info.j2&lt;/span&gt;
            &lt;span class="na"&gt;dest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/tmp/system_info&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The content of the system_info.j2 template&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I'm {{ ansible_hostname }} and my operating system is {{ ansible_distribution }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using a template will make your playbooks and roles much more dynamic and easily adjusted to different scenarios. Ansible uses a powerful templating engine called ‘Jinja2‘ to construct dynamic templates of files. Many popular projects and companies are using it (Flask, Mozilla, …) and we strongly recommend you take the time and learn using it as it will serve you well in the future.&lt;/p&gt;

&lt;p&gt;When writing jinja templates for Ansible it is considered best practice to add the variable ‘ansible_managed’ at the top of the template. This variable expands to a string letting whoever reads the output file that this file was generated by Ansible and managed by it.&lt;br&gt;
Next, we use ansible_hostname which is the unqualified name of the host and ansible_distribution which is the OS distro.&lt;/p&gt;

&lt;p&gt;Be aware that this question could be implemented in other ways. For example, instead of using ansible_hostname, someone could use inventory_hostname. They are not the same, but they both would fit fine in this case.&lt;/p&gt;
&lt;h2&gt;
  
  
  Testing Ansible based projects
&lt;/h2&gt;

&lt;p&gt;How do you test your Ansible based projects?&lt;/p&gt;
&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;When I ask this question in some interviews, I get many different answers. Let’s go over some of them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manual run: “I simply run it and check if the system is in the desired state” – Personally I don’t like this answer when provided solely. I could agree this is the easiest one (or laziest) but it potentially quite dangerous. Even if you tested your new written role in a development environment, it doesn’t mean you’ll get the same result in a production environment.&lt;/li&gt;
&lt;li&gt;Check mode – yes, check mode is a good way to test your Ansible code as it will report to you what it would have done if it would actually run without check mode. So you can easily see if the Ansible run behavior is meeting your expectations.
But the follow-up question here is “and what about scripts?”. Usually, the answer I get here is “what about them?” 🙂 that’s fine if you didn’t have to use scripts in your roles and playbooks, but if you did, you would know that check mode doesn’t run scripts and commands. To run them, you would have to disable check mode for specific tasks with “check_mode: no”.&lt;/li&gt;
&lt;li&gt;Asserts:  I like asserts as a method of testing as it also resembles how you test in other languages such as Python and more importantly, it makes sure that your system reached the desired state, not as a draft like in check mode, but as an actual verification that the task changed certain resource to the desired state.
To summarize, simply be confident when explaining your choice (also, it’s not realistic to expect someone to use them all, so don’t go this way 🙂 )&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Writing another playbook
&lt;/h2&gt;

&lt;p&gt;Write a playbook to install PostgreSQL on all servers in database group (assume Redhat) and update postgresql.conf with a configuration from the template postgresql.conf.j2 (assume it’s there, don’t write one).&lt;/p&gt;

&lt;p&gt;In addition, provide users with a way to run only the configuration update task (without installing the packages).&lt;/p&gt;
&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;There are two things you should not miss here: handlers and tags. Your playbook should look similar to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Installing PostgreSQL&lt;/span&gt;
  &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;databases&lt;/span&gt;
  &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;pg_packages&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;postgresql&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;postgresql-client&lt;/span&gt;
      &lt;span class="na"&gt;pg_service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgresql&lt;/span&gt;
      &lt;span class="na"&gt;pg_admin_user&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres&lt;/span&gt;
      &lt;span class="na"&gt;pg_admin_group&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres&lt;/span&gt;
      &lt;span class="na"&gt;pg_version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1981&lt;/span&gt;

  &lt;span class="na"&gt;tasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install PostgreSQL packages&lt;/span&gt;
        &lt;span class="na"&gt;become&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yes&lt;/span&gt;
        &lt;span class="na"&gt;yum&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;
            &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;latest&lt;/span&gt;
        &lt;span class="na"&gt;loop&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;pg_packages&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;
        &lt;span class="na"&gt;notify&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;start_postgresql&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update postgres.conf file&lt;/span&gt;
        &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres.conf.j2&lt;/span&gt;
            &lt;span class="na"&gt;dest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/etc/postgresql/{{ pg_version }}/postgresql.conf&lt;/span&gt;
            &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;pg_admin_user&lt;/span&gt; &lt;span class="pi"&gt;}}&lt;/span&gt;
            &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;pg_admin_group&lt;/span&gt; &lt;span class="pi"&gt;}}&lt;/span&gt;
            &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0644&lt;/span&gt;
        &lt;span class="na"&gt;become&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yes&lt;/span&gt;
        &lt;span class="na"&gt;notify&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;restart postgresql&lt;/span&gt;
        &lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;postgres_config&lt;/span&gt;

  &lt;span class="na"&gt;handlers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;start_postgresql&lt;/span&gt;
        &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;pg_service&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;
            &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;started&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;restart_postgresql&lt;/span&gt;
        &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;pg_service&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}"&lt;/span&gt;
            &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;restarted&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see I have put everything in the same file, but a better solution would be to create a role and put each section into its own directory (vars, handlers, tasks, …). We’ll have detailed question and answer on roles later on.&lt;/p&gt;

&lt;p&gt;The first thing to note here is handlers. Handlers allow us to trigger action (usually a task) upon a change. As you can see, the syntax is quite simple, using the keyword ‘notify’ we can provide a list of actions to execute. This makes a clear separation between what are the main tasks, required for installing and configuring PostgreSQL and what are the small “sub” actions required for the tasks to be complete.&lt;/p&gt;

&lt;p&gt;The second thing to note here is ‘tags’. This answers the second part of the question on how to allow users to run only the configuration update part. Imagine you have 100 tasks and you want only run a small portion of them, let’s say four tasks which responsible for updating your application. Without tags, you would have to run everything in your playbook, but tags allow you to run only those you marked with a specific tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variable precedence
&lt;/h2&gt;

&lt;p&gt;Let’s say you used the same variable name (whoami) in several places with different values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;role defaults -&amp;gt; whoami: mario&lt;/li&gt;
&lt;li&gt;extra vars (variables you pass to Ansible CLI with -e) -&amp;gt; whoami: toad&lt;/li&gt;
&lt;li&gt;host facts -&amp;gt; whoami: luigi&lt;/li&gt;
&lt;li&gt;inventory variables (doesn’t matter which type) -&amp;gt; whoami: browser&lt;/li&gt;
&lt;li&gt;Which one will be used eventually? Why?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;The right answer is ‘toad’.&lt;/p&gt;

&lt;p&gt;Variable precedence is about how variables override each other when they set in different locations. If you didn’t experience it so far I’m sure at some point you will, which makes it a useful topic to be aware of.&lt;/p&gt;

&lt;p&gt;In the context of our question, the order will be extra vars (always override any other variable) -&amp;gt; host facts -&amp;gt; inventory variables -&amp;gt; role defaults (the weakest).&lt;/p&gt;

&lt;p&gt;A full list can be found at the link above. Also, note there is a significant difference between Ansible 1.x and 2.x.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ansible Best Practices
&lt;/h2&gt;

&lt;p&gt;Which Ansible best practices are you familiar with? name at least three&lt;/p&gt;

&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When using several parameters it’s better to use the YAML dictionary format. I personally find it much more readable.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# BAD&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update postgres.conf file&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;src=postgres.conf.j2&lt;/span&gt;
            &lt;span class="s"&gt;dest=/etc/postgresql/{{ pg_version }}/postgresql.conf&lt;/span&gt;
            &lt;span class="s"&gt;owner={{ pg_admin_user }} group={{ pg_admin_group }}&lt;/span&gt;
            &lt;span class="s"&gt;mode=0644&lt;/span&gt;
&lt;span class="c1"&gt;# GOOD&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update postgres.conf file&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres.conf.j2&lt;/span&gt;
      &lt;span class="na"&gt;dest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/etc/postgresql/{{ pg_version }}/postgresql.conf&lt;/span&gt;
      &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;pg_admin_user&lt;/span&gt; &lt;span class="pi"&gt;}}&lt;/span&gt;
      &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;pg_admin_group&lt;/span&gt; &lt;span class="pi"&gt;}}&lt;/span&gt;
      &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0644&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;“Always Name Tasks”. It’s good to get used to name every task you add. Even the simple among them, like using the ‘debug’ module. The name of the task gives some indication as to what it does and why it was added. It can be a workaround a known bug or it can be a long and juicy command so the user reads/using your playbook will appreciate if you describe shortly what it does.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# BAD&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres.conf.j2&lt;/span&gt;
    &lt;span class="na"&gt;dest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/etc/postgresql/{{ pg_version }}/postgresql.conf&lt;/span&gt;

&lt;span class="c1"&gt;# GOOD&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update postgres.conf file&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres.conf.j2&lt;/span&gt;
      &lt;span class="na"&gt;dest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/etc/postgresql/{{ pg_version }}/postgresql.conf&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Any change to Ansible code should pass ansible-lint. This is another non-official best practice which is basically a best-practices checker.  This is why I consider it as one of the most important best practices to implement as it makes it easier to make sure other best practices are being followed, especially in a shared repository where you have several contributors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As already stated, not every mentioned best practice is an official one (= in Ansible docs) and that’s totally fine as long as you can explain why it’s a best practice (or more accurately a good practice).&lt;/p&gt;

&lt;h2&gt;
  
  
  Ad-Hoc
&lt;/h2&gt;

&lt;p&gt;Write an Ansible Ad-Hoc command to create the file ‘/tmp/info” on all hosts with the content: “The inventory file is in [inventory_file_path] and the inventory groups are [inventory_groups]”&lt;/p&gt;

&lt;p&gt;Note: you should also list the hosts which included in the  inventory groups&lt;/p&gt;

&lt;h3&gt;
  
  
  Answer
&lt;/h3&gt;

&lt;p&gt;Knowing the different ways to execute Ansible can save you time in the future. One of them is the Ad-Hoc way which is a very quick way to run anything on a remote host.&lt;/p&gt;

&lt;p&gt;In our case, our ad-hoc command will look like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ansible all -m copy -a 'content="The inventory file is in {{ inventory_dir }} and the inventory groups are {{ groups }}" dest=/tmp/info'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-m for specifying the module name. We used ‘copy’ but you could also use other modules for achieving the same result.&lt;/p&gt;

&lt;p&gt;-a are the arguments we are passing to the module like the content of the file and where to create it (‘dest’)&lt;/p&gt;

&lt;p&gt;I suggest running a couple of ad-hoc commands in order to be familiar with it and feel comfortable enough to run them on demand.&lt;/p&gt;

</description>
      <category>ansible</category>
      <category>interview</category>
      <category>questions</category>
    </item>
  </channel>
</rss>
