A brief introduction to vi

Welcome back, in this post we are going to discuss what I call, the most famous editor ever created, vi, the name vi is an abbreviation of the word visual. which was an evolution of the original ex editor, a line editor. When vi was introduced, it was like a revolution, it introduced the ability to move the cursor on the whole file and edit single characters.

In UNIX and derived systems, vi is a foundational editor, it’s the editor that you are going to find even on a minimalist system. I retain important, that to effectively operate on UNIX, you must learn vi, or at least enough to be able to edit a file. This post addresses the minimal function you must learn to effectively edit a file. Continue reading “A brief introduction to vi”

Expand NAS Drive Array Capacity Without Data Loss

Thank you for checking in. This article will explain how to expand a NAS drive array capacity without data loss. But before we explain, let’s outline some assumptions. In this article we assume that a RAID 1 or a RAID 5 type array is configured in the NAS and that all drive bays are used, for a RAID 1, we assume two are used, and for a RAID 5, we assume four bays are used.

Now let’s also assume that the all disks used either by the RAID 1 or the RAID 5 are all 4TB each, and that you would like to expand the array to have 8TB drives. Continue reading “Expand NAS Drive Array Capacity Without Data Loss”

The Mystery of Dynamically Linked or Statically Linked Executables (Part 2)

Welcome back. This post is a continuation of part 1 and it assumes you have read it. Find part 1 here.

Now, let’s continue the discussion about a dynamic vs static linked executable. You should probably ask yourself why and when would I use one vs the other? Continue reading “The Mystery of Dynamically Linked or Statically Linked Executables (Part 2)”

The Mystery of Dynamically Linked or Statically Linked Executables

Hello readers, today I decided to explain a deep concept not usually discussed often because of the abstractions computer languages have created. But in the end, on a Linux/UNIX system, there is an executable binary file that can be either dynamically or statically linked. I hope this post find as many users as possible due to the fact that I could not find an easy explanation out there and i decided to write my own to share for the benefit of people that want to learn Linux/UNIX in general.

Enough, let’s dig into the subject… Continue reading “The Mystery of Dynamically Linked or Statically Linked Executables”

Demystify Multitasking Terminal with the TMUX Utility (Advanced)

This article picks up where my previous article left off. If you haven’t read it, please check it out here. Now let’s continue. In the previous article, we discussed how to manage tmux session, creating and attaching to sessions. Now, let’s discuss some of the advanced topics. First of all, let’s discuss key-bindings. For example, the default keys to spawn new panes, or detach from the current session are not intuitive to me. In order to change those defaults, you have to create a file, in your home directory, called .tmux.conf. Please pay attention to the period “.” before the filename, in UNIX this simply means that the file is hidden. Continue reading “Demystify Multitasking Terminal with the TMUX Utility (Advanced)”

Demystify Multitasking Terminal with the TMUX Utility

Let’s talk today about the very useful utility called tmux. After reading this post, you will know what tmux is, why and how you use it, and a few tricks to  make the experience better.

Let’s start with the question, what is tmux? Just like the name implies, tmux stands for teminal multiplexer, it has for all practical purposes, replaced the older but similar utility called screens. Once you start tmux, you are welcomed by a similar screen as before, the only difference is the task bar located at the bottom. Let’s see it in  action. Continue reading “Demystify Multitasking Terminal with the TMUX Utility”

Exporting a variable (inheritance) in a UNIX Shell. What is it and why.

Hello again, today we are discussing exporting a variable in a UNIX Shell.  I am sure that sometimes, you have come across something like the following code snippet:

debug=true

or:

export debug=true

In both cases, we are assigning the value of true to a variable named debug. But what does this mystical export statement do? Continue reading “Exporting a variable (inheritance) in a UNIX Shell. What is it and why.”

The Perfect Bash Prompt (PS1)

Welcome back, let’s discuss something that many UNIX/Linux users do not think about it even after they’ve been working on systems for years. Let’s discuss the bash prompt. If you don’t know what the bash prompt is, the bash prompt is the text that appears on the command line right before the cursor. Most Linux systems have a default bash prompt something like:

root@localhost:~#

The above prompt displays the user, the system name, and current directory and a $ or # depending if you are a regular or superuser. Continue reading “The Perfect Bash Prompt (PS1)”

Replace Failed Drive in RAID Array

This guide can serve as a general to do list when you receive a disk error on a NAS device protected by redundant disks, for example: RAID 1, RAID 4, RAID 5, etc. With this process, you will not have any data loss, unless you unplug the wrong disk or perform the steps indicated here not in the correct order. So, please pay attention to the instructions.

First of all it’s important to identify the correct disk to replace, and keep in mind that, for data loss risks, you do not want to run a failing disk for long. A failing disk is a disk on which, bad sectors are starting to appear, and the SMART disk troubleshooting indicates an imminent failure. Continue reading “Replace Failed Drive in RAID Array”