Pass the LPI Linux Essentials Exam and Fast-Track Your IT Career.
Unlock the door to a thriving IT career with this all-inclusive LPI Linux Essentials Certification Course. Designed for complete beginners, this course provides a solid foundation in Linux, preparing you to ace the LPI Linux Essentials Certification exam (010-160) on your first attempt.
Why Take This Course?
Pass the LPI Linux Essentials Exam and Fast-Track Your IT Career.
Unlock the door to a thriving IT career with this all-inclusive LPI Linux Essentials Certification Course. Designed for complete beginners, this course provides a solid foundation in Linux, preparing you to ace the LPI Linux Essentials Certification exam (010-160) on your first attempt.
Why Take This Course?
Certification Success: Equip yourself with the knowledge and strategies to confidently pass the LPI Linux Essentials Certification exam.
Hands-On Learning: Dive deep into Linux fundamentals with practical demonstrations on Debian/Ubuntu and RedHat/Fedora systems.
Comprehensive Coverage: From understanding open-source software and licensing to mastering the command line, we've got you covered.
Expert Instruction: Learn from an industry professional with decades of experience in Linux and open-source technologies.
Career Advancement: Validate your skills and stand out in the competitive IT job market.
What You'll Learn:
Linux Fundamentals: Explore the history of Linux and its role in today's technology landscape.
Software Installation: Master package management and software installation across different Linux distributions.
File Management: Navigate the Linux file system and efficiently manage files and directories.
User and Group Management: Set up and manage users, groups, and permissions to secure your system.
Command-Line Proficiency: Harness powerful command-line tools to automate tasks and enhance productivity.
Networking and Security: Build a solid foundation in networking concepts and learn essential security practices.
Who Should Enroll?
Aspiring IT Professionals: Kickstart your career by gaining essential Linux skills.
Certification Seekers: Anyone aiming to obtain the LPI Linux Essentials Certification.
Complete Beginners: No prior Linux experience needed—we start from the ground up.
Career Changers: Transition into tech roles with confidence and validated skills.
Tech Enthusiasts: Deepen your understanding of Linux and open-source applications.
Take the Next Step
Linux skills are in high demand. Whether you're starting your IT journey or looking to validate your expertise, this course is your gateway to success.
Enroll Now and Become a Certified Linux Professional.
This comprehensive, 482-page study guide covers all LPI Linux Essentials exam topics in detail. It features quizzes throughout for reinforcement, and includes two full practice exams to help you assess your readiness.
Use this lesson to download the slides used in this course. This is perfect for note-taking, references, and offline access.
This lesson provides an overview of Linux, focusing on its distributions, the significance of the Linux kernel, the utility of Linux in embedded systems, and its pivotal role in cloud computing. It's designed to equip learners with a solid foundation in understanding what Linux is, the variety of Linux distributions (like Debian, Ubuntu, Red Hat, CentOS), and how these distributions are applied in different environments, including on servers, desktops, and embedded systems such as Raspberry Pi and Android devices.
In this lesson, you will learn:
- Linux is technically a kernel, which is a core component of an operating system (OS) that interacts directly with hardware.
- The Linux kernel serves as an intermediary between the hardware and the applications running on it, handling direct communication with the hardware.
- The Linux kernel facilitates simplified interaction between applications and different types of hardware, like the sound card.
- While Linux refers to the kernel, it's common for people to describe the Linux distribution, which includes the Linux kernel and a set of software, as Linux.
- An OS, such as a Linux distribution, manages hardware resources and provides an environment for applications to run.
- A Linux distribution, also known as a "distro" or "flavor," varies based on the pre-installed software, such as different web browsers.
- Users modify the default software on a Linux distribution, creating a curated collection of preferred applications.
- This lesson does not provide specific examples of Linux distributions, distros, or flavors.
In this lesson, you will learn:
- Red Hat Enterprise Linux (RHEL) is a major and popular Linux distribution.
- Red Hat utilizes the RPM package format, where RPM stands for Red Hat Package Manager.
- Prior to recent updates, the YUM package manager and command line tool are used to install, update, and remove RPM packages on Red Hat.
- In newer versions of Red Hat, DNF replaced YUM as the package manager.
- The DNF command is now used instead of YUM to handle RPM packages.
- Linux distributions that are based on, derivatives of, or descendants from Red Hat are known as Red Hat-based distributions.
- Examples of Red Hat-based distributions include Scientific Linux, Fedora, CentOS, Oracle Linux, Alma Linux, and Rocky Linux.
In this lesson, you will learn:
- Debian is a major and popular Linux distribution.
- Debian introduced the .deb package format and the apt package manager, a command line tool for managing packages in Debian Linux.
- Apt is used in the installation, updating, and removal of Debian packages.
- Many Linux distributions are based on Debian and therefore referred to as Debian-based distros. Examples include Ubuntu, Linux Mint, Pop!OS, MX Linux, Zorin OS, Linux Lite, and elementary OS.
- Ubuntu, one of the most popular Debian-based distros, releases new versions semi-annually, typically in April and October.
- Ubuntu version numbers reflect the release year and month (e.g., Ubuntu 22.04 released in April 2022).
- Ubuntu releases two types of version: Long-Term Support (LTS) and non-LTS. LTS releases occur biennially and receive five years of support after their release, while non-LTS releases are supported for nine months post-release.
- LTS releases are typically used in enterprise environments requiring long-term stability and support.
- Non-LTS releases, containing newer features and software versions not yet available in LTS releases, are more desirable in personal use or situations where the latest features outweigh long-term support.
In this lesson, you will learn:
- When downloading or installing Linux distributions, you have two primary options: Desktop and Server.
- The main difference between a Desktop and a Server distribution is the user interface.
- Desktop distributions include a graphical user interface and applications for general computing tasks such as web browsing and document editing.
- Desktop distributions are usually used by individuals for personal or work use.
- Conversely, server distributions do not include a graphical user interface by default, focusing instead on hosting websites, running databases, and other server-related tasks.
- This efficiency is achieved by not installing and running a graphical user interface.
- Linux system administrators typically access servers through a command-line interface, using text-based commands for configuring and managing the server, removing the need for a graphical user interface.
In this lesson, you will learn:
- Raspbian is a Linux distribution based on Debian and optimized for Raspberry Pi hardware.
- Raspberry Pi is an affordable single-board computer popular for a variety of projects.
- Not all Linux distributions are based on Debian or Red Hat.
- SUSE Linux Enterprise Server (SLES) is an independent commercial distribution designed for enterprise environments, requiring a paid subscription for official support.
- OpenSUSE is a free, community-driven distribution based on SUSE.
- Android, developed by Google for mobile devices, uses a Linux kernel but is not based on either Debian or Red Hat.
- Android is common on Samsung or Google devices.
In this lesson, you will learn:
- Embedded systems are specialized computing devices carrying out specific functions within a larger system.
- Smart TVs are an example of an embedded system, they use a Linux kernel to offer features such as internet connectivity and running applications such as Netflix.
- Tesla vehicle's in-car infotainment system is another example of an embedded system using a Linux kernel.
- Other devices using Linux embedded systems include refrigerators, washing machines, medical devices, networking equipment, security systems, streaming devices like Roku, drones, robots, game consoles, cash registers, and airplanes.
In this lesson, you will learn:
- The cloud refers to a set of servers or computers owned by a third party, accessed over the internet.
- Cloud servers are rented to run software and store data, avoiding the need for owning, managing, and maintaining physical servers.
- Cloud service providers such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) own and operate numerous powerful servers.
- These physical servers utilize Linux and can simulate smaller servers, known as virtual machines (VMs) or instances.
- Each VM or instance has its own CPU, memory, and storage, similar to a physical computer, but the resources are virtual.
- Users can deploy and use these VMs as if they were their own computer and typically install Linux distros as their operating systems.
- Cloud service providers extend beyond VMs to include things such as storage services, database services, etc.
- Using these services, such as a cloud database, eliminates the need for users to manage the underlying Linux distribution, although the majority of these services still run on Linux.
- Linux is critical to cloud computing as most cloud providers run on Linux-based servers, deploy Linux-based VMs, and provide services running on Linux.
In this lesson, you will learn:
- The Linux kernel is the vital part of an operating system that interacts directly with the hardware.
- It acts as an intermediary between software applications and computer hardware, ensuring effective communication.
- A Linux distribution (distro or flavor) is an operating system that uses the Linux kernel; examples include Red Hat Enterprise Linux (RHEL), Debian, and Ubuntu.
- Distros may differ based on the included software packages and package management systems.
- Embedded systems are dedicated computing devices within larger systems.
- Linux is commonly used in embedded systems due to its versatility and adaptability. It's used in smart TVs, appliances, cars, etc.
- Linux is crucial within cloud computing and is used by major cloud providers such as Amazon Web Services, Microsoft Azure, and Google Cloud Platform.
- Virtual machines deployed on these cloud platforms often run Linux distributions, highlighting Linux's importance in the cloud.
This comprehensive lesson focuses on the fundamentals of open source applications within the Linux environment. It begins by clarifying what applications and open-source software are, emphasizing the contrast between proprietary and open-source models. The lesson highlights the significance of open-source software, offering users the ability to view, modify, and enhance the software according to their needs, a principle strongly advocated by Linux Torvalds, the founder of Linux.
The lesson covers a broad spectrum of applications, from desktop environments like Gnome and KDE Plasma to various Linux-compatible software categories including office suites (LibreOffice), email clients (Thunderbird), web browsers (Firefox and Chromium), and multimedia tools (GIMP, Inkscape, Blender, Audacity). It also delves into server applications, discussing web servers (Nginx, Apache HTTPD), database servers (MySQL, MariaDB), and networking tools.
An important part of the lesson is dedicated to understanding package management on Linux, illustrating how to use commands associated with different Linux distributions to install, update, and remove software packages. This includes a hands-on demonstration using the terminal in Ubuntu and Fedora systems, showcasing real-world applications of the commands.
In this lesson, you will learn:
- Computers can be set up either as desktops or servers, with machines capable of serving both functions.
- Desktops usually have a graphical user interface (GUI) and are equipped with tools needed by the primary user.
- Servers provide services like database services, web services, and storage, usually via a network or the internet to multiple users. They are often managed remotely via a command line interface (CLI) and may not have a GUI installed.
- GUIs, also known as desktop environments, manage user desktop display and respond to requests to run other programs.
- Linux allows users to select from different desktop environments during installation, with Gnome and KDE Plasma being notable examples.
- Different distributions may or may not include a desktop environment by default.
- LibreOffice is the most popular office suite for Linux, consisting of applications parallel to Microsoft Office, such as Writer, Calc, Impress, Draw, Base, Charts, and Math.
- Thunderbird is the most notable email client for Linux, supported by Mozilla and inclusive of features like calendars, task management, and chat.
- Evolution is another popular Linux email client, often used by enterprise users and substitutes Microsoft Outlook.
- Firefox and Chromium are the most popular web browsers on Linux, used for interaction with websites and local information processing.
- Linux distributions offer multimedia tools available in their repositories, including GIMP (similar to Adobe Photoshop), Inkscape, Blender, Audacity, and ImageMagick.
- Users can explore their distribution's repository and community repositories for more free applications.
In this lesson, you will learn:
- Linux servers offer many free tools, applications, and services.
- Web servers are responsible for serving HTML content; these can be for static or dynamic web pages.
- Static web pages display the same content to every visitor without the need for additional processing. A news article is an example.
- Dynamic web pages are generated real time based on user input or other data and are created using server-side scripting languages such as PHP, Python, Perl, or Java.
- NGINX and Apache's HTTP server are popular web servers used on Linux. Apache offers flexibility and has an extensive feature set, while NGINX is known for performance.
- Database server software like MySQL and MariaDB are used to store, organize, and retrieve data. Optional GUI-based tools are available for managing and using MySQL databases.
- Oracle offers two editions of MySQL, the open source and free Community Edition and the commercial Enterprise Edition.
- PostgreSQL, an advanced, open source RDBMS known for its robustness and scalability, is another stable database solution for Linux.
- Linux systems can share files and directories using protocols such as NFS or Network File System Protocol for Linux servers, or Samba for cross-platform sharing with Windows and macOS.
- OwnCloud and NextCloud are open source, self-hosted cloud storage solutions for Linux that serve as alternatives to commercial services like Dropbox or Google Drive.
- Linux servers can also perform network administration, including running a DHCP service for managing IP addresses on a network and DNS, the Domain Name System.
In this lesson you will learn:
- Linux is popular among software developers due to the availability of various tools for programming.
- Commonly used programming languages in Linux environments include C, Java, JavaScript, Perl, Shell, Python, and PHP.
- The Linux kernel primarily uses the C programming language, and a C language compiler and libraries are usually included by default.
- C language enables code writing for various operating systems but needs to be compiled for each specific platform.
- Java, another widely used language on Linux, is known for portability and can run on multiple operating systems without modification.
- A C program needs to be compiled into the native code for each operating system, while Java files are universally compatible.
- Despite similarities in names, Java and JavaScript are different languages.
- JavaScript, once primarily used for web page functionalities, has evolved into a language capable of creating entire applications.
- Perl is appreciated for processing and transforming textual data, especially with its powerful regular expression capabilities.
- Regular expressions in Perl work as a smart, flexible search and replace tool, ideal for tasks involving text filtering, parsing, and manipulation.
In this lesson, you will learn:
- Linux distributions come with a default set of software, and additional software can be accessed from the distribution software repository.
- Linux uses a package manager to install, update, and remove applications, as well as keep track of version and dependencies.
- Packages requiring specific libraries or components are automatically downloaded and installed by the package manager.
- Each major Linux distribution has unique package manager tools and commands.
- Red Hat Linux, CentOS, Oracle Linux and Fedora use the rpm, yum, and dnf commands to manage software.
- The 'rpm' command does not perform dependency resolution; users are responsible for ensuring dependencies are satisfied.
- The 'dnf' command, a higher-level tool, does perform dependency resolution and installs necessary packages.
- 'dnf' also sources packages directly from online repositories, eliminating the need for users to download software first.
- Older Red Hat systems may not have the 'dnf' command available, in such cases, users will need to use the original package manager.
In this lesson, you will learn:
- The Ubuntu system's Graphical User Interface (GUI) appearance varies with time, but the basic concepts stay the same.
- A terminal can be opened from the desktop environment by clicking on show applications button (which looks like a grid) at the bottom left and searching for 'terminal'.
- The terminal can be launched by clicking on the application named 'terminal' or hitting enter when it's highlighted.
- The Linux command line can be accessed via the terminal, giving users the benefit of using GUI and command line simultaneously.
- The 'apt' command is used to search for software on a Debian-based system like Ubuntu. For instance, typing 'apt search audacity' will list applications related to Audacity (audio editing software).
- To install a software, the command 'sudo' (superuser do) is prefixed. The sudo command needs the user to have superuser privileges, and prompts for a password to execute the command.
- The apt command shows all programs it will install, the required disk space, and asks for a confirmation to proceed.
- After successful installation, the software (e.g., Audacity) can be located through the show applications menu.
- To uninstall a software, run 'sudo apt remove' followed by the software name (for example, 'sudo apt remove audacity'). The software then can no longer be found in the applications list.
- The shift from Ubuntu-based system to a Red Hat Linux distribution is hinted.
In this lesson, you will learn:
- The user is on Fedora, a Red Hat-based Linux distribution, and is demonstrating how to install Audacity.
- The Fedora graphical user interface is slightly different from Ubuntu's but works similarly.
- Applications can be accessed by clicking on the top left corner of the screen.
- Applications can also be located by typing on the screen or via the show applications menu.
- To start an application, you can simply click on its icon or type its name.
- The terminal application can be launched by typing 'terminal.'
- Software management on a Red Hat-based distribution is performed using the DNF command.
- The user displays how to search for, install, and remove Audacity using the DNF command by typing 'sudo dnf install audacity' and 'sudo dnf remove audacity' respectively.
- The user highlights the need for administrative privileges and a password to install software.
- After successful installation, Audacity is launched via the show applications menu.
- The user affirms that the command line isn't necessary for installing applications on Linux distributions.
- Fedora has an app store-like application for easy software installation.
- To use the app store-like application, it shows typing 'software' brings up an app store with different categories and recommended applications.
- To demonstrate, the user installs GIMP (GNU Image Manipulation Program) using the app store-like application.
- Any application can be searched for and installed using this graphical user interface.
In this lesson, you will learn:
- The lesson covered Linux desktop applications such as LibreOffice, OpenOffice, Thunderbird for emails, Firefox for web browsing, and GIMP for image editing.
- Discussed cloud storage platforms, Nextcloud and Owncloud.
- Explained web servers, specifically Apache HTTP server and Nginx.
- Detailed database servers: MariaDB and MySQL.
- Learnt about NFS for sharing files between Linux systems and Samba for sharing between Linux and Windows systems.
- Introduced several programming languages used on Linux: C, Java, JavaScript, Perl, Shell or Bash, Python, and PHP.
- Discussed managing Linux packages with tools: RPM, YUM, and DNF for Red Hat based distros, and DPKG and APT for Debian based distros.
In this lesson, you will learn:
- Free and open source software (FOSS) is software that is freely distributed, allowing users to use, study, modify, and redistribute it.
- Richard Stallman started the GNU project to create a Unix-like operating system that was free of restrictions and fostered this open-source philosophy.
- Linux, created by Linus Torvalds, is an example of a free Unix-compatible operating system that was later combined with GNU tools to make a complete operating system.
- Major corporations such as IBM, Google, and Intel help in the development of Linux.
- The term "free" in this context doesn't refer to cost, but to the freedom to use, study, change and distribute the software; the term "Libra" is becoming more commonly used to clarify this.
- There are different schools of thought on software development and distribution; proprietary software is commercial and keeps its source code private, while the free software movement and open source initiative advocate for software to be freely shared.
- Software licenses define the terms under which software can be used, modified, and distributed, and include mechanisms such as software copyright and copyleft.
- Common open-source licenses include GNU licenses, the Berkeley Software Distribution (BSD) license, the Apache license, and Creative Commons licenses.
- Despite being often free of charge, open-source software can be monetized through several business models such as crowdfunding and pre-sales, dual licensing, services, Software as a Service (SaaS), peripheral monetization, and obtaining grants, donations, and sponsorships.
- FOSS promotes the four freedoms of running the software for any purpose, studying and changing the source code, redistributing exact copies, and distributing modified versions.
In this lesson, you will learn:
- Linux is based on the principle of free and open-source software.
- The GNU project, led by Richard Stallman at MIT, developed a Unix-like operating system called GNU OS with the aim of sharing and improving software freely.
- GNU stands for GNU's not Unix, marking its opposition to proprietary operating systems such as Unix.
- In 1991, Linus Torvalds created Linux, a Unix-compatible operating system kernel that was later combined with GNU tools to create a full operating system.
- Linux or GNU Linux is a key player in the free and open-source software world and is developed primarily by volunteers and the open-source community.
- Major corporations such as IBM, Google, and Intel employ developers to work on the Linux kernel development team, creating a balance between voluntary and professional contributions.
- The term "free" refers not to cost, but to the freedom to use, modify, distribute, and study the code.
- The term "Libre software" has gained popularity to clarify this definition of "free".
- The term "source" refers to the availability of the human-readable source code along with the software.
- This open-source model allows for software to be freely modified, redistributed, and studied.
- Free and open-source software is often abbreviated as FOSS, or alternatively as FLOSS (Free Libre Open Source Software) since the introduction of the term "Libre".
In this lesson, you will learn:
- Proprietary software is a commercial model, valuing software as intellectual property and distributing under strict licenses to protect creators' rights. The source code is not available to the customer.
- Supporters of the free software movement see proprietary software as morally wrong because it doesn't allow users to see the software's source code, potentially leading to misuse of software by creators.
- The Free Software Foundation promotes four freedoms for software users: running the program as wished, studying and changing the source code, redistributing exact copies, and distributing modified versions.
- A licensing model advocated by the Free Software Foundation aims to ensure both original works and derivative works remain free and open source, and cannot become proprietary.
- The Open Source Initiative represents a third perspective, where developers share their source code and focus on practical benefits like improved software quality, collaboration, and innovation.
- Some open source developers believe that the Free Software Foundation's ideals are too stringent.
In this lesson, you will learn:
- Software licenses define terms and conditions for use, modification, and distribution.
- A Software copyright gives exclusive rights to use, distribute, and modify software to the creator.
- Copyleft licensing allows copyrighted works to be freely used, modified, and shared, extending these rights to any enhancements or adaptations of the original work.
- Most notably strong copyleft license is the GNU General Public License (GPL).
- Permissive licenses are less restrictive than copyleft, allowing derivative works to be used in proprietary projects without needing to be released under the same license.
- The Open Source Initiative is associated with permissive licenses.
- Popular open source licenses include GNU licenses, the Berkeley Software Distribution (BSD) license, the Apache license, and Creative Commons licenses.
- Linux kernel uses the strong copyleft GNU GPL license.
- The Affero GNU Public License (AGPL) applies specifically to hosted software or Software as a Service (SaaS).
- The GNU Lesser Public License (LGPL) is designed to make combining software with different licenses easier.
- BSD licenses are permissive, imposing few restrictions on software use, modification, and distribution.
- Apache license is permissive, offers freedom to use, modify, distribute and sell both the original and modified software versions without significant restrictions.
- Creative Commons licenses cover non-software creations such as music, literature, and visual arts; they follow the principles of sharing, openness, and collaboration like open source software licenses.
- The most restrictive Creative Commons license permits downloading and sharing original work only for non-commercial use, provided the creator is credited and the work is unchanged.
In this lesson, you will learn:
- Open source software is typically offered for free.
- It's possible to earn a living by being an open source developer or by establishing a company around open source products, with Red Hat being a prominent example.
- Crowdfunding or pre-sales are a way to fund open source projects.
- Dual licensing is a strategy where basic software is distributed for free, and another version with advanced features is distributed under a paid license.
- Some entities offer open source software for free, but charge for associated services such as training, installation, custom coding, and support.
- Software as a Service (SaaS) is a common business model. Here, the business hosts and maintains the software for its customers, who access it via a web browser, often via a subscription.
- Peripheral Monetization is a business model where firms earn by selling additional services or products related to the software such as merchandising, certifications, and advertisements.
- Moodle, an open source learning management system, creates and sells a certification program, while Moodle certified individuals sell their services to companies using the Moodle software.
- Acquiring grants, donations, and sponsorships can also be a method for funding open source projects. Such funds can come from universities, non-profit foundations, governments, or individuals.
In this lesson, you will learn:
- Open source philosophy backs the concept of freely accessible software for inspection, modification, and enhancement.
- FOSS stands for Free and Open Source Software, while FLOSS represents Free, Libre, and Open Source Software.
- In the FLOSS context, 'free' signifies freedom of usage, not absence of cost.
- Free Software Foundation promotes four key freedoms: running a program for any purpose, studying and modifying a program, redistributing copies, and distributing copies of modified versions.
- Copyleft licenses, advocated by the Free Software Foundation, mandate that any modifications to the original software must also be freely distributed.
- The Open Source Initiative (OSI) supports licenses permitting free use, modification, and sharing of software, adhering to its definition of open source software.
- Creative Commons licenses are applicable to non-software artistic works such as images, graphics, and text.
- There are several business models that facilitate earning revenue from open source software.
In this lesson, you will learn:
- The lesson covers practical aspects of working on Linux, including navigation around different Linux desktop environments.
- Accessing and working with the Linux command line shell is a major part of the lesson.
- Use of additional Linux applications for work purposes is included.
- It discusses how Linux is used in commercial settings.
- The lesson underlines the need to address security and privacy concerns while using Linux.
- Before utilizing Linux, users need to learn to navigate the system.
- According to the learning series, users need to familiarize themselves with opening a terminal to work on the command line.
- Understanding Linux's strengths and optimal use cases is crucial for those considering a career with Linux or its integration into their organization.
- Additionally, those in IT should be aware of security and privacy concerns as they may be handling sensitive data.
In this lesson, you will learn:
- Linux was developed inspired by the concepts of Unix.
- Unix, an operating system from the 1960s, was strictly command-line based.
- Linux initially also heavily relied on command-line instructions but had a basic GUI.
- Modern Linux versions have a full-featured desktop GUI similar to Windows and Mac OS.
- Linux also offers a powerful shell environment for tasks requiring more control or for preference of command line.
- Bash, based on the Borne shell functionality, is the most commonly used shell on Linux.
- Bash was designed as a free software replacement with improvements from all the shells in Unix.
- Bash was chosen for Linux due to its comprehensive features, compatibility and alignment with the free software movement.
- Bash remains the default shell for many Linux distributions and is the primary choice for most Linux users.
In this lesson, you will learn:
- Linux offers various desktop environments, each with its own appearance and features.
- Popular Linux distributions default to specific desktops, however, users can choose to install different desktop environments.
- The two most commonly used Linux desktop environments are GNOME and KDE, with many others deriving from these two.
- Each desktop environment comes with unique utilities such as terminal emulators, text editors, and file managers.
- The GNOME environment, currently the default for major Linux distributions like Debian, Red Hat, Fedora, and Ubuntu, uses graphics widgets from the GTK toolkit and is programmed in C.
- GNOME layouts are simple, uncluttered, and allow access to common applications like Firefox and various control settings.
- The KDE Plasma desktop environment offers a similar layout to Windows, is feature-rich with expansive configuration options, and was written in C++ with Qt library widgets.
- Other Linux desktop environment options include the lightweight XFCE, memory-efficient LXDE, and Cinnamon, a fork of GNOME developed for the Linux Mint distribution.
In this lesson, you will learn:
- Terminal emulators are used in desktop environments to run complex administrative tasks and develop software.
- A terminal is a hardware device used to enter data into a computer and display output; it needs to be connected to the main computer or server.
- With the advent of local area networking and broadband internet, terminal emulators have replaced physical terminals.
- Terminal emulator applications allow command line functions with the convenience of GUI features.
- On GNOME, the default terminal emulator is called gnome-terminal; on KDE it's called console. Different Linux distros may use different terminal emulators.
- Terminal emulators can be found in the application menu or by searching for 'terminal' and offer features like text selection, copy-pasting and hyperlink opening.
- The terminal's command line prompt displays the username and the host name of the computer. Non-root users' prompts end in a dollar sign, while root users' prompts end in a pound sign.
- Most Linux desktop environments have a shortcut to open a terminal, typically control + alt + T.
- To allow quick access to the terminal emulator, you can pin it to the dash or dock. This can be done by right-clicking the terminal's icon and selecting 'pin to dash'.
- On the Fedora desktop system using KDE plasma, the process is similar; terminal can be pinned to the dash by first opening the terminal, then right-clicking on the icon, and selecting 'pin to dash'.
- Terminal emulator applications can be quickly reopened from the dash if they are pinned.
In this lesson, you will learn:
- A TTY (Teletypewriter) is a terminal, terminal interface, or a text-based interface allowing users to interact with an operating system.
- TTYs can be used to send and receive typed messages via different communication channels like telephone lines.
- The TTY term predates computers, and was adapted to allow data transfer to computers.
- Virtual TTYs can be accessed with certain keyboard commands combining CTRL-ALT with function keys. For example, CTRL-ALT-F1 for virtual TTY 1, CTRL-ALT-F2 for virtual TTY 2, etc.
- The assignment of virtual TTYs can differ between system distributions.
- Certain TTYs are reserved for text-based terminals, enabling non-graphical interactions with a system shell.
- Using different virtual TTYs allow one to work on multiple tasks at the same time.
- Modern Linux desktop users often use multiple instances of a terminal emulator application or tabs within the application, instead of relying heavily on virtual TTYs.
- Virtual TTYs are particularly useful while troubleshooting, especially issues with booting a Linux system or when the system can't be accessed over the network.
- Cloud providers frequently provide access to virtual TTYs to access a Linux system from the command line. This is particularly helpful for troubleshooting.
In this lesson, you will learn:
- Linux offers a broad range of open-source software for various tasks.
- LibreOffice Impress, a part of the LibreOffice suite, is similar to Microsoft PowerPoint and allows creation of slides, attractive advertisements, and brochures.
- Impress uses the Open Document Standard and can also read and write files in Microsoft PowerPoint format.
- Alternative presentation software in Linux include Beamer and Reveal.js, which are aimed at mathematical and scientific presentations, and interactive presentations using HTML and CSS respectively.
- Linux supports popular open source project management software like Project Libra and GanttProject, which offer alternative features to Microsoft Project.
- Linux has a strong presence in the server market due to its reliability, flexibility, cost-effectiveness, and high performance. Majority of web servers are powered by Linux.
- Linux is popular for cloud services largely because its built-in features support running of applications in containers isolated from other users. Open source software like OpenStack helps manage these cloud applications.
- Cloud services include different business models like Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS).
- In IaaS, clients rent computing facilities from a provider but are responsible for installing and maintaining software on the rented systems.
- Virtual machines on a server or cluster of servers are managed by a software application known as a hypervisor. Common Linux hypervisors include Zen, KVM, and VirtualBox.
- PaaS provides both hardware and software tools. Examples include Heroku.
- In SaaS, clients use software in the cloud without administering either the hardware or the software. Examples include Shopify, Salesforce, and Zendesk.
- Linux is popular among software developers due to its reliability and wide range of available development tools.
- Continuous integration, a key tactic in software development, is easily automated in Linux.
In this lesson, you will learn:
- Websites with URLs starting with HTTP use an insecure transmission protocol; those beginning with HTTPS use encrypted transmission with Certificates.
- Certificates, which must be renewed regularly, help ensure the site is legitimate.
- Many browsers display a lock symbol for secure sites showing certificate details.
- Cookies are data pieces stored in a web browser and sent to the websites every visit. They help with functions like Keeping users logged in or saving shopping cart items, but can be used for targeted advertising.
- Users can adjust browser settings to disallow third-party cookies, enable 'Do Not Track', or open a private window for increased privacy. However, these actions have limitations, such as sites ignoring 'Do Not Track' requests and private windows not preventing malware or hiding browsing activity from ISPs or employers.
- Cookie managers offer finer control over stored cookies.
- Important password dos and don'ts include: don't use obvious combinations or personal information, don't reuse the same password, and never share your password. Instead, use strong, long passwords combining letters, numbers, and punctuation symbols.
- Password managers, like KeePass or Bitwarden, store passwords in an encrypted form and provide a more secure, convenient way to handle passwords.
- Passwords can be generated using a mnemonic system or a random password generator typically provided by password managers.
In this lesson, you will learn:
- SSH is a tool used for establishing a secure connection with a remote machine via command line.
- It involves generating a pair of keys, a public key and a private key.
- Private key is kept on the user's computer and encrypted to identify the server.
- The public key is stored on both the user's and remote computer for validation and decryption of communications.
- Encryption is a mathematical process used to protect sensitive data during transfer over a network.
- The current standard protocol for encryption on the internet is Transport Layer Security (TLS), an upgrade from Secure Socket Layer (SSL).
- TLS is used by HTTPS and most email servers for encryption. It also authenticates parties and ensures messages are not tampered with in transit.
- The most common standard for file and email encryption is OpenPGP, using public and private keys and a cryptographic hash for securing data.
- GNU-PG is a free and open source implementation of OpenPGP.
- Disk encryption, specifically block device and stacked encryption, is recommended for platforms storing sensitive data.
- Block device (or whole disk) encryption encrypts the total disk content, sector by sector. Linux Unified Key System (LUX) is a disk encryption specification.
- Stacked encryption allows selective encryption of files and directories without needing root or super user credentials.
- Disk encryption software includes DM-Crypt for block device encryption, ENCFS for stacked encryption, and VeraCrypt for media and file encryption; compatible with Linux, Windows, and macOS.
In this lesson, you will learn:
- Two methods to interact with Linux systems: graphical user interface or desktop environment and the command line interface (CLI).
- Two common Linux desktop environments: Gnome and KDE.
- Accessing command line via terminal emulator application within graphical user interfaces.
- Accessing command line interface also possible through virtual TTYs.
- Explanation about the use of Linux in cloud computing, specifically in infrastructure as a service, platform as a service, and software as a service.
- Introduction to virtualization concept and Linux hypervisors, including Xen, KVM, and VirtualBox.
- Discussion about privacy and security when browsing the internet: topics include HTTP and HTTPS protocols, cookies, and private windows.
- Guidelines on password creation and selection, and best practices.
- Introduction to encryption methods.
In this lesson, you will learn:
- The lesson teaches about Linux shells, specifically the bash shell.
- Bash shell is not only a shell but also a scripting language, having its own syntax and vocabulary.
- Learners can experiment with simple commands and understand the syntax of the language.
- Although Linux has a powerful GUI, learning to work with the bash shell is essential for developers and system administrators.
- Bash shell is necessary for automating repetitive tasks, building, testing, and deploying software, accomplishing tasks quickly, working on servers without GUI, preparing for sysadmin or developer roles, performing advanced file management tasks, and accessing powerful tools only available from command line.
In this lesson, you will learn:
- Unix-like operating systems consist of two parts: the kernel, which does all the work, and the shell, which accepts commands to manage kernel activities.
- Linux permits choice of shell, with options including seashell, cornshell, zeshell, bornshell, and bash or the bornagain shell.
- Bash is pre-installed on most Linux distros and is commonly used.
- Users from a Unix background can install and use other shells; the command languages for the shells have similarities but are not identical.
- A terminal, to communicate with the shell, can be launched by searching for it via the desktop search feature or using keyboard shortcut Ctrl-Alt-T.
- It is suggested to add the terminal to favorites or taskbar for easy access.
- Once the terminal is launched, a command line prompt appears where things have specific meanings -- username, machine name, path of current directory in the form of a tilde symbol etc.
- The final symbol in the prompt, a dollar or pound sign, indicates that the shell is ready to accept commands; dollar sign is for ordinary users, while pound sign is for root or administrator users.
In this lesson, you will learn:
- The tutorial demonstrates a number of basic Linux commands.
- The 'hostname' command displays the name of the current working computer.
- The 'touch' command creates an empty file in the current working directory. For example, 'touch myfile' would create a file named 'myfile'.
- The 'ls' command lists all the files in the current directory. On most Linux versions, filenames are color-coded to indicate file type.
- The 'rm' command deletes a file permanently, unlike the graphical interface which moves deleted files to a recycle bin. Example: 'rm my file' to erase the earlier created file.
- The 'echo' command is used to display text on the terminal. For example, 'echo "hello, I am a Linux computer"' will display that text.
- The 'history' command lists previously executed commands. Commands can also be accessed by pressing the up arrow key.
- Commands can be reused or slightly altered by bringing them up from the history.
In this lesson, you will learn:
- Follow the exercise for practice with simple commands
- Create three files: test1, test2, test3
- List all the files in your directory to confirm creation
- Display the message: "I have created some files"
- Show command line history
- Remove two files: test1 and test2
- List all files in your directory to observe that test1 and test2 have been removed, and only test3 remains.
In this lesson, you will learn:
- Commands accept options which alter their behavior.
- Command line options can be short (single character with a minus sign) or long (more than one character with a double minus sign).
- Options are also known as switches.
- The 'ls' command lists files. Running 'ls' without options lists currently available files.
- The '-l' option for the 'ls' command (i.e., 'ls -l') displays files in a long format with more details (file type, permission, size).
- The '-a' option for the 'ls' command (i.e., 'ls -a') displays all files, including hidden ones (prefixed by a period).
- Same results can be achieved either by using short options or long options.
- To combine short options, type them immediately after a single minus sign without spaces (e.g., 'ls -la').
- Long options can be combined by prefixing each with a double minus sign and separating by spaces.
- Some options require a specific value. For example, 'ls --format=single-column' lists in a single column format.
- Linux commands have built in help accessed by typing the command name followed by '--help'.
- Command arguments specify what the command works with. In 'touch my file', 'my file' is the argument.
- In 'ls /home', 'ls' lists a directory whose path is specified by the argument '/home'.
- In Linux, the root directory is known as forward slash ('/'). File and directory names are separated by forward slash when specifying a path.
In this lesson, you will learn:
- Bash, like other programming languages, allows for storing values in variables, which is useful for automating tasks in scripts.
- Variables don't need to be pre-defined and can be assigned values directly.
- Reference to a variable needs to be prefixed by a dollar sign ($). E.g., if variable "textval" is assigned a value "hello everyone", use "echo $textval" to display it.
- The variable defined is only valid in the current session and won't be visible in child processes.
- The "export" command converts a local variable to an environmental variable, which is visible in any child processes.
- Environmental variables are conventionally named in uppercase letters, but it's optional.
- One example is to create an environmental variable named "phone", assign the value "0756442105", then run "export phone". It can be shortened by setting the value while exporting the variable, e.g. "export phone=0756442105".
- Environment variables are inherited from the parent process when starting a terminal emulator, including "user" (current user's username), "path" (list of directories to search for commands), and "home" (location of the current user's home directory).
- To see the assigned environment variables and their values, "printenv" command can be used.
- Environment variables are only valid in the current session and won't be available in a secondly opened terminal.
- Bash and applications use configuration scripts to set up environment variables as needed.
In this lesson, you will learn:
- Certain characters possess special meanings in the Bash programming language and should not be used in file or variable names.
- Wildcards are useful when you wish to operate commands on several files with similar names. For example, an asterisk (*) represents any string of zero or more characters, a question mark (?) represents exactly one single character.
- Brackets can be used for a list of characters, where any enclosed character is considered a match.
- Braces are used for a range of characters; for example, a range from one to twelve can be written as 1..12.
- The 'ls' command is used to display any file or directory entries that begin with specific characters.
- If you use the question mark wildcard, it will show files followed by exactly one single character.
- In programming languages like Bash, a string of literal text is often needed. Bash expects these literals to be enclosed in either single or double quotes.
- There is a slight difference in usage between the two types of quotes: literals in single quotes appear exactly as entered, whereas in double quotes, special characters like backslash, backtick, and dollar sign retain their special meanings.
- The backslash character makes the character following it to be taken literally.
- By using the backtick special character, the text inside them is interpreted as a command and evaluated. The backslash character can cause the backticks to be interpreted literally when used inside of double quotes.
In this lesson, you will learn:
- Linux has two types of shell commands: internal and external.
- Internal commands are built into the shell and more commonly used.
- External commands are programs stored on disk, usually in the user bin directory.
- The system checks if a command is internal first, if not, it searches through directories stored in path until it finds an executable file with the command's name.
- If the path environment variable doesn't include user bin or the directory where the external command resides, the command won't work.
- The path variable can be modified to include new directories, thus allowing custom programs to behave as Linux external commands.
- Linux's type command can determine whether a command is internal, an alias, a function, or an executable file in the system's path.
- The which command locates a command or a program on the system by searching through the directories listed in the path environment variable.
In this lesson, you will learn:
- Learned the necessary background to work with Linux shell commands.
- Studied the terms shell and kernel in Linux.
- Identified bash as the most commonly used Linux shell with alternative shells available.
- Explored different parts of a command prompt.
- Studied simple, but useful commands like ls, touch, hostname, history, and echo.
- Learned syntax of bash commands and use of the --help option for specific commands.
- Gained knowledge on how to use variables in the Linux environment.
- Learned use of wildcards, quotes, and escaped characters and commands.
- Understood the difference between internal and external commands.
In this lesson, you will learn:
- The Linux command line interface (CLI) is often the primary way to interact with the system, especially on Linux servers.
- The CLI can be accessed through a terminal emulator even when using Linux as a desktop operating system with a graphical user interface (GUI).
- Using the CLI is often faster and more efficient than the GUI, making it beneficial to know how to use it even if the GUI is available.
- Seeking help directly from the Linux CLI fosters self-sufficiency, enabling users to solve problems without external resources. This is particularly useful when working alone or with limited/no internet access.
- Using the CLI to seek help can increase productivity as it may be quicker than switching to a web browser to search the internet.
- Built-in system help ensures guidance is directly applicable to the commands and versions installed on the system, preventing potential issues of irrelevant or incorrect external documentation.
- With hundreds of commands in even a minimal Linux installation, it's crucial to learn the built-in help systems. This will enable users to navigate and utilize the Linux CLI effectively. Available help resources include man pages, info pages, the /usr/share/doc directory, and commands themselves.
In this lesson, you will learn:
- "Man pages" in Linux are built-in help pages that provide detailed information about commands including their functions, available options, and examples.
- "Man pages" can be accessed offline and are the most common method for getting help on Linux due to their concise summaries of commands.
- "Info pages" offer more comprehensive documentation than "man pages", including hyperlinks for easy navigation, detailed information, tutorials, examples, and related topics. Despite these advantages, "info pages" are less popular than "man pages".
- The "/usr/share/doc" directory is a repository of documentation for installed Linux commands and packages. This directory contains varying documents, including change logs, release notes, guides, FAQs, copyright information, and more.
- Many Linux commands offer their own built-in help functionality, which can be accessed using the argument -h or --help. However, not all commands respond to these arguments, and in such cases, "man pages" or other sources of command information would be needed.
- Using a search engine to understand Linux commands can lead to confusion due to version discrepancies on different systems. Commands found online should not be used without understanding their functions to avoid potential harm to the system.
- Running unknown commands on a development or test system is advised before executing them on important systems, reducing the risk of error or data loss.
In this lesson, you will learn:
- Linux command line help can be found using 'man pages'. By typing 'man' followed by a specific command, detailed information about that command is displayed.
- In a man page, 'q' is used to quit and 'h' (uppercase or lowercase) stands for help.
- Five different commands can perform the exit action, with 'q' being the most straightforward.
- Within a man page, the arrow keys allow navigation line by line and the space bar moves down an entire screen.
- A forward search within a man page can be started by typing '/' followed by the search pattern. 'n' (lowercase) can be used to repeat the search and find the next match, while 'N' (uppercase) reverses the search direction.
- If help is needed with additional commands, type 'man' followed by the specific command (e.g. 'man LS' for help with the LS command).
- Remember to exit a man page by typing 'q'.
In this lesson, you will learn:
- The 'info' command provides detailed, interactive access to documentation.
- To view an info page, type 'info' followed by the command.
- To exit or quit from an 'info' page, type 'q'.
- Two ways to get help while in 'info':
- By typing uppercase 'H' for a list of basic key bindings to navigate within the 'info' system.
- By invoking the 'info' turotial by typing lowercase 'h'.
- Use up and down arrow keys to move up and down one line. Use page up and page down keys to scroll up and down one window.
- Typing lowercase 'l' closes the help window.
- The space bar can be used to advance one page.
- Underlined text in info pages signifies hyperlinks, which can be clicked to jump to a specific section of the documentation.
- To return to a previous section, type lowercase 'l'.
- To exit out of info pages, type 'q'.
In this lesson, you will learn:
- The /usr/share/doc directory is a repository of documentation for installed packages or commands on a system.
- This directory contains configuration details, change logs, readme files and more.
- Access this directory using the command 'cd /usr/share/doc'.
- Use the 'ls' command to list its contents.
- Each directory within /usr/share/doc typically corresponds to a specific package installed on your system.
- To look at documentation, navigate to the corresponding subdirectory, for example for 'sudo', navigate to the 'sudo' subdirectory.
- You can learn which directory you are in using the 'pwd' command.
- If a certain command's package isn't installed (e.g. sudo), the related subdirectory won't exist in /usr/share/doc.
- To view the contents of a file, use the 'ls' command followed by the file's name.
- The 'less' command is used for displaying file contents, with navigation similar to the 'man' command.
- To exit 'less', type 'q'.
In this lesson, you will learn:
- The final way to get help on the Linux command line is by combining a command with the --help or -h argument.
- This command shows the built-in documentation of the command including a brief summary on how to use it, a list of options and at times, examples.
- The mv command moves files.
- The pipe symbol (|) instructs Linux to use the output of one command as the input for another one.
- Not all commands respond to both --help and -h arguments. For instance, the mv command only responds to --help.
- The sudo --help command provides built in help for the sudo command which executes commands as other users, typically the root or super user.
- However, some commands, like iptable-save, don't accept --help or -h.
- --help and -h can be highly helpful for a quick overview of a command or to recall an option for a particular task, even though they might not always work.
In this lesson, you will learn:
- A web browser can be used to find help on a Linux command such as the curl man page.
- The information on a web page may be for a different version of the command than the one on your system— it might have new features or it could be outdated.
- It is possible to find the online man page for your specific Linux distribution.
- For example, searching "curl man page for Ubuntu" and clicking on the first link will bring up versions of Ubuntu— select the one likely using.
In this lesson, you will learn:
- The lesson taught how to get help with Linux.
- The methods covered include: using man pages, info pages, the /usr/share/doc directory, and the -h and --help options.
- These tools are used to find information on how to use commands on a Linux system.
In this lesson, you will learn:
- The find command helps locate files and directories using a supplied path and search expression.
- If you don't specify where or what to look for, find returns all files in the current directory and all its subdirectories.
- The '-name' option in the find command helps search files and directories using a particular pattern.
- The '-iname' option allows find to ignore case.
- The '-ls' option allows find to return a long format display of the files and directories found.
- The '-mtime' option allows find to search files based on the modification time.
- The '-size' option allows find to search files based on size.
- The '-newer' option allows find to find files and directories created later than a specified file.
- The '-exec' option allows find to execute a command against all the results it finds.
- An escaped semicolon ends the command you want to run using '-exec'.
- Running 'find' without specifying options, or using 'find .' yields similar results - finding everything in the current working directory.
- The locate command finds files and directories faster than the find command by using an updated index, but it doesn't provide real time results.
- Locate might not be installed by default on some systems.
- Consider using the locate command for quick file location searches, and the find command for more advanced searches or real-time results.
In this lesson, you will learn:
- The lesson covers the Linux file system structure and navigation.
- Learners will understand the organization of files and directories in Linux.
- The lesson teaches how to obtain detailed info on files and directories using Linux commands.
- Data and software management are crucial tasks for an administrator or developer.
- Knowledge on how to establish and maintain directory structures is essential for file and data organization.
- All Linux file system layouts have a similar structure.
- At the end of the lesson, learners will be capable of working effectively on any Linux distribution.
- The lesson includes useful tips and tricks for file management and efficient navigation of the directory structure.
In this lesson, you will learn:
- A file is a basic unit of data storage, which can be in various formats like text documents, databases, programs, spreadsheets, etc.
- A directory is used to organize files and other directories, often referred to as a folder.
- The terms 'directory' and 'folder' generally mean the same thing, but 'directory' is associated with command line interfaces, while 'folder' represents the same in graphical user interfaces.
- The content in a file is related and the data logically belongs together, such as a recipe.
- Directories can categorize files based on projects, subjects, or purposes, similar to categorizing chapters in a cookbook. For example, a "desserts" directory may contain files of different dessert recipes.
In this lesson, you will learn:
- Files can be created via several methods such as using a text editor to write and save a document, downloading content from the internet, using applications that save data, and executing specific commands in the terminal.
- An example of creating a new empty file is using the 'touch' command.
- To create a directory using the Linux command line interface, the 'mkdir' or 'make dir' command is used. For instance, typing 'mkdir my_new_dir' creates a directory named 'my_new_dir'.
- Verify that the directory has been created by running the 'ls' command, which lists files and directories in the current working directory.
- It is recommended to choose meaningful, easily understood names for files or directories, avoiding special characters like spaces, backslashes, or dollar signs as these can complicate Linux command line usage. Substitute a hyphen or underscore for these special characters if needed.
- File names can include a file extension at the end to specify the type of file. It follows the last period (or dot) in the name. For example, '.py' for Python programs and '.sh' for shell scripts.
- File extensions on Linux are used for human readability and to suggest how a file should be interpreted or used, but Linux does not depend on them to determine the file type or execution method. This contrasts with Windows where file extensions are used to determine application launch or file execution.
In this lesson, you will learn:
- Linux directories form a hierarchical structure, starting at the root directory.
- Each directory and subdirectory can contain files and/or more directories forming a tree structure.
- The tree structure can be visualized using the tree command in Linux. This command may need to be manually installed on some Linux distros.
- The tree command, when executed without arguments, shows the hierarchical structure of the file system layout with the current working directory as the start point.
- Linux represents the current working directory with a dot.
- The tree command can be used with the -F option to indentify file types. This appends a character at the end of each item to denote its type, like directories (/), executable files (*), symbolic links (@), socket files (=), FIFOs (|).
- The tree command can also be used with a path argument to get a hierarchical tree of any directory. Running the command with the root directory ("/") would provide a tree of the entire filesystem.
In this lesson, you will learn:
- The current working directory, present working directory, or working directory are used interchangeably to indicate the location within a directory hierarchy where work is currently ongoing.
- The initial working directory when a terminal opens or a remote server login occurs is the user's home directory.
- Home directories are typically found within the '/home' directory and share the same name as the associated username.
- The absolute path to the directory typically starts with a forward slash, representing the root of the file system.
- The tilde character ('~') represents the absolute path of the current user's home directory.
- The PWD ('print working directory') command can be used to check the location of the current working directory. This command gives the full directory path rather than using shortcuts such as the tilde symbol.
- Commands executed in a terminal work within the current working directory by default.
- Any path provided as a part of a command, which does not start with a forward slash, is interpreted as starting from the current working directory.
- If no path argument is provided, commands like 'ls' and 'tree' operate on the current working directory by default.
- Short relative paths can be used instead of full absolute paths to simplify the process.
- The 'cd' or 'change directory' command can be used to navigate to different parts of the file system hierarchy.
- Executing 'cd' without any arguments defaults the working directory to the user's home directory.
- 'cd' command followed by a path moves the working directory to the specified path.
- Upon executing 'ls', the output will display all the files and directories in the current directory.
- 'touch' command can be used to create a new file within the current working directory.
- The 'tree' command displays a hierarchical presentation of the files and directories originating from the current directory.
In this lesson, you will learn:
- Many commands in computer languages allow usage of a path as an argument.
- The 'cd' command is used to specify the path to the desired directory.
- Paths can be specified two ways: an absolute path and a relative path.
- Absolute path starts from the root of the file system and lists all directories you need to traverse to reach the specified file or directory.
- Relative path starts from the current directory and only specifies directories needed to find the file from the current location.
- Absolute paths are like specific addresses, leading to the exact location from any starting point.
- Relative paths are like directions from the current location to the destination; the results may change based on the starting point.
- In Linux, there are two special relative directories: dot (.) and double dot (..).
- Dot (.) points to the current directory and double dot (..) points to the immediate parent directory.
- The 'ls -a' command in Linux displays all files in a directory including hidden ones, which begin with a period.
In this lesson, you will learn:
- Using cd . does not change current directory.
- Dot dot (..) is used to navigate up the tree structure or refer to files in parent directory.
- Auto-completion or tab completion can be used to automatically complete names of directories when typing the cd command.
- Auto-completion will not work if there are multiple directories starting with the same letters; however, by pressing tab again, user can see list of directories starting with those letters.
- Users can further type to make their input unique, which allows auto-completion to work.
In this lesson, you will learn:
- All Linux systems, from powerful servers to tiny embedded systems, share the same file structure.
- The file system hierarchy is the same for most Unix systems.
- The 'tree' command can be used to view the topmost directories in a Linux system.
- The arrow symbol indicates a symbolic link, pointing to a different location in the file system.
- Key directories include /bin, which contains essential commands; /etc, storing system-wide configuration files; /home, containing user home directories; /tmp, for temporary files; and /var for variable data files like log files.
- This structure is known as the File Hierarchy Standard (FHS).
- The home directories in a Linux system are personal to the user, each user has their home directory under /home.
- Linux's permission structure safeguards individual data. Each user can manage their files in their home directory without other users accessing or altering data.
- Linux does offer a method for multiple users to collaborate on the same data set, which will be explored in a future lesson.
In this lesson, you will learn:
- The `ls -a` command in Linux lists all files and directories including hidden ones.
- Hidden files, recognizable by their initial period or dot, typically contain configuration settings.
- Examples include: .bash_history - stores commands executed by the user in a bash shell, .bash_logout - contains commands executed when logging out, .bashrc - holds bash configuration settings.
- The `ls -l` command (long list format) provides detailed information about files and directories, including file type, permissions, number of links, owner name, group name, file size, last modification time, and file name.
- Various options can be added onto the ls command, for example adding `-h`, `ls -lh` shows the file size in a human-readable format, showing kilobytes, megabytes, etc.
- Using `-d` with the ls command lists directories but not their contents.
- ls -d */ lists the directories in your current directory.
- The `ls -lt` command lists files in long format ordered by last modified time with the latest files at the start of the output.
- Adding `-r` to sorted lists reverses the order of the sort.
- The `ls -lS` command lists files in long format in order of size, showing the largest files first, useful for identifying disk space usage.
- Using `-X` with the ls command sorts entries by extension - useful for organizing files by file type.
- Files are sorted first by their extension, and then alphabetically within each extension group.
In this lesson, you will learn:
- Recursion is a process of performing a task repeatedly over smaller parts until completion.
- In Linux file system hierarchy, recursion involves applying a command to a directory, and then applying it to every subdirectory within.
- The command 'ls -R' views every file and directory within a specified directory, down to the deepest level. The '-R' stands for recursive.
- The output of 'ls -R' can be paginated for easier viewing by piping it to the 'more' command, for example 'ls -R | more'.
- Pressing the space bar while viewing paginated output displays the next screen, while typing 'q' quits the view.
- Other bash commands such as 'cp' (copy) can be used recursively. Adding '-R' copies a directory and all its contents into a new directory.
- The 'rm -R' command is used to recursively remove an entire directory structure, being careful as files are permanently deleted in Linux.
In this lesson, you will learn:
- Files in Linux are named collections of data, and directories keep related files together.
- Directories are arranged in a tree structure with a root directory at the top, and there can be many levels of directories beneath the root.
- The tree command is used to visualize this tree structure.
- There is always a single current or working directory when using the command prompt, which can be changed using the cd command.
- Either absolute or relative paths can be specified as arguments to a command. Absolute paths start from the root, while relative paths start from the current directory.
- The . and .. relative paths refer to the current directory and the parent directory respectively.
- Each user has a directory under the /home directory, named the same as the username, which is the current directory upon logging in. This can always be reached by typing the cd command.
- Unix-like distributions follow the fhs standard tree structure as defined by the Linux Foundation.
- Hidden files and directories, identifiable by a period at the start of their names, hold important scripts and configuration files, and can be viewed with the ls -a command.
- There are several command line options for the ls command.
- The -R option can be used with many bash commands to work recursively through a tree structure.
In this lesson, you will learn:
- The lesson covers managing files and directories.
- Topics include creating and modifying directory structures through moving, copying, and removing files and directories.
- The lesson teaches how to view file contents and introduces shortcuts to enhance efficiency at the command line.
- Discusses the benefits of computers' ability to store, retrieve, and process large volumes of data quickly.
- Highlights the value of managing data through command line due to its speed, ease, convenience, and automation capabilities, as opposed to a graphical user interface (GUI).
- The command line allows for automation of file management tasks, a feature that is not possible with GUIs.
- Future lessons will teach how to automate tasks by creating custom scripts.
In this lesson, you will learn:
- Files are named collections of related data.
- Linux file names are case sensitive, meaning a file named JanuarySales with a capital J is not the same as JanuarySales with a lowercase j.
- Each file has metadata such as its size, file type, and the last modification date.
- Metadata can be displayed using the 'ls -l' command in Linux.
- A directory is considered a special type of file in Unix and Linux systems.
- Directories, similar to folders in Windows, can contain files and other directories.
- All aspects of the operating system, including regular files, directories, devices, and processes, are treated as files in Unix and Linux - known as 'Everything is a file'.
- Directories are used to organize data and keep similar files together.
- In 'ls -l' output, the type of the file is indicated by the first character: a dash or hyphen for a normal file, and a D for a directory. Directories have many of the same attributes as files.
In this lesson, you will learn:
- Create a directory using the `mkdir` command followed by the directory name, e.g., `mkdir fd-demo`.
- Use `cd` command to change into the created directory, e.g., `cd fd-demo`.
- Create a directory structure that includes multiple subdirectories by using `mkdir` command. If it returns an error, it means the parent directories don't exist yet.
- Use the `-p` option with the `mkdir` command to create parent directories as needed. This option can be used even when the parent directories already exist - the command will simply ignore the existing directories.
- To view the contents of the created directories, use the `ls` command with `-R` option. This will return a recursive list of all directories and subdirectories.
- Another command to view directories is `tree`. It may not be installed by default on some Linux distributions.
- The `find` command can be used to list all files and directories in the current directory, or to find files or directories that match a specific name.
- Use the `-name` option with the `find` command to search for a file or a directory, e.g., `find -name Java`.
In this lesson, you will learn:
- In Linux, there is no command exclusively dedicated to file creation; this is similarly observed in other operating systems like Windows or Mac OS.
- The 'touch' command can create a new file or update the access and modification timestamps of an existing file without changing the file's content.
- A new file can be created using 'touch' by navigating to the relevant directory, typing 'touch' followed by the file name and hitting enter.
- Brace expansions or ranges can be used to create multiple files at once, following a pattern. For example, 'touch file{b..e}' will create files 'fileb' to 'filee'.
- The echo command, combined with redirection, can be used to create a file containing specified text. For example, 'echo hello > readme' creates a file named 'readme' containing the word 'hello'.
- To append text to an existing file, double redirection operator (>>) should be used in order to avoid overwriting existing file contents.
- Redirection feature works with any Linux command that produces output, not just the echo command.
In this lesson, you will learn:
- The `cat` command is used for displaying file content in the terminal and can combine multiple files into one.
- The `cat` command is mainly utilized for displaying content from a single file.
- `cat` command use with redirection involves entering file names to combine and a new file name to create.
- The `cat` command is helpful to combine daily log files into weekly or monthly ones for efficient pattern or issue searching.
- `cat` command is designed for text files; using it on a binary file results in unreadable output.
- If binary output affects the terminal, use the `reset` command to clear out any non-standard settings. If it does not work, reopen the terminal.
- For longer files where `cat` may not be useful, use pagers like `more` and `less` in Linux to control file output display.
- `more` and `less` display the first page of the file and allow users to scroll through the file line by line or page by page.
- `less` offers more functionality than `more`, including the ability to search backwards within a file.
- To view documentation for any command, use `more` or `less` followed by the directory path of the file.
- In `more` or `less`, you can press enter to view one more line of the file or the space bar for another page of the file.
- `less` has a help screen accessible by typing h, allowing users to learn more functionality. To exit help or the program, type q.
In this lesson, you will learn:
- The cp command in Linux is used for copying files and directories from one location to another.
- To create a copy of a file with a new name in the same directory, specify the original filename followed by the new file name as arguments.
- To view the contents of the new file and compare it to the original file, the cp command can be used.
- If the new file already exists, the copy would replace it. This requires careful action to avoid overwriting files to keep.
- The cp command includes options such as -n or -no-clobber that prevents copying if the target file exists already. -i provides a prompt before overwriting an existing file, and -u copies only if the target file does not exist or if it's older than the source file.
- To copy a file into another directory, the cp command should be followed by the source file name and the path to the target directory.
- To copy a file into another directory and rename it simultaneously, the cp command should be followed by the source file name and the path and new name of the file in the new directory.
- User can copy a directory with all its subdirectories and files to a different location by using the -r option in the cp command (which stands for recursive).
- This method allows users to replicate all the contents of one directory into a new directory.
In this lesson, you will learn:
- The 'mv' command is used to move or rename files and directories.
- The target file will be overwritten if it exists, similar to the 'cp' command.
- The same options of –i, –n, and –u can be used to protect against accidental overwrite.
- To rename a file or directory, the command requires the current name and the new name as arguments; e.g., mv file.txt newname4file.txt.
- To move a file to another directory, supply the source file path and the target directory path.
- Directories can be moved and renamed in the same method as files.
- Multiple files can be moved to a single directory by specifying them as source files with the destination directory included.
- Use of wildcards (like '*') allows for moving all files or specific type files in a batch.
- With many source files, the final argument should be the target directory.
- Moving multiple files or directories can be done in a single command statement.
- All these actions of moving and renaming files and directories can be verified using 'ls' or 'tree' command.
In this lesson, you will learn:
- The 'rm' command is used to delete files and directories.
- The 'rmdir' command is specifically designed to remove or delete empty directories.
- Attempting to delete a populated directory using the 'rmdir' command will result in an error message.
- The -r (or --recursive) option with the 'rm' command allows for the deletion of directories and their contents recursively.
- The -i (or --interactive) option prompts the user for confirmation before each removal. A combination of -ri or -ir can be used.
- The 'rm' command with no options will only remove files, not directories.
- The 'rmdir' command only removes empty directories; populated directories need to be emptied first for this command to work.
- The -p option with the 'rmdir' command removes a directory and any parent directories specified.
- Care should be taken when using 'rm -r' to ensure important data is not accidentally deleted. Using 'rm -ri' to ask for confirmation before each deletion can help mitigate such risks.
In this lesson, you will learn:
- Commands in Linux can be streamlined through the use of wildcards and pattern matching.
- Wildcards can be used to match and move multiple files at once using the 'mv' command.
- An asterisk (*) is used as a wildcard in commands to indicate any characters following a preceding identifier.
- Using wildcards and pattern matching in commands is referred to as 'globbing' in Linux.
- The functionality for globbing originated from a program named 'glob' developed in Unix in the 1970s.
- Pattern matching rules are guided by POSIX specifications which are foundational for Unix-like operating systems, including Linux.
- An example of this usage included separating different types of programming files (.java and .py) into respective directories.
- Different teams could then be assigned different files, with specific naming patterns used to identify which files to move to which team's directories.
- Pattern matching can include ranges specified using the first and last character of the range separated by a hyphen, as well as specifying multiple ranges within brackets.
- Character classes enclosed in double square brackets can be used to specify the type of characters you want to match, e.g. digit, alphanumeric, alpha, blank, lower, upper.
- The character pattern can be modified by using a not operator (represented by the caret symbol) to exclude specific matches.
- Pattern matching may vary slightly depending on the shell being used.
- Use of pattern matching can greatly increase efficiency when managing files.
In this lesson, you will learn:
- In a Linux environment, a file is a named collection of data, identifiable by attributes such as size and last modified date.
- A directory is a file type that groups similar files together, containing names and pointers to all its files.
- Linux commands for file and directory management include ls (list files in a directory), mkdir (create directories), tree, find, ls -R (view directory hierarchy).
- Filenames are case sensitive in Linux.
- The touch command and echo command with redirection can be used to create files.
- The contents of a file can be viewed using either cat, more or less commands.
- The cp command is used to make a copy of a file under a new name or another part of the directory hierarchy. The -r option allows the copying of an entire directory structure.
- The mv command moves or renames a file or directory within the directory hierarchy.
- To delete files and directories, use the rm, rmdir, and rm -r commands.
- The mkdir -p command allows creation of parent and child directories with a single command.
- Globbing, a form of pattern matching, can be used to handle multiple files with similar names. An asterisk matches any character number, a question mark matches exactly one character, brackets match listed characters.
In this lesson, you will learn:
- Archiving and compressing are essential for effective file management.
- Archiving consolidates files into a single, manageable entity, similar to packing books into a box.
- Compression decreases the size of the data, similar to reducing space taken by books by eliminating unnecessary pages and using smaller font.
- These methods make data transfer easier and faster while reducing the storage space needed.
- Archiving and compressing data can reduce costs associated with additional storage capacity.
- Improved data transfer speeds can expedite tasks like backups, restores, or data migrations.
- Compressed archival methods help comply with industry regulations that require data retention for certain periods.
- Archiving and compression make software distribution more efficient, reducing download time and data usage for users while lightening the load on servers and networks.
Archiving tools allow you to package multiple files, including entire directory structures,
into a single file.
This single archive file can then be unpacked to perfectly replicate the original archive
content, including all the files and directories.
You can use these archive files to copy data to a new location on the same system or even
on an entirely different one.
The most widely used archiving tool on Linux is the GNU version of tar.
The tar command, which is short for tape archive, was developed in the early days of Unix systems.
The purpose of the tar command was to create archives of files and directories for storage
of data, primarily on magnetic tape.
The archive files produced by tar were and still are commonly referred to as tar files
or tarballs.
As a quick aside, my first IT job was working at a large telephone company as a data center
technician.
I worked the night shift and clocked in at 11pm.
It was extremely rare that anything happened during the first hour of my shift.
But can you guess what happened at midnight?
That's right, all the backup jobs started to run.
I went from having my heels on the desk to running around the data center like crazy,
finding all the tapes that were being requested from all the servers.
I might be dating myself here, but this type of job still exists today.
Sure, the technologies have changed, the tapes look different, and the tape library systems
are more advanced, but they still require humans to operate.
Anyway, let's get back to the tar command.
Even though the tar command was designed to write to and read from tape drives, it could
also use other media as its target, including hard drives.
The tar command remained and still remains in use even after magnetic tape storage devices
fell out of favor.
Again, tape storage is still used today, but it's nowhere near as prominent as it once
was.
When using the tar command, you specify options to control the type of action tar performs,
such as archiving, extracting, or displaying content.
Unlike most other Linux commands, prefixing options with a hyphen or a dash is optional
when using tar.
This is because the earliest versions of tar did not require the hyphen.
However, the modern convention is to use a hyphen to specify options for a given command.
So tar allows for options to be specified with a hyphen to conform to modern conventions,
and it also allows for options to be specified without a hyphen to adhere to the earliest
uses of the command.
If this sounds a bit confusing, don't worry, I'll give you some examples in just a minute
to clear things up.
In this lesson, you will learn:
- Use the tar command to create a new archive. The c option instructs tar to create an archive, the v option can optionally be used to display each file as it's archived, and the f option directs tar to output the archive to the named file. (tar cvf /path/to/tarfile.tar /path/to/source)
- The archive file is created in the current working directory if no path is specified.
- Use .tar file extension as a best practice when creating tar files. This indicates that the file is a tar-created archive.
- Multiple files or directories can be named to be added to the archive, or entire directory structures can be archived using tar.
- Tar can also archive other tar files. For example, an archive file archive.tar could contain other archive files within it.
In this lesson, you will learn:
- Both relative and absolute file paths can be used when archiving files.
- Relative paths start from the current directory, while absolute paths start with a forward slash from the root of the file system.
- By default, 'tar' does not include the initial forward slash in absolute paths when storing files in the archive.
- The initial forward slash is removed to prevent accidental overwriting of existing files and to provide flexibility when extracting archive contents.
- If the absolute path is used to create a tarball, the leading forward slash is removed.
- If the content is extracted, a directory is created in the current working directory, not in the exact absolute location.
- To force files to be extracted using the exact absolute path, you can either change to the root directory before extraction or use the '-P' option during the creation of the archive. This preserves the initial forward slash.
- It is recommended to only use the '-P' option if necessary as it is not the default setting for tar.
- An example command to force tar to preserve the full absolute path is: tar -cvPf [filename].tar [file_to_archive].
In this lesson, you will learn:
- To display contents of an archive with the tar command, use the t option. t can be thought of as "table of contents".
- Optionally use the v option to display detailed info on files and directories in the archive, including permissions and ownership.
- Specify f option to tell tar to use the first argument as the archive file to examine.
- It's generally assumed user wants to see entire content of an archive, but a specific part can be viewed by supplying existing path in the archive.
- The tar command doesn't traditionally use dashes or hyphens for arguments, though it's still possible. Using tar with or without a hyphen for options yields the same result.
In this lesson, you will learn:
- The x option in tar extracts the contents of an archive.
- The v option displays the name of each file as it's extracted.
- The f option uses the first argument as the archive to extract from.
- Existing files with matching name and locations will be overwritten when you extract from an archive.
- Tar uses the file paths stored in the archive to locate where to place files.
- Unless the -P option is used, these paths will be relative, meaning the files will extract into your current directory.
- If -P option is used, files extracts into the root directory.
- While extracting, ensure you're in the correct directory.
- You can utilize the command 'tree' to check existing files under current directory.
- A partial extraction from the tar ball can be performed.
- Original directory structures are created under the current directory after extraction.
- Wildcards can be used to extract certain files only by using the --wildcards option.
- The --wildcards option goes after the name of the tar ball during extraction.
- Prior existing directories are not recreated during extraction.
In this lesson, you will learn:
- Compression is used to reduce bandwidth for file transfers and disk space for storage.
- Daily use files are usually not compressed as it renders them unusable for most applications.
- Image files like JPEGs are an exception, as they are often compressed and handled well by image processing software.
- There are two types of compression: lossless and lossy.
- Lossless compression retains original data, making it ideal for applications requiring preservation of exact original data.
- Lossy compression, which allows some data loss upon compression and decompression, is appropriate where minor data loss is acceptable like in JPEG images and MP4 videos.
- Data compression utilizes various methods such as replacing long strings of identical characters or frequently used character strings with a shorter version.
- Compression ratio measures the efficiency of a compression algorithm by comparing the original and reduced file sizes.
- Factors such as the compression algorithm, type of data, and the compression level requested can influence the compression ratio.
- High levels of compression make smaller files, but require more time, memory, and CPU resources.
- A trade-off between compression level and computational resources is needed when deciding on a compression strategy.
In this lesson, you will learn:
- Compression tools commonly used on Linux are xz, gzip2, and gzip. They create lossless compressed files.
- xz provides the best compression ratio. However, it may be slow for large files. Its decompression tool is unxz, and files are saved with an .xz extension.
- Bzip2 is quicker than xz but does not compress as efficiently. bunzip2 is the decompression tool for bz2 files.
- Gzip is the fastest compression tool but has a less effective compression ratio. The decompression tool is gunzip, and files are saved with a .gz extension.
- The time taken to create an archive and compression ratio can be based on the type and size of the data.
- File decompression must be done using the tool that compressed it.
- The file extension indicates the tool to use for decompression.
- Compression tools have utilities for viewing the contents of the compressed files.
- Upon file compression, the original file is removed, and the name is retained but with the added relevant extension.
- Decompression tools rename the decompressed file back to the original, and the compressed file is removed.
- The compression level can be altered using options 01 through -9, with -9 indicating the highest compression level.
In this lesson, you will learn:
- The tar command can be used to compress the resulting tarball, allowing for archiving and compressing data with a single command.
- Using the standard naming convention for the file extension of the compressed tarball is recommended for clarity.
- Different options can be utilized for varying compression methods: j for bzip2, J for xz, and z for gzip.
In this lesson, you will learn:
- Sharing data between Linux and Windows requires use of Windows compatible utilities to create archives.
- Many Windows users lack the software to extract from Linux-based tarballs or compressed files.
- Most Linux distributions include zip and unzip utilities for creating and extracting from Windows-compatible zip files.
- If these utilities are not installed, they can be added from your Linux distribution's repository.
- When archiving entire directories, use the -R option with the zip utility, otherwise the contents of the directory will not be included.
- Compression is incorporated in these utilities like their Windows counterparts, eliminating the need to archive and compress files separately.
In this lesson, you will learn:
- Learned how to archive and compress files.
- Main reasons for archiving and compressing are reducing storage usage, increasing data transfer speeds, and compliance with legal requirements.
- Got acquainted with Linux tools for archiving and compressing files: GNU tar (standard tool), xz, bzip2, gzip.
- Explored methods to restore compressed files to their original form without data loss using unxz, bunzip2, gunzip.
- Learned how to combine tar with xz, bzip2, or gzip to archive and compress files using a single command.
- Learned how to use zip and unzip for creating and extracting from a Windows-formatted zip file.
In this lesson, you will learn:
- The lesson teaches methods to view, search, and modify file contents.
- Learners will understand how to chain or combine commands using pipes.
- The lesson covers techniques for redirecting the input and output of commands.
- The educational content includes advanced search functionality using complex pattern matching techniques.
- These skills are not only certification requirements but are also applicable in daily tasks in a Linux environment.
- The gained knowledge can be utilized to manage system logs, automate tasks, solve problems and manipulate data on Linux systems.
In this lesson, you will learn:
- You can use commands 'head' and 'tail' to view the contents of files.
- The 'head' command is used to inspect the beginning or top part of a file, while the 'tail' command is used for the end part.
- These commands are beneficial when checking the first or last few lines of large files such as log or configuration files, without needing to scroll through the entire file.
- By default, 'head' displays the first 10 lines, and 'tail' shows the last 10 lines of a file.
- To view a different number of lines, use the '-n' option followed by the desired number. For example, 'head -n 20' will show the first 20 lines.
- The 'tail' command is useful for viewing most recent log entries without viewing the complete file.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.