Lessons in Linux

THE LINUX TREE OF OPPORTUNITIES

March 20, 2019 by Oliver Bailey

Linux is a virtual tree of opportunity that has grown from a seedling just a few short years ago to a full-grown oak tree with plenty of branches for almost every type of IT career. Take the roots of what Linux is all about, follow the branches of how Linux is used across IT and nurture your career with Linux certifications for future growth and longevity.

Linux Roots Free Open-Source Software (FOSS)

At its core, Linux is open-source software (OSS), which means that anyone can examine, rewrite or study the source code to understand how it is written. You can get involved with development, visit a development wiki or ask questions of the community to better understand almost any area of the Linux operating system. You can also download Linux for free, along with all the tools to compile the system from scratch if you want the ultimate learning experience. And no fees or purchases are required to do any of the above – just your time and internet access. The Linux Evolution Linux is based on AT&T System V UNIX, which was designed to run U.S. telephone and cellular telephone networks. UNIX also provided the world with the C and C++ languages. Although it has been in development since 1991, it took 12 years to get from version 1.0 to 2.0, and the steps made were small compared to the system today. In contrast, Linux version 4.0 was released on April 12, 2015, and version 5.0 is due in 2019. Today, the Linux major release cycle takes only 25 percent of the time it did in the 1990s, a development time improvement of almost 75 percent. Linux Scalability Linux can be installed on any size computer, all from the same source code base. On the small end of the scale, we have the pocket BeagleBone computer, which is the size of a credit card. At the top end, we have an IBM series Z mainframe, which takes anywhere from a large room to a full floor of a building. And yes, Linux runs on the IBM series Z mainframes since kernel version 4.1 was introduced in 2015.

From the router in your basement, to the cable box on your TV to your Smart TV, Linux is there. From high-speed optical switches for long distance call routing to the embedded home monitoring systems, cameras and alarm systems, Linux is there monitoring and controlling homes and businesses all around the world. Linux Powers Communication More than 80 percent of the web servers in the world are driven by Linux. Due to its ability to perform high-speed real-time communications, Linux can operate more cost-effectively and efficiently than most other operating systems. This makes Linux the OS of choice for web servers – and also for Android phones. Linux supports all known communications protocols, including Controller Area Network (CAN), which is the automotive control protocol. Many of the touch screens in today’s automobiles are Linux based. Large machine shops employ Linux CNC as their control software for large machining centers and factory network management. These protocols are also used for the internet of things (IoT) and embedded Linux configuration, setup and troubleshooting. Linux Accessibility For the cost of a PocketBeagle, Raspberry Pi, microSD card, power supply and Debian Linux book ($20.00 used), you can get started with all the hardware you need to build a running Linux system. Add in a few downloads, Debian Linux, compilers, tools and editors – all open source of course – and you have all the hardware and software you need to get hands-on Linux experience that you can apply to a CompTIA Linux+ certification and your IT career. The Branches: How Linux Fits into Your IT Career Because Linux is used in so many different ways, having Linux skills (and certifications) gives you an array of career options, ensuring interesting tasks with the potential to grow into advanced areas of IT or management. You can use Linux in traditional administration or operations or in software development, systems programming, or installation and support of exotic and sophisticated systems. The sky is truly the limit. Here are just a few examples of how Linux is used: • IoT devices, machine tools, cellular networks, industrial lasers and 3-D printers • Embedded Linux development in many industrial and commercial applications, like automobiles, smart meters and industrial controls • CAN protocol, which allows different automobile components to communicate with each other. • Bluetooth used in communication, data streaming, even soil and weather information in agriculture • Artificial intelligence (AI) – advanced RISC Machines (ARM)-based systems with programmable real- time unit subsystems and industrial communication subsystems that provide the foundation for processor-based AI • Even the International Space Station!

Grow in Your IT Career with CompTIA Linux+ With new, exciting and more advanced areas of Linux today than ever before, you can move deeper into science, communications and types of computing that didn’t exist just five years ago. Whether you want to work in cloud computing, engineer embedded Linux systems or design large-scale data centers that manage virtual environments, virtual machines or container-based applications, a certification like CompTIA Linux+ can help you get there. The opportunities for moving into advanced areas of computing, development, IoT or AI can reap both short- and long-term rewards through advanced technology, career growth and higher salaries. Not to mention working on the leading edge of some of the most interesting areas of science. The demand for people with existing skills is high, and getting a Linux certification to validate your skills can enable you to shift into an area of almost unlimited growth, opportunity and professional rewards.

To view this article and others like it visit the IT Career News blog here: The Linux Tree of Opportunity

GETTING STARTED IN A LINUX CAREER

March 27, 2019 by Oliver Bailey

As I mentioned in my previous article, Linux is used in a number of ways across IT. For the IT pro, that translates to a wide variety of career opportunities. Within computer networking and IT infrastructure alone, this remarkable operating system has seen exciting growth. Linux skills can be applied to any number of IT disciplines, so whether you are looking to grow in your current specialty or branch into something new, there are many rewarding opportunities with Linux. Linux in IT Infrastructure – Then and Now Traditional systems operations and administration jobs still need skilled IT pros. And, as in the past, this is a great place to launch a career in Linux. But given that Linux now runs on such a wide variety of platforms, you could work on small or large systems, on mainframes or embedded Linux systems. The point is, the same Linux is used to do many different things. With the expansion of virtualized and cloud computing centers, IT infrastructure has been forever changed. And a third major new infrastructure category is responsible for that change: cybersecurity. This is creating systems administration, operations, support and engineering positions that previously did not exist. For someone just starting a Linux career, understanding machine virtualization and containers provides an exciting new pathway to a systems administration role or to a more technical role in systems, communications or specialized support of the internet of things (IoT) or embedded Linux. Creating and Administering Virtual Machines and Containers Running an application in a container allows for monitored restricted access to resources and keeps the contained application private from the prying eyes of hackers. IT pros may use Linux to configure containers for one or more of the following applications: • Processing credit cards • Managing health care

• Protecting a factory shop floor • Managing a utility or power grid • Routing mass transit • Securing a public building

Building and/or maintaining virtual machines or containers can be very rewarding. You may be designing systems that provide limited accessibility to regular machine resources to avoid tampering. Or you may build the logic to support a heavily used secured environment by cloning a machine or container to keep things running smoothly and minimize access times. Data Center Management and Administration Data center administration can be rewarding and highly visible, and it can be done from the data center or remotely. Monitoring system loads, communications and application execution for a data center involves working with many different groups and being able to diagnose and analyze data from a number of sources. It’s like an air traffic controller for digital flights. It’s fast paced and important work. Application Monitoring and Load Balancing in a Data Center Monitoring and managing virtual machines, containers and applications is a big responsibility and vital to IT today. When application CPU loads get high, a data center operations member can start a new application instance, container or virtual machine to decrease usage. These opportunities create new areas of operations that didn’t exist a few short years ago. Today’s virtual machine managers allow a virtual machine to be relocated, such as to a remote data center, while it’s running. When a virtual machine is operating fully remotely, the local instance can be shut down. Cloud Computing Administration Roles Cloud computing has become a big part of the data center today and beyond. A cloud can be one of many types of remote computing. But all cloud computers are a dedicated system for a person or entity that physically resides within a data center. Each physical machine provides services to many clients – from several hundred to several thousand – within the same hardware. In fact, a cloud may even be a private virtual machine running on a publicly accessible system. Integrating IoT into the Real World One of the highest demand areas today is the need for embedded Linux engineers and IoT setup and configuration engineers. The embedded systems have evolved into the Linux environment, skyrocketing demand almost overnight. Imagine a small Linux server the size of a credit card with a thousand IoT clients that meter water for each house in a city. The setup, configuration and maintenance of this type of server, and the IoT clients it serves, has never existed in traditional IT before. This is just one of thousands of client-server roles that are possible with Linux. And the CompTIA Linux+-certified candidate is just as prepared to set up, manage and troubleshoot this type of environment as they are for the traditional client-server that is used for business processing with human clients. Designing, setting up and administering cloud accounts will never stop, and modifying those accounts to add storage, memory, support tools and applications will never get boring.

In summary, IT pros with CompTIA Linux+ are prepared for a challenging, rewarding and growing career no matter what type of Linux environment they walk in to. And no matter where the Linux computers are located; the data center, the cloud, a factory floor or a municipal water department, they will hit the ground qualified to handle the smallest or biggest Linux systems that exist. The Linux skills acquired today will be needed for decades to come.

To view this article and others like it visit the IT Career News blog here: Getting Started In A Linux Career

LINUX AND CYBERSECURITY: YOUR LINUX SKILLS CAN HELP PROTECT THE WORLD’ S DATA April 10, 2019 by Oliver Bailey

While Linux has long been prevalent in cybersecurity on many routers and hardware firewalls, there are new groundbreaking opportunities that have emerged, and many more that are now in their infancy will be emerging over the next several years. A Fresh Perspective on Linux and Cybersecurity Faster processors, RISC-based architectures and Linux will all factor into groundbreaking techniques to secure data and personal information. With tiny Linux systems embedded into internet of things (IoT) servers that can disappear in the palm of your hand, there is dedicated hardware at both the client and server side. To protect these devices, the networks they attach to and the data they deliver, the development of new security practices and techniques is the only way to assure the safety and security of these device-based networks. Developing AI-Based Intrusion Detection and Countermeasures Often, it’s an end user, administrator or operations professional who finds an anomaly that leads to the discovery of an intrusion. But with Linux-based device networks, the intelligence will have to be developed into the network hardware to find those anomalies through protocol and data validation or machine artificial intelligence (AI). Securing a network from prying eyes and developing the intelligence to detect and counter those attacks will be necessary to prevent breaches that may be short but could expose large amounts of vital data to compromise our everyday way of life. As we gain the ability to hand intrusion detection off to a penetration monitor, the need for protocol development of encrypted messaging and the development of AI-based systems that can recognize and adapt to new intrusion techniques will become a much bigger field. Protecting the Internet of Things IoT is one of the fastest-growing market segments for people skilled in Linux and an area where cybersecurity programs are quickly gaining a very big momentum. It covers everything from home security systems to large-scale power and pipeline control systems, with thousands of IoT systems in between.

The scope of the opportunities in this field are growing daily. Developing high-performance security to protect data and devices from prying eyes adds a new flavor to existing penetration and security testing programs. Since Linux is already the driving force behind the embedded appliance controller, communications transport and embedded servers that manage these devices, IT pros who know Linux have an edge when it comes to growth into and within this field. Security communications engineers, security administration and even security software development will all be growth areas that have previously been non-existent. Embedded Linux Security Opportunities Embedded Linux is one of the hottest growth areas. The same Linux skills that have been used on servers or workstations can now be applied to a computer that fits in the palm of your hand using a small percentage of the resources that a server or desktop computer does. Imagine developing security systems on a computer that boots and runs from a microSD card that has less total memory and storage than that of a desktop computer. New Opportunities in Traditional IT Areas There are still plenty of Linux opportunities for those who wish to work in the more traditional IT environment. Automated security monitoring and audit systems will be in higher demand as the success of applied security AI becomes more widespread. The same techniques will be used to monitor and apply safeguards to the systems we use every day. These systems will quickly recognize suspicious activity and breach attempts. Jobs in developing monitoring techniques, countermeasures to address the threat of immediate breaches or securing data quickly in the event of a breach will all be high-growth areas. And recognizing these attempts earlier will be much more important to securing a system once a breach attempt has been detected. Cloud, Virtual Machine and Container Security With the cloud replacing local storage, monitoring and securing large amounts of data moving between a server, workstation or laptop is vital. Being able to secure the containers or virtual machines where this data originates and keeping out prying eyes while it is being used or transported is becoming a bigger task than ever imagined. Today, these systems require tremendous forethought and architecture, design and review processes frommany points of view. Data used in a container or virtual machine environment needs to be secured in ways that were never thought of before. Android Tablets and Phones More than 2.3 billion Android phones exist in the world today. Android is a graphical user interface (GUI) that runs on top of only one operating system – Linux. The market for Linux security analysts and developers for the Android phone market alone is growing at a very fast pace. While the global Android market is expected to slow over the next few years, new phone hardware and communications systems will keep the demand for skilled IT pros for a long time to come. Cybersecurity and CompTIA Linux+ The opportunities for using Linux in the area of security will continue to grow for years and decades to come. These are just a small sampling of the growth areas that exist today. As devices become smaller

and smaller, new uses will arise – the sky is the limit. With Linux on so many platforms and so scalable, there is no place that Linux isn’t. Linux is everywhere, and validating your Linux skills with CompTIA Linux+ opens many doors for your cybersecurity career.

To view this article and others like it visit the IT Career News blog here: Linux and Cybersecurity: Your Linux Skills Can Help Protect the World's Data

WHY LINUX AND DEVOPS GO HAND IN HAND April 17, 2019 by Oliver Bailey

Linux has had a profound effect on DevOps. It has forced the rethinking of processes and procedures due to the combined scalability, portability and source code that is processor independent from a build, compile, test and deploy perspective. There are tremendous opportunities in a number of DevOps-related career pathways, and having a solid understanding of Linux will set you up for a successful DevOps career. Linux has a number of niche markets that allow IT pros move into specialized areas both vertically and laterally. Careers in the internet of things (IoT), embedded, client-based and server-based Linux systems all benefit equally from a career path oriented around the objectives covered by CompTIA Linux+. But when it comes to DevOps, a Linux career path can traverse the Linux system scalability and portability trees with ease. From small to big scale, small to big data, the traditional functions of DevOps allow IT pros to work in any of these areas or to easily move from one to another. Standardized Build, Compile and Test Processes Because Linux development can be single or multi-architecture, the build and make processes handle single and cross-platform compile and test processes with little to no effort on behalf of the DevOps pro. Through Linux networking, the same processes can be used to patch or deploy almost any application to one or more processor architectures or to one or thousands of Linux servers, workstations or IoT devices just as easily. This is due to how Linux handles development, testing and deployment consistently across all platforms, architectures and all sizes of Linux distributions with only slight differences than what are normally handled in the build processes. Scalability and Portability Across Architectures Unique to the Linux OS, this benefit is possible because the operating system, administration and development processes and procedures are truly scalable and portable thanks to its UNIX roots. This is because a Linux DevOps career path remains focused on portable, scaled development and is hardware and software agnostic. This allows IT pros to focus on the processes and procedures rather than the operating system design, which is ideal and normally almost impossible to accomplish. It also allows for a range of both lateral and vertical career movement offering almost limitless opportunities in the workforce.

If a DevOps pro decides to move on to large-scale systems, like the IBM Z series Mainframes, working for large organizations can easily be the focus for an entire career. That same person could just as easily center their career around the cloud or a large commercial applications development house that focuses on Linux DevOps for virtual machine or container development across many processor architectures. Emerging Opportunities for Linux DevOps Mainframe or Server, Cloud, Virtualization or Containerization, Intel, ARM or MIPS. Mix and match from the above list, and the Linux DevOps career path fits anywhere in the matrix. In more than 40 years of hardware and software development, there has never been a case where these rules could ever be applied. The key is that machine virtualization and full processor emulation are built into and managed by the Linux kernel – unique to commercial-grade operating systems. This allows for cross-platform development from one processor architecture to another. It also means complete development, debugging, testing and deployment for many application types can be done completely on the host system of an Intel- or ARM-based computer and built, tested and deployed to the target systems directly from the host cross-development system. These very features add career doorways that simply have never existed before. The Linux DevOps career path touches every technical area of Linux OS like no other. The growth potential into areas like software developer is natural. But some new areas are emerging that are changing the face of Linux DevOps forever. These new and exciting growth areas are in part due to the reorganizing of the systems development and systems programming processes that have evolved over the past several years. A few years ago, these processes were centralized under the systems group, a carryover from the days of traditional mainframes. And these new Linux DevOps opportunities are growing very quickly, providing secure career growth for years to come. Site Reliability Engineering This is the new decentralized systems group of the 21st century – teams that include software engineers, systems architects, software infrastructure support and systems operations development and support. Linux DevOps specialists are members of these teams. The processes and rules that have been a part of Linux DevOps are still there, but the Linux DevOps specialist now works within a team led by a systems engineer who both collaborates with and leads a team of skilled software developers working in a specialized area – applications for the server, desktop or cloud, device interface applications or specialized database or communications applications that are mission critical and require 100% uptime. This exciting new role allows Linux DevOps pros to work alongside software developers to develop incremental updates that morph an application from one generation to another with no system or application downtime. Production Engineering Similar to site reliability engineering (SRE), production engineering is the core team that updates, modifies, tests and patches the Linux core system, which includes the kernel, device drivers, memory management, and peripheral interfaces, peripheral software subsystems, and real-time monitor and control systems.

These groups, like SRE groups, have a systems core engineer, and the same staff as SRE, but with the responsibility of maintaining the system uptime at 100% by developing and testing patches to the Linux systemwhile it is running. These teams have a Linux DevOps specialist who is responsible for building, testing and deploying core Linux system components to maintain live updates, allowing 100% uptime of all systems and applications relating to these respective systems. It’s an exciting time for Linux DevOps careers – and anyone who wishes to pursue a career in Linux. There are many careers paths that can be pursued with a CompTIA Linux+ certification and other certifications to round out your IT skills. These are just a few of the endless possibilities to explore and grow into Linux over a prosperous lifelong career.

To view this article and others like it visit the IT Career News blog here: Why Linux and DevOPS Go Hand In Hand

THE NEW COMPTIA LINUX+ : YOUR QUESTIONS ANSWERED April 3, 2019 by Kristin Ludwig

From emerging tech and the cloud to cybersecurity and DevOps, Linux is everywhere and used to manage everything from cars and smartphones to servers and supercomputers. This week, CompTIA launched the latest version of CompTIA Linux+ (XK0-004), which was revised in many ways beyond the obvious change from two exams to one. The new CompTIA Linux+ validates the skills you need to use Linux in today’s tech environment in jobs such as systems administrator, network administrator, web administrator, Linux software developers and more.

We know you have questions about the new exam, so we’ve asked Zach Hill from IT Career Questions to help you understand what’s on the new exam and how it will help you in your IT career.

Still have questions? Keep reading to get answers to the questions we’ve been hearing most.

What’s on the new CompTIA Linux+ exam? The new CompTIA Linux+ validates the competencies required of an early career IT professional supporting Linux systems. In addition to topics traditionally associated with systems administration tasks, such as configuring, managing, operating and troubleshooting in a Linux environment, the new exam has an increased focus on the following areas: • Security • Kernel Modules • Storage and virtualization • Enterprise-level device management • DevOps basics, through Git and automation • Networking and firewalls, especially involving security issues • Server side and command line, for server management in a multi-server environment • Troubleshooting • SELinux, with a focus on implementation of this robust security system

Download the exam objectives to find out everything that’s covered.

Why would I choose to take CompTIA Linux+ instead of other Linux certifications? CompTIA Linux+ is the only job-focused Linux certification covering the latest foundational skills demanded by hiring managers. Unlike other certifications, the new exam includes performance-based and multiple-choice questions to identify the employees who can do the job.

The exam covers tasks associated with all major distributions of Linux, setting the foundation for advanced vendor/distro-specific knowledge.

Howmuch does CompTIA Linux+ cost? To earn CompTIA Linux+ (XK0-004), you only need to pass one exam, and thus buy only one exam voucher. The retail price for the CompTIA Linux+ exam is $319. Keep reading to learn more about how you can save by bundling your exam voucher with training products. If you’re buying products outside of a bundle, you can click on the ad on this page to save 10% on one voucher or training product. How can I train for CompTIA Linux+? Start by downloading the exam objectives and practice test to understand what topics are covered and get examples of questions that you might see. You can also work through the self-paced Official CompTIA Linux+ Study Guide. A full suite of CompTIA CertMaster training products are available for CompTIA Linux+, including CompTIA CertMaster Learn, CompTIA CertMaster Labs and CompTIA CertMaster Practice. All are available for purchase from the CompTIA Store. Howmuch time will I need to prepare for CompTIA Linux+? The amount of time you’ll need to prepare for CompTIA Linux+ depends on your background and IT experience. We recommend having 9 to 12 months of hands-on experience working with Linux operating systems before getting certified. Read more about how to save money on your IT certification. Can I still take the CompTIA Linux+ LX0-103/104? Yes, the CompTIA Linux+ (LX0-103/104) will be available until October 1, 2019. Proof of successful completion of CompTIA Linux+ (LX0-103/104) can also be submitted to LPI for LPIC-1 certification (not available with CompTIA Linux+ (XK0-104)). I already passed CompTIA Linux+ LX0-103, but I haven’t taken LX0-104 yet. What should I do? To earn your CompTIA Linux+ certification, you need to successfully complete either LX0-103 and 104 or XK0-004. So, if you’ve already passed LX0-103, continue preparing for and take LX0-104. Just make sure you take your exam before it expires on October 1, 2019. Download the exam objectives to see what you already know and what you might need to work on, and read more about how to prepare for an IT certification exam.

I’ve been studying for CompTIA Linux+ (LX0-103/104). Should I switch gears and study for CompTIA Linux+ (XK0-004) instead? If you’ve been studying for the CompTIA Linux+ (LX0-103/104), we would recommend reviewing the exam objectives to see howmuch of what you’ve already studied is on the new exam. If it makes sense for your time and level of knowledge, you may want to switch gears and prepare for the new exam (XK0-004).

Some of the benefits of taking the new CompTIA Linux+ is that it covers the latest subject matter and it costs less, since you’ll take just one exam instead of two.

Keep in mind that if you choose to pursue LX0-103/104, you must take both exams by October 1, 2019, in order to get your CompTIA Linux+ certification.

To view this article and others like it visit the IT Career News blog here: The New CompTIA Linux+: Your Questions Answered

ALL ABOUT LINUX AND LINUX+ (2019 REFRESH) May 12, 2019 by Jason W. Eckert

What Is Linux? In short, Linux is an open-source, UNIX-like operating system created by Linus Torvalds that runs a plethora of different devices today. When you do your online banking or use Google, Facebook or Twitter, you’re talking to Linux servers in the cloud. In fact, nearly all supercomputers and cloud servers run Linux, as does your Android smartphone and many other devices around your home and workplace, such as firewalls and routers. Even my touch-screen refrigerator, home media center, smart thermostat and in-car GPS run Linux. Open source has been the key to Linux’s success. Software released under an open-source license gives other software developers access to modify the original source code that was used to create the software. This, in turn allows other software developers worldwide to quickly identify and fix bugs and security loopholes, as well as make feature improvements to the software. Consequently, open- source software evolves rapidly, and this is what transformed Linux into the world’s most flexible and powerful operating system since its conception more than 25 years ago. Linus Torvalds and his team still develop the core operating system kernel and libraries. However, software developers worldwide develop the additional open-source libraries and software packages used with the Linux kernel. You may obtain different distributions (or distros) of Linux as a result. All Linux distros share the same kernel and libraries, yet have different software packaged with the kernel. There are hundreds of Linux distributions available – some common ones include Red Hat, Fedora, SuSE, Debian, Ubuntu and CentOS. And don’t forget Android! It’s also important to note that Linux is functionally an open-source UNIX operating system – nearly all of the concepts, commands and files are identical between UNIX and Linux. If you use a Mac computer or iPhone, you are using a flavor of UNIX (macOS X and iOS are both UNIX operating systems), and many embedded systems and large servers still run UNIX today as well (e.g., BSD UNIX, Solaris AIX, QNX). As a result, those who administer Linux systems often administer UNIX systems, and vice versa. Why Should I Get a Linux Certification? For the past two decades, employers have used certification as a skills benchmark for hiring and advancement in the IT industry. Today, Linux certification provides an important skills benchmark for a wide range of different industries and job roles, as illustrated below. And as these industries and job roles continue to grow, so does the need for skilled Linux users, administrators and developers.

What Is CompTIA Linux+? Until recently, CompTIA Linux+ comprised two exams covering the same content as the two exams for the Linux Professional Institute’s (LPI) LPIC-1 (LPI Level 1 - Linux Administrator). However, the latest version of CompTIA Linux+ (XK0-004) is no longer reciprocal with LPIC-1. Instead, it’s a single exam that tests the fundamental usage and administrative tasks that are common to nearly all Linux distributions and UNIX flavors, but with an added focus on security, troubleshooting, server configuration and cloud technologies to match current industry needs. Why Should I Get CompTIA Linux+? 1. You get the industry brand recognition that comes with CompTIA. Many IT managers and human resources departments are very familiar with CompTIA certifications – they know that if the certification ends with a + symbol, it’s a good skills benchmark. 2. The added focus on security, troubleshooting, server configuration and cloud computing better aligns to the job roles that require proficiency in those areas, compared to other, similar Linux certifications on the market. 3. For most jobs involving Linux and/or UNIX, CompTIA Linux+ is the only Linux certification that you will need, as it covers the general administration tasks that most organizations seek when hiring for Linux/UNIX administration positions. Advanced topic areas not tested on Linux+ often involve specialized configuration that is specific to a particular organization and Linux distribution or UNIX flavor. Those who have a working knowledge of the general administration concepts tested on CompTIA Linux+ can easily research and perform these advanced configuration tasks as necessary.

To view this article and others like it visit the IT Career News blog here: All About Linux and Linux+ 2019 Refresh

TALK TECH TO ME : MANAGING LINUX SHELL SCRIPTS USING GIT May 13, 2019 by Jason W. Eckert

Most Linux administrators today create a plethora of different shell scripts to automate system administration tasks on their servers. However, it can be challenging to coordinate and keep track of all of the different shell scripts on a large number of different systems or locate and copy the right shell scripts to a newly provisioned server. You can use Git to centrally store a master copy of your shell scripts and organize the changes that you and your fellow administrators make across multiple servers. What Is Git? Git is a version control system that can be used to keep track of the changes you make to files over time – it allows you to revert files to a previous state or see who made changes to a file at different times if several people are working the those files collaboratively. Git was originally developed in 2005 by Linus Torvalds (the creator of Linux) to aid in making changes to the Linux kernel, but has since become the most common open-source version control system used today. You can run Git on most platforms, including Windows, Linux and macOS. Although people primarily use it for version controlling software projects, you can use it to provide version control for any files on your system. In this post, we’ll use it to provide version control and central access for Linux shell scripts. How to Use Git for Local Version Control Git essentially takes snapshots (called commits ) of the files that you have within a particular folder (called a repository , or repo ) on your system.

Each commit contains the changes you’ve made to the files since the last commit, so you can easily rollback those changes (much like a Windows System Restore point).

git config Before you use Git to create commits, you must first tell Git about yourself using the git config command, since that information must be added to each commit that you create: [jason.eckert@csc-studev01 myscripts]$ git config --global user.name “Jason Eckert” [jason.eckert@csc-studev01 myscripts]$ git config --global user.email “jasonec@trios.com” To turn an existing folder into a Git repo, simply use the git init command.

For example, if you are in the myscripts directory under your home directory on a Linux system, you could run the following commands to turn the myscripts directory into a Git repo (this will also create a hidden .git folder underneath the myscripts directory):

[jason.eckert@csc-studev01 ~]$ pwd /home/jason.eckert

[jason.eckert@csc-studev01 ~]$ cd myscripts/ [jason.eckert@csc-studev01 myscripts]$ pwd /home/jason.eckert/myscripts [jason.eckert@csc-studev01 myscripts]$ ls chownscript.sh filemaintain.sh newuserscript.sh seccheck.sh sysusage.sh [jason.eckert@csc-studev01 myscripts]$ git init Initialized empty Git repository in /home/jason.eckert/myscripts/.git/ [jason.eckert@csc-studev01 myscripts]$ git status On branch master

Initial commit

Untracked files: (use “git add ...” to include in what will be committed)

chownscript.sh filemaintain.sh newuserscript.sh

seccheck.sh sysusage.sh

nothing added to commit but untracked files present (use “git add” to track) [jason.eckert@csc-studev01 myscripts]$ _

Notice that the git status command above listed the files in the myscripts directory, but said that they were untracked – this is normal, because Git doesn’t assume you want everything version controlled. After creating a Git repo, you have to tell Git which files you want to version control by staging them with the git add command. Staging simply adds the files to an index that represents the files that Git can take a snapshot/commit of. git commit After the files have been staged, you can take snapshots of them using the git commit command. The following commands stage all the files in the myscripts folder using the * wildcard (because I’m lazy), shows that they are ready for committing and then creates a new commit with the description “My first commit”:

[jason.eckert@csc-studev01 myscripts]$ git add * [jason.eckert@csc-studev01 myscripts]$ git status On branch master

Initial commit

Changes to be committed: (use “git rm --cached ...” to unstage)

new file: chownscript.sh new file: filemaintain.sh new file: newuserscript.sh

new file: seccheck.sh new file: sysusage.sh

[jason.eckert@csc-studev01 myscripts]$ git commit -m “My first commit” [master (root-commit) 53f9566] My first commit 5 files changed, 60 insertions(+)

create mode 100755 chownscript.sh create mode 100644 filemaintain.sh create mode 100755 newuserscript.sh create mode 100644 seccheck.sh create mode 100644 sysusage.sh [jason.eckert@csc-studev01 myscripts]$ _

Next, let’s modify the filemaintain.sh shell script using the vi editor, see that Git detected the modification, stage the files in our repo again and create a new commit using an appropriate description of the changes that we made (in this example, I added XFS checking to the script): [jason.eckert@csc-studev01 myscripts]$ vi filemaintain.sh [jason.eckert@csc-studev01 myscripts]$ git status

On branch master

Changes not staged for commit: (use “git add ...” to update what will be committed) (use “git checkout -- ...” to discard changes in working directory)

modified: filemaintain.sh

no changes added to commit (use “git add” and/or “git commit -a”) [jason.eckert@csc-studev01 myscripts]$ git add * [jason.eckert@csc-studev01 myscripts]$ git commit -m “Added XFS checking to filemaintain.sh” [master 08e7f90] Added XFS checking to filemaintain.sh 1 file changed, 1 insertion(+) [jason.eckert@csc-studev01 myscripts]$ _ git log To see a list of all commits (and who made them), you can use the git log command, and to rollback to a previous version of the file, you can use the git reset --hard command. Say, for example, that I didn’t like the XFS checking additions I made to filemaintain.sh and wanted to roll it back to the previous version. To see all the changes I made to the files in my repo and rollback the change to “My first commit”, I could use the following commands. (HEAD is simply a reference to the most recent commit):

[jason.eckert@csc-studev01 myscripts]$ git log commit 08e7f90fd4c1820eab77968ee98c8a7682c43aa8 Author: Jason Eckert Date: Mon Aug 13 14:54:20 2018 -0400

Added XFS checking to filemaintain.sh

commit 53f95663c4a9f5b53f5ee8b86b91024fd9e1fc9a Author: Jason Eckert Date: Mon Aug 13 14:53:05 2018 -0400

My first commit [jason.eckert@csc-studev01 myscripts]$ git reset --hard 53f95663c4a9f5b53f5ee8b86b91024fd9e1fc9a HEAD is now at 53f9566 My first commit [jason.eckert@csc-studev01 myscripts]$ git log commit 53f95663c4a9f5b53f5ee8b86b91024fd9e1fc9a Author: Jason Eckert Date: Mon Aug 13 14:53:05 2018 -0400 My first commit [jason.eckert@csc-studev01 myscripts]$ _ If I view the filemaintain.sh script now, the XFS stuff I added will no longer be there! Git Commands to Know Here is a summary of git commands that you should find useful at this point: • git config = Sets general Git parameters like username and email • git init = Creates a Git repo within the current directory (also creates .git folder) • git add = Adds the specified filenames to the Git index (called staging) • git rm = Removes the specified filenames from the Git index • git commit -m = Creates a snapshot/commit with a specified description • git status = Views the status of a repo • git log = Views the commit history of a repo • git reset --hard = Reverts files within a repo to a previous commit Using Git to Collaborate While we just saw how Git can perform version control for your local files and how other users can download (or clone) copies of your Git repos on the same computer or across a network (LAN or Internet). Those users can then create commits periodically after making changes to the files in their cloned repo and push those changes back to your original repo. Any computer running Git can clone a Git repo from any other computer running Git, regardless of the operating system used. There are many free sites you can use to host Git repos online, including GitHub and GitLab. Look back at the output of the git status command from earlier, and you will notice it names you as the “On branch master.” A branch is simply a section of your Git repo, much like the different partitions on a hard disk. Any changes you make to an original or cloned Git repo are part of the master branch by default. But you can create as many other branches as you like to store changes that you may want to experiment with. Once you are satisfied that the changes work as you expected, you can merge the changes you made in your branch with the files in the master branch. Normally, you maintain an original repo on your computer that other users download (clone). Rather than modifying the master branch on their cloned copy, other users would typically create separate branches on their cloned copy to test their modifications and perform commits as necessary.

Once the modifications are working well, they can upload (push) the branch to the original repo on your computer where you can view the changes and merge them into the master branch. Once there’s an updated master branch on the original repo, others can then download (pull) a fresh copy of the master branch to get the new changes. Root Users Let’s experiment with this using another user (root) on the same computer – the only requirement is that the other user has read/write access to your repo folder. The following commands run by the root user (the other user) create a cloned copy of the myscripts repo (/home/jason.eckert/myscripts) within the root user’s home directory (/root) using the git clone command: [root@csc-studev01 myscripts]# pwd /root [root@csc-studev01 ~]# git clone /home/jason.eckert/myscripts/ Cloning into ‘myscripts’... done.

[root@csc-studev01 ~]# cd myscripts/ [root@csc-studev01 myscripts]# pwd /root/myscripts [root@csc-studev01 myscripts]# ls chownscript.sh filemaintain.sh newuserscript.sh seccheck.sh sysusage.sh [root@csc-studev01 myscripts]# _

If you were cloning this from another computer, you’d have to use git clone username@hostname:/ path instead. For example, to clone this repo on triosdevelopers.com to your local computer, you’d have to use the command git clone root@triosdevelopers.com:/home/jason.eckert/myscripts/ and supply the root user’s password when prompted.

Now, let’s make a branch called AddSIEM that we can use to test out adding security information and event management (SIEM) functionality to our seccheck.sh script and view our branch when finished:

[root@csc-studev01 myscripts]# git checkout -b AddSIEM Switched to a new branch ‘AddSIEM’ [root@csc-studev01 myscripts]# git branch * AddSIEM master [root@csc-studev01 myscripts]# _

Notice that the git branch command indicates that AddSIEM is our current branch (*). Now, let’s modify the script, view the modification, stage and commit it:

[root@csc-studev01 myscripts]# vi seccheck.sh [root@csc-studev01 myscripts]# git status On branch AddSIEM Changes not staged for commit: (use “git add ...” to update what will be committed) (use “git checkout -- ...” to discard changes in working directory)

modified: seccheck.sh

no changes added to commit (use “git add” and/or “git commit -a”) [root@csc-studev01 myscripts]# git add * [root@csc-studev01 myscripts]# git commit -m “Added SIEM to seccheck.sh” [AddSIEM e94d34e] Added SIEM to seccheck.sh 1 file changed, 1 insertion(+), 1 deletion(-) [root@csc-studev01 myscripts]# _

At this point, you’ve modified the seccheck.sh script in the AddSIEM branch only. If you switched back to the master branch in your cloned repo using the git checkout master command and viewed the seccheck.sh file, you’d see that your changes are not there! That’s because they are only shown in the AddSIEM branch. Now, let’s push our branch to the original repo. Luckily, you don’t have to remember the location of the original repo, because after you clone a repo, Git remembers the original location and allows you to use the word “origin” to refer to it:

[root@csc-studev01 myscripts]# git push origin AddSIEM Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 293 bytes | 0 bytes/s, done.

Total 3 (delta 2), reused 0 (delta 0) To /home/jason.eckert/myscripts/ * [new branch] AddSIEM -> AddSIEM [root@csc-studev01 myscripts]# _

This uploaded the AddSIEM branch from the cloned repo (in /root/myscripts) to the original repo (in / home/jason.eckert/myscripts). Let’s switch back to the jason.eckert user and see if the branch was successfully uploaded to the original repo with the git branch command, and then merge the changes in the AddSIEM branch with our current branch (master) using the git merge command:

[jason.eckert@csc-studev01 myscripts]$ git branch AddSIEM * master [jason.eckert@csc-studev01 myscripts]$ git merge AddSIEM Updating 53f9566..e94d34e Fast-forward seccheck.sh | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-) [jason.eckert@csc-studev01 myscripts]$ _

That’s it! Now, other users who have a cloned copy of the original repo can run git pull origin master to download an updated (merged) copy of the master branch from the original location that has the new SIEM feature.

Let’s switch back to the cloned repo in the root user’s home directory and do this: [root@csc-studev01 myscripts]# git pull origin master

From /home/jason.eckert/myscripts * branch master -> FETCH_HEAD 53f9566..e94d34e master -> origin/master

Already up-to-date. [root@csc-studev01 myscripts]# _

For all newmodifications made by other users we simply repeat this process. Now, imagine that you have a repository on a server that contains a central copy of all the shell scripts that can be used on other Linux servers within your organization: • Linux administrators can clone the repo on the other Linux servers (or pull an updated copy of the master branch), create a new branch to store any modifications to the shell scripts and perform commits in this branch as necessary. • Once the Linux administrators are happy with the changes, they can push the branch to the original repo, where it can be viewed by others and merged into the master branch. More Git Commands to Know Here is a summary of git commands that you should find useful at this point: • git clone /path = Clones a local Git repo to the current directory • git clone username@hostname:/path = Clones a remote Git repo to the current directory • git checkout -b = Creates a new branch, and switches to it • git checkout = Switches to a different branch • git branch = Views branches in the repo • git branch -d = Deletes a branch

• git push origin = Pushes a branch to the original repo location • git pull origin = Pulls a branch from the original repo location

How to Use Online Git Repositories to Centrally Store Shell Scripts

Well, that’s easier than you think!

1. Go to GitHub.com and create a free account. 2. Create a new public repository called myscripts.

Finally, on your local computer, you can run the following commands to push the contents of your repo to GitHub and set GitHub as the original repo (which turns your local computer’s repo into a cloned copy from that point onward).

cd /path/to/repo git remote add origin https://github.com/accountname/nameofGitHubrepo.git

But you don’t have to remember these commands because when you create a new repo within GitHub, it gives you the commands at the bottom of the screen.

Now, in my example above, I can go to any Linux server and type git clone https://github.com/ jasoneckert/myscripts.git to clone the original repo to obtain the central copy of the shell scripts. And I can optionally make branches, do commits, push those commits back to GitHub (you’ll be prompted for your account password) and merge them into the master branch on GitHub!

To view this article and others like it visit the IT Career News blog here: Talk Tech To Me: Managing Linux Shell Script Using GIT

HOW TO LEARN LINUX July 19, 2019 by Priyanka Sarangabany

There’s no doubt that Linux is quickly becoming a powerful force in the IT industry. In fact, you’re probably using Linux without even knowing it! From smartphones and home media centers to smart thermostats and in-car GPS systems, this open-source operating system is quietly running nearly all supercomputers and cloud servers that power our daily lives.

With such a significant impact on the computing industry, it’s easy to understand why Linux has become a core skill for IT professionals.

Why Is Linux So Prevalent? There are multiple reasons why Linux is considered one of the most diverse and powerful operating systems in the world. To understand why Linux is loved by many, it is important to identify its defining characteristics. •  Open Source: As Denise Dumas, the vice president of software engineering and operating systems at Red Hat, said in a recent CompTIA webinar about Linux, “Open source is a place where innovation ferments and happens.” When software is released under an open source license, people can view and build upon the software’s original source code. This feature encourages software developers to adopt Linux and apply their own improvements to the code. As result, Linux’s public domain drives constant evolution and advancement. • UNIX-Like System: Linux behaves in a similar manner to a Unix system. This means that the operating system relies on multiple parts/programs that carry out specific jobs collectively. This is a fundamental principle of good system design and is at the core of what makes Linux so great. •  Stable: As a public domain that is constantly evolving, Linux remains an incredibly secure operating system. In the words of Eric S. Raymond, “Given enough eyeballs, all bugs are shallow.” Linux’s general public license allows a plethora of software developers to rapidly identify issues in code and just as quickly respond to fix the errors. • Free: Linux is priceless. Literally! The underlying software of Linux has been free to download and install since its creation. For this reason, Linux remains one of the most accessible, diverse operating systems to this day. Essential Linux Skills But what skills do you need to understand how to navigate around a Linux system? Starting first with a desire to learn, you can begin improving upon the following skills:

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 Page 10 Page 11 Page 12 Page 13 Page 14 Page 15 Page 16 Page 17 Page 18 Page 19 Page 20 Page 21 Page 22 Page 23 Page 24 Page 25 Page 26 Page 27

www.comptia.org

Made with FlippingBook Online document