The terminal is a very powerful tool, and it’s probably the most interesting part in Unix. Among the plethora of useful commands and scripts you can use, some seem less practical, if not completely useless. Here are some Bash commands that are fun, and some of them are useful as well.
Oneko
This command adds some spice to your terminal by adding a cat to your screen which will chase after your (mouse) cursor. Install it by running this script:
sudo apt install oneko
Type oneko to display the cat.
figlet
Figlet is a command for those who love to write in ASCII art. It greatly simplifies this task as it automatically transforms any given string. It comes with a bunch of fonts by default at “/usr/share/figlet/fonts/,” and you can of course add your own.
Enterprises of all sizes are reporting dramatic and widening skills gaps in Linux and open source skills. Meanwhile, Linux tops the list as the most in-demand open source skill, according to the 2018 Open Source Jobs Report. In this article series, we are taking a closer look at one of the best new ways to gain open source and Linux fluency: the Introduction to Open Source Software Development, Git and Linux training coursefrom The Linux Foundation.
This article is the final one in a four-part article series that highlights the major aspects of the training course, in chronological order. The initial article in the series covered the course’s general introduction to working with open source software, with a focus on such essentials as project collaboration, licensing, legal issues and getting help. With that groundwork laid, the course delves into working with Bash, the standard shell for most Linux distributions. The second article covered the course curriculum dedicated to working with Bash and Linux basics. The third article covered working with the command line as well as command-line tools. Here we will look at the course’s extensive content on working with Git and GitHub.
Working with Git, is, of course, essential for working with open source in today’s environment, especially if you will be collaborating with others. Git is a distributed version control system that makes collaborating on projects easy, while at the same time minimizing version-related errors and unwanted duplication of effort. Once you are working with Git you can also leverage a valuable repository calledGitHub, where teams can house their projects, access and update code, and more.
The course covers Git as well as working with GitHub, and also notes that there are alternatives to GitHub that are worth knowing about, such as:
Git began as an offshoot of the Linux kernel development community, initially created by Linus Torvalds himself. However, people quickly realized that it could be used for any project that had collaborative needs. The course comprehensively covers Git essentials as they apply to collaborating on projects. In focusing on GitHub, it notes that collaborators can designate hosted projects as public or private, and that public repositories are free of charge.
The course devotes 11 chapters to installing, using, and working with Git, covering the following topics:
Git Installation
Git and Revision Control Systems
Using Git: An Example
Git Concepts and Architecture
Managing Files and the Index
Commits
Branches
Diffs
Merges
Managing Local and Remote Repositories
Using Patches
As is true throughout the Introduction to Open Source Software Development, Git and Linux training course, there are Labs modules that encourage students to get hands-on experience with Git and GitHub. An initial module guides students through creating a GitHub account that can go on to be used for working with open source projects over time.
In this part of the course, the focus is very much on applying Git and GitHub skills to collaborative project management and tasks. As students go through these lessons, they should keep in mind that the online course includes many summary slides, useful bullet lists, graphics, and more. It’s definitely worth setting up a desktop folder and regularly saving screenshots of especially useful topics to the folder.
Solid is a new decentralized identity platform from WWW Creator Tim Berners-Lee which provides a mechanism for users to own and better control the usage of their data.
With several large companies trusted with large amounts of user data, and with several high profile data breaches and misuses of consumer data, Berners-Lee writes that:
The changes we’ve managed to bring have created a better and more connected world. But for all the good we’ve achieved, the web has evolved into an engine of inequity and division; swayed by powerful forces who use it for their own agendas. I believe we’ve reached a critical tipping point, and that powerful change for the better is possible — and necessary.
Berners-Lee and colleagues have been working on the open-source Solid project in an attempt to restore the power of individuals on the web.
If useful documentation is so important to the success of projects and developer well-being, why don’t all projects have it? The answer, I believe, is that like good code, good documentation is difficult and time consuming to write.
In my eyes, there are eight rules that we can follow to produce good documentation:
Write documentation that is inviting and clear
Write documentation that is comprehensive, detailing all aspects of the project
Write documentation that is skimmable
Write documentation that offers examples of how to use the software
Write documentation that has repetition, when useful
Developing and deploying applications that communicate in distributed systems, especially in cloud computing, is complex. Messaging has evolved to address the general needs of distributed applications but hasn’t gone far enough. We need a messaging system that takes the next steps to address cloud, edge, and IoT needs. These include ever-increasing scalability requirements in terms of millions, if not billions of endpoints, a new emphasis toward resiliency of the system as a whole over individual components, end-to-end security, and the ability to have a zero-trust system. In this post we’ll discuss the steps NATS is taking to address these needs, leading toward a securely connected world.
Let’s break down the challenges into scalability, resiliency at scale, and security.
Scalability
To support millions, or even billions of endpoints spanning the globe, most architectures would involve a federated approach with many layers filtering up to a control layer, driven by a required central authority for configuration and security. Instead, NATS is taking a distributed and decentralized approach.
A team of security researchers has discovered another serious side-channel vulnerability in Intel CPUs that could allow an attacker to sniff out sensitive protected data, like passwords and cryptographic keys, from other processes running in the same CPU core with simultaneous multi-threading feature enabled.
The vulnerability, codenamed PortSmash (CVE-2018-5407), has joined the list of other dangerous side-channel vulnerabilities discovered in the past year, including Meltdown and Spectre, TLBleed, and Foreshadow.
Mobile apps have been a boon for developers. With Android the most widely used platform on the planet, it makes perfect sense for developers to ply their trade in the mobile market. Not only do developers have the chance to get their work seen, they can make money from the Google Play Store or the iOS App Store. For those who have yet to delve into the mobile development market, however, the process may be a bit daunting. What tools are available? More importantly, what open source tools are available? After all, if you’re developing on the Linux platform, you probably don’t want to work with proprietary software.
So, to get started creating the greatest mobile app on the planet, you need to get the right tools. One such tool is a framework. In programming terms, a framework is an abstraction in which common code (that provides a generic or general functionality) can be used and rewritten to provide a specific functionality. Say you need Function X for your app, but you don’t want to write all the necessary code for that function. You can use a framework that offers Function X and modify that function so it perfectly fits your needs. In other words, a framework is a way to make development easier and more efficient.
Are there open source frameworks available for mobile development? There certainly are. Let’s take a look at two tools available for this particular task.
Ionic
Ionic is both 100 percent free and open source. This project, licensed under MIT, enables you to build fully cross-platform, progressive web and native mobile apps for every major app store… all from a single codebase. You can develop Ionic apps on any platform you like. Of course, our platform of choice is Linux. Fortunately, Ionic offers a simple command-line interface (CLI) that can be used to create, build, test, and deploy your apps to any platform. Ionic also features:
Ionic Native, which allows you to unlock native APIs (and other features), by wrapping Cordova plugins in TypeScript.
Live Reload, which allows you to compile and re-deploy an app at every development step.
Ionicons, which is an icon pack that includes hundreds of the most common app icons (all MIT licensed and ready to use).
Deeplinking, which allow you to start your app from a web link (and can even load a specific view out of the box).
AoT Compiling, which helps your apps to load faster.
Create a free Ionic account here and then install Ionic on your distribution. For example, if you’re using Ubuntu as your development platform, to install Ionic you must first install Node.js and npm like so:
Open a terminal window.
Issue the command sudo apt install curl
Add the necessary repository with the command curl -sL https://deb.nodesource.com/setup_10.x | sudo bash –
Install node.js and npm with the command sudo apt install nodejs
Install Ionic with the command:
sudo npm install -g ionic
You can now begin creating and working with your project. To create a new project, issue the command:
ionic start PROJECT_NAME blank --type ionic1
where PROJECT_NAME is the name of your project. You should see a newly created folder (with the same name as your project), that includes a number of new files and folders (Figure 1).
Figure 1: Creating a new Ionic project.
For more information on using the Ionic CLI, check out the official Ionic Guide.
PhoneGap
PhoneGap is an open source distribution of Adobe Cordova that makes it possible to develop your mobile app using web development technologies (e.g., HTML, CSS, and JavaScript) in just a few minutes. If you don’t want to work from the command line, PhoneGap does offer a desktop app (which is only available for macOS and Windows). The desktop app uses the same libraries found in the CLI, but it makes it a bit less daunting for those who prefer a more point and click-friendly method of app development.
PhoneGap includes the following:
PhoneGap Developer is a mobile app to connect your devices to your development machine (to see changes you make instantly).
PhoneGap Build enables you get app-store ready apps without having to maintain native SDKs for each mobile environment.
Plugin Library gets you access to a robust library of plugins to extend the capability of your mobile apps.
Third party tools is where you can find additional tools, created by the PhoneGap community, to help test, debug, and manage apps.
Developer community allows you to connect to thousands of developers working with PhoneGap.
Mobile App helps you pair your mobile device to the desktop app, so you can preview your new app.
To install the PhoneGap CLI tool, you’ll need jode.js and npm installed (as described above). Once that is taken care of, you can install the PhoneGap CLI tool with the command:
sudo npm install -g phonegap@latest
Once you’ve install the CLI, issue the command phonegapto see the help file (and show that the tool was successfully installed—Figure 2).
Figure 2: The PhoneGap CLI has been installed and is ready to work.
You might find you run into a permissions issue, when running the phonegap command. To resolve that, issue the command:
sudo chown -R USER:USER ~/.config/configstore
Where USER is your Linux username.
You should now be able to create your first project with the command:
phonegap create PROJECT_NAME
Where PROJECT_NAME is the name of your project.
To find out more on how to use the PhoneGap CLI, check out this reference.
There’s more to be found
There are plenty more open source mobile developer frameworks to be found. These two tools, however, can be thought of as a great launching point to help you get started with your mobile development journey. They are certainly not the only players on the field, but offer quite a lot in the way of power, flexibility, and feature sets. Give one of these tools a try and see if it doesn’t empower your mobile app development with the help of open source.
URLify: convert letter sequences into safe URLs with hex equivalents.
This is my 155th column. That means I’ve been writing for Linux Journal for:
$ echo "155/12" | bc
12
No, wait, that’s not right. Let’s try that again:
$ echo "scale=2;155/12" | bc
12.91
Yeah, that many years. Almost 13 years of writing about shell scripts and lightweight programming within the Linux environment. I’ve covered a lot of ground, but I want to go back to something that’s fairly basic and talk about filenames and the web. …
So purely as an exercise in scripting, let’s write a script that converts any string you hand it into a “web-safe” sequence. Before starting, however, pull out a piece of paper and jot down how you’d solve it.
Normalizing Filenames for the Web
My strategy is going to be easy: pull the string apart into individual characters, analyze each character to identify if it’s an alphanumeric, and if it’s not, convert it into its hexadecimal ASCII equivalent, prefacing it with a “%” as needed.
Kubernetes (pronounced koo-ber-NET-eez, from the Greek word for “helmsman” or “pilot”) is the most rapidly adopted open-source project in history since its release in mid-2014. According to 451 Research, it has already moved into more than 70 percent of organizations using the wildly popular software called containers, which Kubernetes manages. Containers make it simple to encapsulate applications in a form that’s easy to run on any computing environment in companies’ data centers or in public clouds. By some estimates, enterprise adoption rate of Kubernetes will reach 90 percent by next year.
The appeal goes beyond just faster software development, though. Kubernetes has been embraced by every major cloud and on-premises infrastructure provider, meaning that software written for it can run practically anywhere. That will put cloud on the fast track to become the default platform for nearly all new software development. It also lowers the barriers to moving software workloads across multiple public and private cloud platforms, giving organizations unprecedented operational flexibility. …
On its face, container orchestration is a topic that only a geek could love. Kubernetes basically automates the process of setting up and managing software containers at very large scale. To understand why that’s a big deal, it helps to know a bit about how software development has evolved.
Never heard of Colorado-based System76? Think of the company as the Linux alternative to boutique PC builders like Digital Storm, Maingear or Falcon Northwest. System76 specializes in preloading laptops, desktops and mini PCs with a Linux operating system, either Ubuntu or its own Pop!_OS distribution. But today marks a dramatic turning point for the company. Where before it traditionally customized systems inside a mass-produced chassis, the new Thelio PCs are a leap forward in originality, built from the ground up with an “open hardware” approach.