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 →

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 →