Pretty Print JSON in Linux Terminal

Pretty Print JSON in Linux Terminal
Screenshot of jq usage for pretty printing JSON files.

About

JSON (JavaScript Object Notation) is a widely used data format for exchanging information between web clients and servers. However, JSON data is often densely packed, making it difficult to read when viewing it directly in the terminal. Fortunately, Linux offers several tools to help pretty-print JSON files, making them easier to read and analyze. In this post, we’ll explore various methods for formatting JSON in the Linux terminal, including jq, Python’s built-in JSON tool, and a custom Bash script for environments where installing new tools is not possible.

Read more →

gomirror - A CLI Linux distribution mirror ranker

gomirror - A CLI Linux distribution mirror ranker
A screenshot of the gomirror CLI in use.

The project is in Work in Progress (WIP) state. A lot of functionality is still missing.

About

gomirror is a CLI mirror ranker that its main goal is to rank or find the best mirror for a Linux distribution. Although it can be extended to be used as a more general ranker for mirrors/servers.

It is build with usability, extensibility, and performance in mind. It can quickly make thousands of requests with the power of Goroutines, to all servers in parallel. Its inputs and outputs are JSON-modeled, to allow for defined but extensible input data and results. As a CLI tool it will display any results in the standard output by default, but with the correct flag it can also output them in various formats. You can find the expected inputs/outputs for the various supported formats in the inputs/in.template.* and outputs/out.template.* directories respectively.

Read more →

Download the Latest Release from GitHub and Verify their integrity using Checksums

Download the Latest Release from GitHub and Verify their integrity using Checksums
Screenshot of the latest release of GitHub CLI, hosted on GitHub.

About

GitHub hosts millions of open-source projects, many of which provide compiled binaries for various platforms as part of their releases. When you’re looking to download the latest version of a project, you might wonder how to do it efficiently from the command line, without manually navigating the GitHub website. Fortunately, GitHub provides an API that allows you to access release information programmatically. In this post, we’ll explore how to download the latest release of any GitHub project from the command line, using curl and utilizing the GitHub API.

Read more →

armOS - Building a simple ARM Operating System for the Raspberry Pi

armOS - Building a simple ARM Operating System for the Raspberry Pi

A simple ARM Operating System for the Raspberry Pi, supporting Aarch32 and Aarch64 architectures. It supports both Raspberry Pi Zero / Zero W and Raspberry Pi 4.

This project was made for the Embedded Systems course at NTUA 2020-2021.

Quick Links:

There is presentation in Greek that was made to showcase the Project. You can find it here or hosted in the repository.

Read more →

Install Hard Drive

Install Hard Drive
Screenshot of fdisk usage.

In this guide, we will see how we can install a new hard drive into a linux system. This operation requires partitioning, formatting and mounting the drive. Lastly, we will see how to edit the /etc/fstab in order for the drive to be automatically mounted at a system reboot.

This guide applies to all linux systems, though its been only tested in an Ubuntu Server machine.

Find the logical name of the drive

The logical name of the drive will be like /dev/sd*, where *=b,c,d,...

Read more →

Screen

Screen
By Neo139 - Own work, CC0, Wikipedia Commons.

Screen Commands

Start a session with name

screen -S "session_name"

Close session

Press Ctrl-D in the session.

Detach from session

Hold down Ctrl and hit A and D in the session.

List all sessions of a user

Lists all sessions with their PID:

screen -ls

Resume a session

Re-attach to a running session using its PID:

Read more →

Postfix Configure

Postfix Configure
By The original uploader was Ghen at English Wikipedia. - Transferred from en.wikipedia to Commons by Cody_Cooper., Public Domain, Wikipedia Commons.

Install Postfix

Install postfix and mailutils if not already installed:

sudo apt install postfix mailutils

Postfix Configuration Screen

In the screens, that will show up when installing postfix:

  • General type of mail configuration:

    • Choose Internet Site
  • System mail name:

    • It will be the domain part of our emails, so if you choose the default
    • which is the systems hostname e.g. serverhostname,
    • Postfix will use the address someuser@serverhostname
    • You can use serverhostname.com also.

Configure Postfix to send to Gmail

NEEDS TO BE FILLED

Read more →

ZSH Configure

ZSH Configure
oh my zsh project licensed under MIT License.

In this post, we will see how can change our default shell from bash to zsh. Zsh is a shell designed for interactive use, and can offer features that bash does not have, or it is difficult to implement and add.

Some of these features are: Auto Correction, Syntax Highlighting, Autosuggestions, and many more.

These features can be come even more easier to add, if we use a framework for zsh, like Oh My Zsh. Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. Oh My Zsh makes it easier to add new features with the bundled plugins that you can enable by editing a single line. You can also easily install external plugins that are provided by the community. Also, Oh My Zsh comes with over 150 available themes, that can change the way you look at your terminal.

Read more →