<?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: jones268</title>
    <description>The latest articles on DEV Community by jones268 (@jones268).</description>
    <link>https://dev.to/jones268</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%2F607015%2F1dd8ee8e-90b6-4ac4-a855-2e1a62fdc4a8.png</url>
      <title>DEV Community: jones268</title>
      <link>https://dev.to/jones268</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jones268"/>
    <language>en</language>
    <item>
      <title>How to Use the Linux Command Line</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Mon, 28 Jun 2021 10:53:32 +0000</pubDate>
      <link>https://dev.to/jones268/how-to-use-the-linux-command-line-4b3</link>
      <guid>https://dev.to/jones268/how-to-use-the-linux-command-line-4b3</guid>
      <description>&lt;p&gt;&lt;a href="https://www.linux.org/"&gt;Linux&lt;/a&gt; is a popular operating system for servers, but it can also be used in other ways. You can install and run Linux on a regular computer, and the process isn't that difficult. Once installed, you can run the Linux command line on that computer even if you don't log in as root (the superuser).&lt;/p&gt;

&lt;p&gt;For many people, the Linux command line can be a scary place. It looks different and feels different than what they're used to. But I like to think of it as a tool that allows you to do very specific things, like nothing else can.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nB8GVpUy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kw9vwdy5w1z42sgozgm1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nB8GVpUy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kw9vwdy5w1z42sgozgm1.png" alt="linux terminal using gnome terminal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Linux command line, you type a command and get output in the same window. There are hundreds of commands and it can take a long time to master them. You can &lt;a href="https://www.practicelinux.com/"&gt;practice Linux&lt;/a&gt; and quickly master all the commands online.&lt;/p&gt;

&lt;p&gt;The popularity of the Linux operating system, along with the rise of powerful, quad-core computers has made the command line interface (CLI) relevant again.&lt;/p&gt;

&lt;h2&gt;
  
  
  GUI vs command line
&lt;/h2&gt;

&lt;p&gt;Whereas once, a mouse was necessary to navigate the user interface, today with GUI interfaces, you typically just use your keyboard to access functionality. &lt;/p&gt;

&lt;p&gt;However, by going back to the command line and using the CLI, you can boost productivity and work more efficiently.&lt;/p&gt;

&lt;p&gt;The Linux command line is different from other operating systems and that's why many people avoid it. Instead of worrying about how to use it, focus on what you can do with it. &lt;/p&gt;

&lt;p&gt;Get to know your way around the Linux command line and it will make your time more efficient when working with Linux systems. &lt;/p&gt;

&lt;p&gt;Using the Linux command line not only increases your productivity, but it helps in debugging and troubleshooting issues that may arise.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CKHKw5Ix--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2uv4ggr75gnauntqi7f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CKHKw5Ix--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2uv4ggr75gnauntqi7f.png" alt="linux command line"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can use &lt;a href="https://bsdnerds.org/what-is-linux-shell/"&gt;commands&lt;/a&gt; from the Linux command line to navigate files, change permissions, configure services, mount devices and a lot more.&lt;/p&gt;

&lt;p&gt;Commands include &lt;code&gt;ls&lt;/code&gt; (list files), &lt;code&gt;cd&lt;/code&gt; (change directory), &lt;code&gt;pwd&lt;/code&gt; (see current directory) and lots and lots more. In fact there are so many commands and programs (bash, vim, ssh, git etc), that without training it can take over a year to master.&lt;/p&gt;

&lt;p&gt;Plus on many jobs you are expected to know the command line, to use ssh and more. It's a good skill to have&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>ubuntu</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why I Switched to vi/vim</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Mon, 28 Jun 2021 10:19:08 +0000</pubDate>
      <link>https://dev.to/jones268/why-i-switched-to-vi-vim-1lfl</link>
      <guid>https://dev.to/jones268/why-i-switched-to-vi-vim-1lfl</guid>
      <description>&lt;p&gt;The text editor I use daily is called vim (vi improved). It’s not a program for everybody, but it suits my needs well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Vim_(text_editor)" rel="noopener noreferrer"&gt;Vim&lt;/a&gt; is one of the most powerful text editor that exists. It's a program that you can configure to make it do anything. It has a steep learning curve, and can take months or years to master. &lt;/p&gt;

&lt;p&gt;Vim can be used without the mouse, everything using key presses. My first experience with vi was really bad (I forgot everything about it) but once I got used to it and learned a couple of commands and a few ex commands I fell in love with vi.&lt;/p&gt;

&lt;p&gt;You could wonder, &lt;em&gt;when writing code why use a mouse at all?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once you know the vim commands it's very easy to use. It's a great bonus that it can be used in the terminal, because it lets you quickly edit your system files or edit files remotely using ssh.&lt;/p&gt;

&lt;p&gt;I was a fairly experienced computer user. I started using a computer around age 12 or so, taught myself basic programming when I was about 13, and eventually became rather adept at various aspects of the art of computing.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1kh7ornef31ufzvnwwz2.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1kh7ornef31ufzvnwwz2.png" alt="vim comic"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I found myself needing to do a lot of system administration, and in the past I would have used nano, but I decided to try vim. I’d heard good things about it in the past but had never really tried it, so I was curious.&lt;/p&gt;

&lt;p&gt;Here are some reasons I switched to vi/vim : &lt;/p&gt;

&lt;p&gt;1) It is extremely fast &lt;br&gt;
2) It is extremely efficient &lt;br&gt;
3) It was already everywhere (this turns out to be very important).&lt;/p&gt;

&lt;p&gt;Vim is probably installed on your computer, if you open a terminal you can type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And to exit press &lt;code&gt;ZQ&lt;/code&gt;. If in the rare situation it's not installed, it is available in your package manager. However, even on a commercial OS like Mac OS X vim is available by default.&lt;/p&gt;

&lt;p&gt;If you are new to vim, you can &lt;a href="https://vim.is/" rel="noopener noreferrer"&gt;practice here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vim</category>
      <category>linux</category>
    </item>
    <item>
      <title>tmux terminal multiplexer</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Mon, 31 May 2021 09:31:24 +0000</pubDate>
      <link>https://dev.to/jones268/tmux-terminal-multiplexer-484</link>
      <guid>https://dev.to/jones268/tmux-terminal-multiplexer-484</guid>
      <description>&lt;p&gt;tmux is a terminal multiplexer: it enables a number of &lt;a href="https://bsdnerds.org/what-is-linux-shell/"&gt;terminals&lt;/a&gt; (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. &lt;/p&gt;

&lt;p&gt;tmux may be detached from a screen and continue running in the background, then later reattached. &lt;/p&gt;

&lt;p&gt;It allows you to easily manage separate terminal sessions inside a single terminal window. &lt;/p&gt;

&lt;p&gt;tmux can connect to a server, and multiple clients can be connected to the same session, simultaneously exchanging their input and display.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0KAj8PoQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b70cabwx2eg4a1mv791g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0KAj8PoQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b70cabwx2eg4a1mv791g.png" alt="tmux"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Commands?
&lt;/h2&gt;

&lt;p&gt;You can use these commands and shortcuts to work with tmux in Linux. From the command line:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Session Control&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;tmux&lt;/td&gt;
&lt;td&gt;Start a new session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tmux new -s &lt;/td&gt;
&lt;td&gt;Start a new session with the name chosen&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tmux ls&lt;/td&gt;
&lt;td&gt;List all sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pane Control&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ctrl b, "&lt;/td&gt;
&lt;td&gt;Split pane horizontally&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ctrl b, %&lt;/td&gt;
&lt;td&gt;Split pane vertically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ctrl b, o&lt;/td&gt;
&lt;td&gt;Next pane&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why tmux?
&lt;/h2&gt;

&lt;p&gt;I've used tmux for years, and it has become an essential part of my work flow. I couldn't imagine editing code without it. If you want to practice Linux commands, you can use &lt;a href="https://www.practicelinux.com/"&gt;these exercises&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen.&lt;/p&gt;

&lt;p&gt;Features include:&lt;/p&gt;

&lt;p&gt;• Splitting a terminal window into horizontal or vertical panes.&lt;br&gt;
• The ability for windows to be re-ordered by the user, and to be assigned names.&lt;br&gt;
• Executing shell commands in any pane, and running custom commands in response to window changes.&lt;br&gt;
• Detaching and reattaching a session (allowing the user to leave terminals behind, and then return to them).&lt;br&gt;
• A powerful configuration language.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--02SqkfsW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mnf6pmatohkliik0fosl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--02SqkfsW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mnf6pmatohkliik0fosl.gif" alt="and so you code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;tmux is very useful for people who commonly work on remote machines via ssh.&lt;/p&gt;

&lt;p&gt;Why did I pick tmux over screen and a terminal multiplexer? Three reasons.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, tmux is written is responsive and light.&lt;/li&gt;
&lt;li&gt;Second, tmux is much more expressive than screen. I can split my terminal into six panes and change the size of each pane with the same ease as resizing a terminal in GNU Screen.&lt;/li&gt;
&lt;li&gt;Third, tmux has integrated support for a status bar. This means I can read from one pane and keep an eye on other panes at the same time.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
      <category>tmux</category>
    </item>
    <item>
      <title>How to Host a Python Web App</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Sun, 30 May 2021 15:22:53 +0000</pubDate>
      <link>https://dev.to/jones268/how-to-host-a-python-web-app-f0d</link>
      <guid>https://dev.to/jones268/how-to-host-a-python-web-app-f0d</guid>
      <description>&lt;p&gt;You might have a great idea for a web application, but you’re not sure how to turn it into a reality. &lt;/p&gt;

&lt;p&gt;Your options for hosting your app are either building your own hosting environment from scratch or using a third party’s services.&lt;/p&gt;

&lt;p&gt;I don't recommend opening up your local network to the internet. While technically possible, this comes with a lot of security risks. Instead I recommend using a third party.&lt;/p&gt;

&lt;h2&gt;
  
  
  VPS
&lt;/h2&gt;

&lt;p&gt;You could spinup a VPS on Vultr. While easy, this gives you the burden of maintaining the system and dealing with all the security problems that come along with it.&lt;/p&gt;

&lt;p&gt;You need to choose which operating system to use, or which flavor of Linux. Which web server. Harden your server, block fake ssh logins etc. It also requires you to learn the &lt;a href="https://bsdnerds.org/what-is-linux-shell/"&gt;command line&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;If you're new to this, this sounds like a lot of work. Is there an easier way, if you just want to host a Python App and deploy your code to the web?&lt;/p&gt;

&lt;h2&gt;
  
  
  Host Python
&lt;/h2&gt;

&lt;p&gt;You can host a Python web application using PythonAnywhere. PythonAnywhere is a Python hosting service.&lt;/p&gt;

&lt;p&gt;It’s very inexpensive, and it offers some neat features like a super-simple setup, easy-to-use terminal, great documentation, and the ability to expose your app through a root domain (without an extra charge).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pythonanywhere.com/?affiliate_id=00535ced"&gt;Python Anywhere&lt;/a&gt; lets you deploy an app with one click, not having to worry about maintaining any server.&lt;/p&gt;

&lt;p&gt;Deploying a Python app to the web can be a challenge. There are many different frame works you can use. You could use &lt;a href="https://pythonbasics.org/flask-tutorial-hello-world/"&gt;Flask&lt;/a&gt;, &lt;a href="https://pythonbasics.org/django-web-app/"&gt;Django&lt;/a&gt; or another web framework.&lt;/p&gt;

&lt;p&gt;Then you probably need a database system. Do you use &lt;a href="https://pythonspot.com/mysql-with-python"&gt;MySQL&lt;/a&gt;, SQLite or something else?&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A Beginner's Guide to Linux Commands</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Sun, 30 May 2021 09:13:09 +0000</pubDate>
      <link>https://dev.to/jones268/a-beginner-s-guide-to-linux-commands-49hf</link>
      <guid>https://dev.to/jones268/a-beginner-s-guide-to-linux-commands-49hf</guid>
      <description>&lt;p&gt;The world is going Linux. At least that's what we tell ourselves every time we open a terminal window and type in a cryptic series of characters that do nothing but make us more frustrated than we were when we started. If you've ever considered using Linux, but aren't sure where to start, this guide is for you.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://bsdnerds.org/what-is-linux-shell/"&gt;command line&lt;/a&gt; might seem intimidating at first, but it's actually not so bad. You can use the GUI (Graphical User Interface) if you want, but the terminal has a lot of cool features that make using Linux much easier.&lt;/p&gt;

&lt;p&gt;If you're on Ubuntu and want to see what commands you have available, just hit the CTRL+ALT+T key combination and a box will appear in the top left corner showing you all the different programs available. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BAgnQ4ar--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ynzsnrdwe5etfo04rqbk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BAgnQ4ar--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ynzsnrdwe5etfo04rqbk.jpeg" alt="command line ubuntu terminal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Commands
&lt;/h2&gt;

&lt;p&gt;Linux commands are essentially small bundles of text designed to perform a specific task, such as move files from one location to another or run a program.&lt;/p&gt;

&lt;p&gt;The Linux command line is not intimidating once you learn a few basic commands. The following are some of the most common commands and cover a wide range of tasks you might want to do.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;cd&lt;/strong&gt; command stands for "change directory" and it changes the current working directory on your computer. It's very useful for navigating around your filesystem.&lt;/p&gt;

&lt;p&gt;For example, if you're in your home directory and want to get to /etc/hosts, you could type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /etc/hosts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You could also do this if you're already in /etc/hosts but want to go back up one directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to see what's in your current working directory, use the ls command like this: &lt;code&gt;ls&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will list all of the files and directories in the current working directory.&lt;/p&gt;

&lt;p&gt;There are many other commands that accomplish the same tasks for some commands, such as &lt;code&gt;cp&lt;/code&gt; (copy) and &lt;code&gt;mv&lt;/code&gt; (move).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp file /home/user/Desktop/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's a lot more to learn, but the commands in this article will serve you well no matter which Linux distro you're using. They even work on Mac OS X and on the BSD systems.&lt;/p&gt;

&lt;p&gt;If you are new to the command line, I recommend &lt;a href="https://www.practicelinux.com/"&gt;this site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Use Bash to Write a Simple Script</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Sat, 29 May 2021 14:37:50 +0000</pubDate>
      <link>https://dev.to/jones268/how-to-use-bash-to-write-a-simple-script-3loj</link>
      <guid>https://dev.to/jones268/how-to-use-bash-to-write-a-simple-script-3loj</guid>
      <description>&lt;p&gt;Bash is a Unix shell used in Linux and MacOS. We will be using a bash script to make a program that runs in the background. &lt;/p&gt;

&lt;p&gt;You need to know how to open a terminal in your operating system. On Ubuntu, you can press Ctrl+Alt+t . On Mac, you can press Command+Space, then type Terminal and press Enter.&lt;/p&gt;

&lt;p&gt;To make bash scripts, you should know Linux commands. To practice the command line, you can use &lt;a href="https://practicelinux.com/"&gt;this site&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a bash script?
&lt;/h2&gt;

&lt;p&gt;A Bash script is a text file containing a series of Bash commands. When the file is executed, the commands are executed in sequence as they appear in the text file.&lt;/p&gt;

&lt;p&gt;To get started, you can create a new script called my_script.sh. &lt;/p&gt;

&lt;p&gt;A simple script would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "Hello World"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make it executable with the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x my_script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script will run when you enter the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./my_script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can always stop the script by pressing Ctrl+C.&lt;/p&gt;

&lt;p&gt;Any bash &lt;a href="https://bsdnerds.org/what-is-linux-shell/"&gt;command&lt;/a&gt; can be inside your bash script. Besides commands, the scripting language also supports for loops and if statements. Variables can be used too.&lt;/p&gt;

&lt;h3&gt;
  
  
  Variables
&lt;/h3&gt;

&lt;p&gt;A bash variable is a variable, that stores string values.&lt;/p&gt;

&lt;p&gt;For example the following code prints the contents of the variable "friend"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$friend&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To change the value of a bash variable we use the '=' (or the s equal operator).&lt;/p&gt;

&lt;p&gt;For example, to change the value of "user" to "john" we write: user="john"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"john"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  If statements
&lt;/h3&gt;

&lt;p&gt;If statements are a simple tool for logic in bash. If statements can be used in bash.&lt;/p&gt;

&lt;p&gt;The syntax is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, if your script should only execute the echo hello world command if the script was run on a Mac, you could use the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nv"&gt;$OSTYPE&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="s2"&gt;"Mac OS X"&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
&lt;/span&gt;&lt;span class="nb"&gt;echo &lt;/span&gt;hello world
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For loops
&lt;/h3&gt;

&lt;p&gt;This lets you repeat code. See the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;1..10&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"hello, world &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you run this program, then it will produce the following output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;./my_script_with_for.sh
hello, world 1
hello, world 2
hello, world 3
hello, world 4
hello, world 5
hello, world 6
hello, world 7
hello, world 8
hello, world 9
hello, world 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By using the “for” command, you can do something in a loop.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
    </item>
    <item>
      <title>gpg command examples</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Sat, 29 May 2021 13:39:07 +0000</pubDate>
      <link>https://dev.to/jones268/gpg-command-examples-2dek</link>
      <guid>https://dev.to/jones268/gpg-command-examples-2dek</guid>
      <description>&lt;p&gt;&lt;a href="https://gnupg.org/"&gt;gpg&lt;/a&gt; is a program to encrypt and decrypt files. In other words, it is a program for privacy and security.&lt;/p&gt;

&lt;p&gt;Your data is safe if you store it on gpg (i.e. encrypted).&lt;br&gt;
Your data is not safe if you don't encrypt it with gpg (i.e. not encrypted).&lt;/p&gt;

&lt;p&gt;So why would you expose your secret information to the threat of being stolen by leaking it to a computer disk?&lt;/p&gt;

&lt;p&gt;The only reason is ignorance, because encryption is easy and saves you effort and money in the long run.&lt;/p&gt;

&lt;p&gt;Tools like gpg make encryption as easy as saving a file, or even easier.&lt;/p&gt;

&lt;p&gt;gpg linux will help you encrypt your e-mails or to encrypt files on your disk so that nobody else can read them without knowing the decryption password which you alone know.&lt;/p&gt;

&lt;p&gt;If you are new to the linux command line, you can &lt;a href="https://www.practicelinux.com/"&gt;practice here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What is encryption?
&lt;/h2&gt;

&lt;p&gt;Encryption is a method for obscuring electronic data from those who should not see it. &lt;/p&gt;

&lt;p&gt;Encrypted data is unreadable by anyone without special knowledge, often referred to as a ‘key’. With most encryption systems, the key needed to decrypt the data is unique to the individual user.&lt;/p&gt;

&lt;p&gt;You can use gpg with a single private key or with a key pair.&lt;/p&gt;

&lt;p&gt;The gpg program works with separate keys which are required for reading as well as writing. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;public key&lt;/strong&gt; which is used for reading is distributed in ways that allow others to know that it really belongs to the person named in the user certificate. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;private key&lt;/strong&gt; must be kept secret, so it is typically stored on a smartcard or similar device.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--am48ZQni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bj8ffyl9vvc5l844rssw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--am48ZQni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bj8ffyl9vvc5l844rssw.gif" alt="sec"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What can gpg do?
&lt;/h2&gt;

&lt;p&gt;gpg is a program to encrypt and decrypt files.&lt;br&gt;
gpg is intended to be correctly and completely OpenPGP compliant.&lt;/p&gt;

&lt;p&gt;The main features of gpg are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encrypting and decrypting files with the OpenPGP file format.&lt;/li&gt;
&lt;li&gt;Full integration with OpenLDAP and other applications.&lt;/li&gt;
&lt;li&gt;Key generation (prime generation, digest calculation), import/export of keys,&lt;/li&gt;
&lt;li&gt;Creation of revocation certificates, batch key signing, change passphrases,&lt;/li&gt;
&lt;li&gt;Powers for saving private and public keys on smartcards and importing public keys from smartcards.&lt;/li&gt;
&lt;li&gt;Symmetric encryption of data and special files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6U5224TA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwh47pf3613865kzq4ic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6U5224TA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwh47pf3613865kzq4ic.png" alt="gpg logo"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Symmetric encrpytion
&lt;/h2&gt;

&lt;p&gt;Encrypt a file with a password&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;file]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Decrypt a file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;file]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Asymmetric encryption
&lt;/h2&gt;

&lt;p&gt;If you want to use public/private key pairs instead.&lt;/p&gt;

&lt;p&gt;Generate a new key pair&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;--gen-key&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Encrypt a file to a recipient&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;recipient key] &lt;span class="o"&gt;[&lt;/span&gt;file]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List keys in local keychain&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;--list&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are also some gui alternatives to &lt;a href="https://bsdnerds.org/How-to-encrypt-decrypt-files-in-Linux/"&gt;encryption&lt;/a&gt;  that you can use in your file manager.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>security</category>
    </item>
    <item>
      <title>The Linux Command Line</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Fri, 28 May 2021 08:38:26 +0000</pubDate>
      <link>https://dev.to/jones268/the-linux-command-line-8p1</link>
      <guid>https://dev.to/jones268/the-linux-command-line-8p1</guid>
      <description>&lt;p&gt;If you're a &lt;a href="https://en.wikipedia.org/wiki/Linux"&gt;Linux&lt;/a&gt; user, or you know someone who is, you've probably heard of the "command line". But what is it? Is it hard to learn? Will it turn you into a geek? &lt;/p&gt;

&lt;p&gt;The command line is something that anybody can learn and enjoy using. It's a special way of interacting with your computer, by typing short commands instead of clicking around in menus. &lt;/p&gt;

&lt;p&gt;Although it's easy to use, the command line does take a little getting used to, because it's very different from what most people are used to. &lt;/p&gt;

&lt;p&gt;On top of that, there are many different commands. It can take a long time to become an expert without training. You can use &lt;a href="https://practicelinux.com/"&gt;this site&lt;/a&gt; to boost your Linux skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why command line?
&lt;/h2&gt;

&lt;p&gt;I'll start with a simple statement of fact: the command line is here to stay. It's a powerful, flexible interface that allows the user to control the computer directly, without reference to a &lt;a href="https://en.wikipedia.org/wiki/Graphical_user_interface"&gt;GUI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Linux command line is a powerful environment for a computer programmer. But it takes time and practice to become proficient at it.&lt;/p&gt;

&lt;p&gt;To understand what the command line is, you should first know what it’s not. It’s not a graphical user interface. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dpxa5Fq8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tyv8qykozi41k0eqhhg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dpxa5Fq8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tyv8qykozi41k0eqhhg.jpeg" alt="linux command line"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The command line sits between your computer and programs. Anything run from the terminal is called a “command” or a “shell”. &lt;/p&gt;

&lt;p&gt;You execute a command by typing it into the terminal and pressing return or enter, depending on your shell. &lt;/p&gt;

&lt;p&gt;Essentially, it’s everything you type at a prompt or run standalone, like scripts and programs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linux command line
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://bsdnerds.org/what-is-linux-shell/"&gt;commands&lt;/a&gt; are not only useful on Linux but also on Mac OS X. As both use the bash shell. But even with different shells like on &lt;a href="https://www.openbsd.org/"&gt;OpenBSD&lt;/a&gt;, the commands are largely the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;start programs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can start a program by typing the name of the program like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;navigate directories&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You don't need a file manager, browsing your file systems is one of the things you can do with the command line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# list files in directory&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt;

&lt;span class="c"&gt;# enter directory&lt;/span&gt;
&lt;span class="nb"&gt;cd dir&lt;/span&gt;

&lt;span class="c"&gt;# go up one directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ..

&lt;span class="c"&gt;# go to root&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /

&lt;span class="c"&gt;# go to home directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;view files&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To view files, you can use these commands&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# show file&lt;/span&gt;
&lt;span class="nb"&gt;cat &lt;/span&gt;filename

&lt;span class="c"&gt;# show first lines of file&lt;/span&gt;
&lt;span class="nb"&gt;head &lt;/span&gt;filename

&lt;span class="c"&gt;# show last lines of file&lt;/span&gt;
&lt;span class="nb"&gt;tail &lt;/span&gt;filename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;edit text&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Text editing is great on the command line. Especially for config files but also for development.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# vim editor (ZQ to exit)&lt;/span&gt;
vim filename

&lt;span class="c"&gt;# nano editor (beginners)&lt;/span&gt;
nano filename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Moving from &lt;a href="https://www.urbandictionary.com/define.php?term=Soydev"&gt;soydev&lt;/a&gt; to unix hacker really boosts your skills. It makes you so much more proficient at development. &lt;/p&gt;

&lt;p&gt;These days you can even use a Linux terminal inside windows, the command line is included on Mac OS X and almost every web server in the world uses the command line.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Neat Linux CLI tools </title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Thu, 27 May 2021 21:41:31 +0000</pubDate>
      <link>https://dev.to/jones268/neat-linux-cli-tools-1o48</link>
      <guid>https://dev.to/jones268/neat-linux-cli-tools-1o48</guid>
      <description>&lt;p&gt;These are some command line tools for Linux. All these tools have one thing in common, they all use the Linux Command Line Interface (CLI).&lt;/p&gt;

&lt;p&gt;These tools are mainly useful for developers and sysadmins who use the linux shell on a daily basis.&lt;/p&gt;

&lt;p&gt;If you are new to the command line, I recommend &lt;a href="https://www.practicelinux.com/"&gt;this course&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ranger
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/ranger/ranger"&gt;Ranger&lt;/a&gt; is a console file manager for the X Window System / Wayland. It lets you browse your file system using just the cursor keys. It's great for viewing images too, pressing the right arrow on an image shows it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pnA-5a90--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2czyqlqi1s60j5h6bmyr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pnA-5a90--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2czyqlqi1s60j5h6bmyr.png" alt="ranger file manager"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ncdu
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.yorhel.nl/ncdu"&gt;ncdu&lt;/a&gt; is a disk usage analyzer just like du. But ncdu has a unique approach to this problem of disk usage.&lt;/p&gt;

&lt;p&gt;ncdu is a disk analyzer for the command line. It scans your home directory and shows you how much space each directory takes.&lt;/p&gt;

&lt;p&gt;unlike du, it uses an ncurses interface.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4ALRwb9C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3n3hu52houf2p5wond8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4ALRwb9C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3n3hu52houf2p5wond8.png" alt="ncdu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  lynis
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://cisofy.com/lynis/"&gt;Lynis&lt;/a&gt; is an open source security auditing tool that tests the security defenses of Unix-based systems. &lt;/p&gt;

&lt;p&gt;It scans the system locally or remotely and gives a detailed report on the system’s security, allowing you to well-informed decisions for system hardening.&lt;/p&gt;

&lt;p&gt;Lynis is a security tool designed to test common system security. This includes controls, policies and procedures as well as the actual security mechanisms of the operating system itself. It helps you to answer those questions and gives you recommendations how to improve overall security of your systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--emMc8xLu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93f9toon6ev8pyh6u34l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--emMc8xLu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93f9toon6ev8pyh6u34l.png" alt="lynis"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>5 Things You Need to Know Before Switching to Linux</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Wed, 26 May 2021 08:01:55 +0000</pubDate>
      <link>https://dev.to/jones268/5-things-you-need-to-know-before-switching-to-linux-1fjc</link>
      <guid>https://dev.to/jones268/5-things-you-need-to-know-before-switching-to-linux-1fjc</guid>
      <description>&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Linux"&gt;Linux&lt;/a&gt; operating systems are powerful and can be used all around your home and office. Whether you switch to Linux full-time or use it alongside Windows and macOS, there are some things you should know.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Linux comes in distributions&lt;/strong&gt; 😁&lt;/p&gt;

&lt;p&gt;Linux and related software come in distribution. A Linux distribution is an operating system, while Linux is the code that makes the operating system work (the kernel).&lt;/p&gt;

&lt;p&gt;These distributions have a different user experience and target. Some distributions are very &lt;a href="https://bsdnerds.org/best-linux-for-beginner/"&gt;beginner&lt;/a&gt; orientated while others are oriented towards the power user. There are many different &lt;a href="https://distrowatch.com/"&gt;Linux distributions&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Some of the more popular Linux distributions are Ubuntu, Mint, Fedora and Suse. Each Linux distribution has a different target audience, such as Kali which is very security orientated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Try Linux without installing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These days a Linux distribution will often detect your drivers automatically. There are live usb distros that let you run Linux without installing.&lt;/p&gt;

&lt;p&gt;You download a Linux live image (.iso) and put it on a USB drive. Then you restart the computer and boot from the USB drive. Sometimes it's necessary to change to "boot from USB" in the computers BIOS.&lt;/p&gt;

&lt;p&gt;You can also order preinstalled live USB disks from the internet. Then you just plug it into your computer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2PNdBHsE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvc6dmx9gmouhxkjc0gt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2PNdBHsE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvc6dmx9gmouhxkjc0gt.png" alt="live usb"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Drivers: Drivers Are Easy to Install&lt;/strong&gt; 💻&lt;/p&gt;

&lt;p&gt;The biggest reason people avoid Linux is because they're worried about drivers. For anyone who's ever opened up a computer, the process of installing some drivers can be intimidating, but Linux makes it easy. In fact, most of the time it's not even needed to install drivers.&lt;/p&gt;

&lt;p&gt;This has changed a lot in the last 15 years. While 15 years ago it was quite a hassle, these days it usually works out of the box. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Linux command line can help you.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can add new software, delete old software, manage your file system, login to other computers (ssh) and a lot more.&lt;/p&gt;

&lt;p&gt;The default command line in Linux is called the Bash shell and this is the same in all Linux distributions and even similar on Mac OS X.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sizhs3Iu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urq2cscud1zl0tx793ls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sizhs3Iu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urq2cscud1zl0tx793ls.png" alt="linux bash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many different Linux commands. If you want to learn them quickly, you can use &lt;a href="https://www.practicelinux.com/"&gt;these exercises&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Linux is free&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is no free lunch in life, but there is a free operating system, and it’s called Linux.&lt;/p&gt;

&lt;p&gt;Linux allows you to get things done without having to pay to use products from companies like Microsoft, Apple, Adobe, and others. &lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>Edit remote files with Vim</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Tue, 25 May 2021 15:39:59 +0000</pubDate>
      <link>https://dev.to/jones268/edit-remote-files-with-vim-24k9</link>
      <guid>https://dev.to/jones268/edit-remote-files-with-vim-24k9</guid>
      <description>&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Vim_(text_editor)"&gt;Vim&lt;/a&gt; is a text editor with a huge following. It's installed by  default on every Linux system and even on Mac OS X.&lt;/p&gt;

&lt;p&gt;Vim is a tool that wants you to succeed. if you want something to happen, you can make it happen. It works completely by keyboard shortcuts. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lCmVVANv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7enhxyxmhku4cjrqo5cf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lCmVVANv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7enhxyxmhku4cjrqo5cf.png" alt="vim editor"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It gives you the power to manipulate text at a fundamental level. you can operate on individual characters, words or lines of text this gives vim a really powerful interactive feel.&lt;/p&gt;

&lt;p&gt;If you are new to vim, I recommend &lt;a href="https://vim.is"&gt;these exercises&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Remote files with vim
&lt;/h2&gt;

&lt;p&gt;I am often connecting to remote machines and editing config files. &lt;/p&gt;

&lt;p&gt;This was cumbersome, as I would have to use SFTP to copy files, manually updating the buffer when the file was modified on the remote machine. &lt;/p&gt;

&lt;p&gt;It was too easy to get distracted and lose track of what I was doing.&lt;/p&gt;

&lt;p&gt;If you want to edit files on a remote server, try this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim scp://you@remote_ip//path/file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and change username to your username, your remote ip, the path and the filename.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim scp://frank@192.168.2.7//home/frank/hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have vim open, you can also do &lt;code&gt;:e scp://you@remote_ip//path/file.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can use sftp too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim sftp://user@remote_ip//path/file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change it with your username, remote ip and path to the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim sftp://frank@192.168.2.7//home/frank/hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to use the old unencrypted ftp protocol&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:e ftp://[user@]machine/path/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vim is relentlessly awesome. It does everything an editor should do and nothing it shouldn't. There are no gimmicks, no silly settings, no bloat. It just works. all the time. no exceptions.&lt;/p&gt;

</description>
      <category>vim</category>
      <category>linux</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Why Use Vim for Programming</title>
      <dc:creator>jones268</dc:creator>
      <pubDate>Tue, 25 May 2021 13:26:26 +0000</pubDate>
      <link>https://dev.to/jones268/why-use-vim-for-programming-467h</link>
      <guid>https://dev.to/jones268/why-use-vim-for-programming-467h</guid>
      <description>&lt;p&gt;Vim is the most famous text editor many programmers use for coding on the Linux terminal.&lt;/p&gt;

&lt;p&gt;Vim is a text editor for Linux. Many people have grown up using Vim, that and its ubiquitous nature means it can be found on any Unix/Linux system. &lt;/p&gt;

&lt;p&gt;Many “power users” swear by the power and functionality of Vim, however many people see it as intimidating and complicated. If you are new to vim, I recommend &lt;a href="https://vim.is/" rel="noopener noreferrer"&gt;these exercises&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Vim can be downloaded and installed from a software repository. Vim is often installed by default on Linux systems and even on Mac OS X.&lt;/p&gt;

&lt;p&gt;You can install vim with your package manager&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why vim?
&lt;/h2&gt;

&lt;p&gt;The reasons for this are simple: it's fast, it's powerful, and it comes in both a terminal emulator and a GUI version. &lt;/p&gt;

&lt;p&gt;You can use it locally or over an ssh connection. It can even be used inside IDEs as a plugin.&lt;/p&gt;

&lt;p&gt;Vim allows programmers to edit text quickly and efficiently. You can jump to the end of file using &lt;code&gt;G&lt;/code&gt;, top of file using &lt;code&gt;gg&lt;/code&gt; and to line 10 using &lt;code&gt;10G&lt;/code&gt;. Vim allows you to record and replay keystrokes and has many many more features.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq29uls0rogayd9kxsjt0.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq29uls0rogayd9kxsjt0.gif" alt="vim keystrokes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vim 8 comes with built-in support for &lt;a href="https://python.org" rel="noopener noreferrer"&gt;Python&lt;/a&gt;, &lt;a href="https://php.net" rel="noopener noreferrer"&gt;PHP&lt;/a&gt;, &lt;a href="https://www.perl.org/" rel="noopener noreferrer"&gt;Perl&lt;/a&gt;, &lt;a href="https://www.ruby-lang.org/en/" rel="noopener noreferrer"&gt;Ruby&lt;/a&gt; and Tcl programming languages.&lt;/p&gt;

&lt;p&gt;Vim as a code editor but it's much more powerful than you may think. Before you do anything else, you should know that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vim is not a text editor that uses a mouse. It's a program that uses keyboard shortcuts to perform all of the tasks.&lt;/li&gt;
&lt;li&gt;Vim is hard to learn. You will have to spend a lot of time practising and mastering your skills before using it effectively.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
      <category>vim</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
