Running Ephemeral Docker Containers – Automatically Remove a Docker Container After Running It

Posted on

Docker is a convenient tool to quick create containers from different Linux images. If we use the common way to start a docker container like docker run image bash, after the the process exists, the container is still stored there. That is, the docker container persists after it has exited. Sometimes, we would like to
Read more

3 Ways of .odt to .txt File Conversion in Command Line in Linux

Posted on

The Open Document .odt files can contain rich formats for the content. However, some times a plain text file is more handy. We may convert .odt files to plain text files for such needs. In this post, we discuss 3 ways of how to convert .odt files to .text files in command line in Linux.
Read more

Release Notes For Linux v0.95a

Posted on

This is the release notes for linux release v0.95a (source code: linux-0.95a.tar.gz) with format adjusted by removing/replacing tabs/spaces/new lines. This notes document can give us an understanding of the early development of the Linux kernel. The the formatted version of the referenced RELNOTES-0.95 can be found at Release Notes For Linux v0.95. The original ASCII
Read more

Release Notes For Linux v0.95

Posted on

This is the release notes for linux release v0.95 (source code: linux-0.95.tar.gz) with format adjusted by removing/replacing tabs/spaces/new lines. This notes document can give us an understanding of the early development of the Linux kernel. The original ASCII formatted version is at the end of this post. RELEASE NOTES FOR LINUX v0.95 Linus Torvalds, March
Read more

Release Notes For Linux v0.12

Posted on

This is the release notes for linux release v0.12 (source code: linux-0.12.tar.gz) with format adjusted by removing/replacing tabs/spaces/new lines. This notes document can give us an understanding of the very initial development of the Linux kernel. Also check Notes for linux release 0.01. The original ASCII formatted version is at the end of this post.
Read more

Release Notes For Linux v0.01

Posted on

This is the notes for linux kernel release 0.01 (source code: linux-0.01.tar.gz) with format adjusted by removing/replacing tabs/spaces/new lines. This notes document can give us an understanding of whether the Linux kernel started with its very first release. The original ASCII formatted version is at the end of this post. Notes for linux release 0.01
Read more

Clearing Git History in Local and Remote Branches

Posted on

Git tracks changes as commits. This makes it possible and convenient to check the code change history in a repository. However, this also has side effect. The history consumes storage and the whole repository including the current version of the code files and all the previous changes may be quite large. This is especially a
Read more

Change Another Process’ Environment Variables in Linux

Posted on

Each process has its environment variables in Linux. But is it possible to change another process’ environment variable from another process in Linux? If it is possible to do so, how to do it? There is a trick which can work for some scenarios. First, find out the process ID, then start gdb and attach
Read more

Add Inline Comments for Multi-line Command in Bash Script

Posted on

In Bash script, it is common that multiple small commands run together connected by pipes (|) and the whole command is quite long. For clarity, we may write the command in multiple lines. How to add comments for these long multi-line commands? In Bash, the content after # in a line is the comment. Using
Read more

How to Install Hyperledger Fabric 2.0 in Ubuntu 18.04

Posted on

Hyperledger Fabric is a consortium blockchain system. It’s performance is relatively good and its modular architecture enables it to be usable in many scenarios. Hyperledger Fabric itself has rich documents and samples of test networks. For beginners, deploying a new network for trying and testing still consumes quite some time. In this post, we will
Read more

Grep 2 Lines using `grep` Command in Linux

Posted on

grep is excellent to match patterns from STDOUT/text files in command line or scripts. It’s handy. Sometimes, our problem is more complex than finding a keyword from a file. On a first thought, it may sound impossible using grep for such complex problems. But grep can be quite powerful than we thought. Today, let’s check
Read more

Bash Learning Materials

Posted on

Bash (GNU Bourne-Again SHell) the default shell for many Linux distributions. It is very common for scripting languages in Linux. Bash is easy and straightforward for writing small tools. However, as most tools, it has its grammars that could easily cause bugs if they are not used correctly. Here I summarize a list of good
Read more

Why I cannot login remote server with its root

Posted on

# ssh root@192.168.122.96 root@192.168.122.96’s password: Permission denied, please try again. Do according to [1]. NOTE: on Ubuntu, remember to restart ssh service like this “sudo restart ssh”. [1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/v2v_guide/preparation_before_the_p2v_migration-enable_root_login_over_ssh

How to judge whether its STDERR is redirected to a file in a Bash script on Linux?

Posted on

Within a Bash script, how to judge whether its STDERR is redirected to a file in Bash on Linux? For example, ./script.sh /tmp/log 2>&1 Can script.sh detect that its STDERR is redirected? Knowing the destination file is better. To test whether a script’s STDERR (or STDOUT) is redirected to a file, check by [[ -f
Read more