# [Completed] Professional Google Cybersecurity Specialization C4/8;Tools of the Trade: Linux and SQL

Hello, and welcome to Tools of the Trade: Linux and SQL, the fourth course in the Google Cybersecurity Certificate. You're on an exciting journey!  
  
By the end of this course, you will develop a greater understanding of the basics of computing that will support your work as a security analyst. You will learn foundational concepts related to understanding operating systems, communicating with the Linux operating system through commands, and querying databases with Structured Query Language (SQL). These are key concepts in the cybersecurity field and understanding them will help you keep organizations secure.

# All things Operating System

# Introduction to Course 4

<div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-hi%21-welcome-to-this-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Hi! Welcome to this course" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Hi! Welcome to this course </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">on computing basics for security. </span></div><div aria-label="toggle video from My name is Kim, and I work as" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">My name is Kim, and I work as </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a Technical Program Manager in security. </span></div><div aria-label="toggle video from I grew up with computers and the internet" class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I grew up with computers and the internet </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">but didn't really consider security as </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a career opportunity until I saw </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">how it was interwoven into technology. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-before-my-first-secu"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Before my first security job," class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Before my first security job, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I worked on a cloud application team </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and had to regularly interact with the security team. </span></div><div aria-label="toggle video from It was my first experience working with security," class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">It was my first experience working with security, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">but the idea of protecting information and working </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">with others towards that goal was exciting to me. </span></div><div aria-label="toggle video from As a result, I decided to work towards my CISSP," class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">As a result, I decided to work towards my CISSP, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">which led me to some new job </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">opportunities at my company, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and I was then able to move into security. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--1"></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-at-this-point%2C-if-yo"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from At this point, if you've been following along," class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0">  
</div><div aria-label="toggle video from At this point, if you've been following along," class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">At this point, if you've been following along, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you've already explored a variety of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">concepts useful to the security field, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">including security domains and networking. </span></div><div aria-label="toggle video from I'm excited to join you" class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I'm excited to join you </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">during the next part of the program. </span></div><div aria-label="toggle video from We'll take it slow so that you can" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">We'll take it slow so that you can </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">understand these topics in practical ways. </span></div><div aria-label="toggle video from We'll take it slow so that you can" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The focus of this course is computing basics. </span></div><div aria-label="toggle video from When you understand how" class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">When you understand how </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the machines in an organization's system work, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">it helps you do your job as </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a security analyst more efficiently. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--2"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-part-of-your-job-as-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Part of your job as a security analyst is to" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Part of your job as a security analyst is to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">keep systems protected from possible attacks. </span></div><div aria-label="toggle video from You're one of the first levels of" class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You're one of the first levels of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">defense in protecting an organization's data. </span></div><div aria-label="toggle video from You're one of the first levels of" class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">To do this effectively, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">it's helpful to understand how </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the system you're protecting works. </span></div><div aria-label="toggle video from In addition, you may need to" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In addition, you may need to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">investigate events to help correct errors in the system. </span></div><div aria-label="toggle video from Being familiar with Linux operating system" class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Being familiar with Linux operating system </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and its associated commands, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and also being able to interact with </span></div><div aria-label="toggle video from an organization's data through" class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">an organization's data through </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">SQL, will help you with that. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--3"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-in-this-course%2C-you%27"><div aria-label="toggle video from In this course, you'll learn about" class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In this course, you'll learn about </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">operating systems and how they </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">relate to applications and hardware. </span></div><div aria-label="toggle video from Next, you'll explore" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Next, you'll explore </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the Linux operating system in more detail. </span></div><div aria-label="toggle video from Then you'll use the Linux command line" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Then you'll use the Linux command line </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">within a security context. </span></div><div aria-label="toggle video from Finally, we'll discuss how you can use SQL to query" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Finally, we'll discuss how you can use SQL to query </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">databases while working as a security analyst. </span></div><div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I'm excited to explore all of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">these topics with you. Let's get started. </span></div></div><div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk--4" role="button" tabindex="0">---

---

</div>## Course 4 content

because im legally not allowed to tell you the contents of the quizzes or its answers, the contents of the self review activities or interactive plugins. i wont be sharing that stuff but if you learn whats in this book you can probs do the quizzes pretty easly. however if you suck at writing idk maybe not so easly.

Each course of this certificate program is broken into weeks. You can complete courses at your own pace, but the weekly breakdowns are designed to help you finish the entire Google Cybersecurity Certificate in about six months.

What’s to come? Here’s a quick overview of the skills you’ll learn in each week of this course.

### **Week 1: Introduction to operating systems**

<div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk--5" role="button" tabindex="0"><div><figure contenteditable="false" role="figure">![Five icons show the course followed by the four weeks sequentially from left to right with week 1 highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/bwtSKiGTTxuSrZsTlsLYUA_923e87c785f0485288d23449e1d6bef1_Tools-R-057-1.png?expiry=1688601600000&hmac=8_I2nGMuJm8k4EfmMcP2hLJrmMN8fz37AiZex6YPlwI)</figure></div></div>You will learn about the relationship between operating systems, hardware, and software, and become familiar with the primary functions of an operating system. You'll recognize common operating systems in use today and understand how the graphical user interface (GUI) and command-line interface (CLI) both allow users to interact with the operating system.

### **Week 2: The Linux operating system**

<div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk--6" role="button" tabindex="0"><div><figure contenteditable="false" role="figure">![Five icons show the course followed by the four weeks sequentially from left to right with week 2 highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/NsymSNVTRuKAQzwY4ZWTgw_c8fe0a9aad2040c2bd0a39dbb2dfc2f1_Tools-R-057-2.png?expiry=1688601600000&hmac=A8k0ggwj4QCaY4jwvPRtN3v0M_8QxzjmcYeKLVrKbJU)</figure></div></div>You will be introduced to the Linux operating system and learn how it is commonly used in cybersecurity. You’ll also learn about Linux architecture and common Linux distributions. In addition, you'll be introduced to the Linux shell and learn how it allows you to communicate with the operating system.

### **Week 3: Linux commands in the Bash shell**

<div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk--7" role="button" tabindex="0"><div><figure contenteditable="false" role="figure">![Five icons show the course followed by the four weeks sequentially from left to right with week 3 highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/p8ItiR5rTW6X3Fp0WRH-lQ_f0348ea2bc574ea0ad3e5e4446f807f1_Tools-R-057-3.png?expiry=1688601600000&hmac=KuTaLD1pf6jtt48QvbHenSzdWtJ_WNebIgkBL9Noon4)</figure></div></div>You will be introduced to Linux commands as entered through the Bash shell. You'll use the Bash shell to navigate and manage the file system and to authorize and authenticate users. You'll also learn where to go for help when working with new Linux commands.

### **Week 4: Databases and SQL** 

<div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk--9" role="button" tabindex="0"><div><figure contenteditable="false" role="figure">![Five icons show the course followed by the four weeks sequentially from left to right with week 4 highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/mtU5Yty2Sd6jxhEQ7URXUQ_e88198b54d2a4c9793a92e7a261d59f1_Tools-R-057-4.png?expiry=1688601600000&hmac=rZzlrfOwxcdGgxroNQu0AwPC8N2cUvFR3FuCNP58EpQ)</figure></div></div>You will practice using SQL to communicate with databases. You'll learn how to query a database and filter the results. You’ll also learn how SQL can join multiple tables together in a query.

## What to expect

Each course offers many types of learning opportunities:

<div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk-videos-led-by-google" role="button" tabindex="0">- **Videos** led by Google instructors teach new concepts, introduce the use of relevant tools, offer career support, and provide inspirational personal stories.
- **Readings** build on the topics discussed in the videos, introduce related concepts, share useful resources, and describe case studies.
    
    
    - the following are available exclusively on Coursera
- **Discussion prompts** explore course topics for better understanding and allow you to chat and exchange ideas with other learners in the [discussion forums<svg aria-labelledby="cds-react-aria-815-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--10" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/discussions)
- **Self-review activities** and **labs** give you hands-on practice in applying the skills you are learning and allow you to assess your own work by comparing it to a completed example.
- **Interactive plug-ins** encourage you to practice specific tasks and help you integrate knowledge you have gained in the course.
- **In-video quizzes** help you check your comprehension as you progress through each video.
- **Practice quizzes** allow you to check your understanding of key concepts and provide valuable feedback.
- **Graded quizzes** demonstrate your understanding of the main concepts of a course. You must score 80% or higher on each graded quiz to obtain a certificate, and you can take a graded quiz multiple times to achieve a passing score.

</div>because im legally not allowed to tell you the contents of the quizzes or its answers, the contents of the self review activities or interactive plugins. i wont be sharing that stuff but if you learn whats in this book you can probs do the quizzes pretty easily. however if you suck at writing idk maybe not so easily.

<div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk--11" role="button" tabindex="0"></div>## Tips for success

<div aria-label="toggle video from I'm excited to explore all of" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" id="bkmrk-it-is-strongly-recom" role="button" tabindex="0">- It is strongly recommended that you go through the items in each lesson in the order they appear because new information and concepts build on previous knowledge.
- Participate in all learning opportunities to gain as much knowledge and experience as possible.
- If something is confusing, don’t hesitate to replay a video, review a reading, or repeat a self-review activity.
- Use the additional resources that are referenced in this course. They are designed to support your learning. You can find all of these resources in the [Resources<svg aria-labelledby="cds-react-aria-816-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--12" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/resources/y7Px8)
- tab.
- When you encounter useful links in this course, bookmark them so you can refer to the information later for study or review.
- Understand and follow the [Coursera Code of Conduct<svg aria-labelledby="cds-react-aria-817-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--13" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.support/s/article/208280036-Coursera-Code-of-Conduct)

<span aria-hidden="true" class="cds-731 css-80vnnb cds-733">to ensure that the learning community remains a welcoming, friendly, and supportive place for all members.</span></div>

# Helpful resources and tips

As a learner, you can choose to complete one or multiple courses in this program. However, to obtain the Google Cybersecurity Certificate, you must complete all the courses. This reading describes what is required to obtain a certificate and best practices for you to have a good learning experience on Coursera.

## Course completion to obtain a certificate

To submit graded assignments and be eligible to receive a Google Cybersecurity Certificate, you must:

<div class="rc-CML" dir="auto" id="bkmrk-pay-the-course-certi"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- Pay the [course certificate fee<svg aria-labelledby="cds-react-aria-835-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk-" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.support/s/article/209818963-Payments-on-Coursera?language=en_US)

</div></div></div></div></div>or apply and be approved for a Coursera [scholarship<svg aria-labelledby="cds-react-aria-836-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--1" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.support/s/article/209819033-Apply-for-Financial-Aid-or-a-Scholarship?language=en_US)

- .
- Pass all graded quizzes in the eight courses with a score of at least 80%. Each graded quiz in a course is part of a cumulative grade for that course.

## Healthy habits for course completion

Here is a list of best practices that will help you complete the courses in the program in a timely manner:

- **Plan your time:** Setting regular study times and following them each week can help you make learning a part of your routine. Use a calendar or timetable to create a schedule, and list what you plan to do each day in order to set achievable goals. Find a space that allows you to focus when you watch the videos, review the readings, and complete the activities.
- **Work at your own pace:** Everyone learns differently, so this program has been designed to let you work at your own pace. Although your personalized deadlines start when you enroll, feel free to move through the program at the speed that works best for you. There is no penalty for late assignments; to earn your certificate, all you have to do is complete all of the work. You can extend your deadlines at any time by going to **Overview** in the navigation panel and selecting **Switch Sessions**. If you have already missed previous deadlines, select **Reset my deadlines** instead.
- **Be curious:** If you find an idea that gets you excited, act on it! Ask questions, search for more details online, explore the links that interest you, and take notes on your discoveries. The steps you take to support your learning along the way will advance your knowledge, create more opportunities in this high-growth field, and help you qualify for jobs.
- **Take notes:** Notes will help you remember important information in the future, especially as you’re preparing to enter a new job field. In addition, taking notes is an effective way to make connections between topics and gain a better understanding of those topics.
- **Review exemplars:** Exemplars are completed assignments that fully meet an activity's criteria. Many activities in this program have exemplars for you to validate your work or check for errors. Although there are often many ways to complete an assignment, exemplars offer guidance and inspiration about how to complete the activity.
- **Chat (responsibly) with other learners:** If you have a question, chances are, you’re not alone. Use the [discussion forums<svg aria-labelledby="cds-react-aria-837-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--2" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/discussions)

to ask for help from other learners taking this program. You can also visit Coursera’s [Global Online Community<svg aria-labelledby="cds-react-aria-838-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--3" role="img" viewbox="0 0 16 16" width="16"></svg>](https://coursera.community/). Other important things to know while learning with others can be found in the [Coursera Honor Code<svg aria-labelledby="cds-react-aria-839-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--4" role="img" viewbox="0 0 16 16" width="16"></svg>](https://learner.coursera.help/hc/en-us/articles/209818863-Coursera-Honor-Code) and [Code of Conduct<svg aria-labelledby="cds-react-aria-840-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--5" role="img" viewbox="0 0 16 16" width="16"></svg>](https://learner.coursera.help/hc/en-us/articles/208280036-Coursera-Code-of-Conduct)

- .
- **Update your profile:** Consider [updating your profile<svg aria-labelledby="cds-react-aria-841-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--6" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/account/profile)

- on Coursera to include your photo, career goals, and more. When other learners find you in the discussion forums, they can click on your name to access your profile and get to know you better.

## Documents, spreadsheets, presentations, and labs for course activities

To complete certain activities in the program, you will need to use digital documents, spreadsheets, presentations, and/or labs. Security professionals use these software tools to collaborate within their teams and organizations. If you need more information about using a particular tool, refer to these resources:

- [Microsoft Word: Help and learning<svg aria-labelledby="cds-react-aria-842-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--7" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.microsoft.com/en-us/word)
- : Microsoft Support page for Word
- [Google Docs<svg aria-labelledby="cds-react-aria-843-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--8" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.google.com/docs/topic/9046002?hl=en&ref_topic=1382883)
- : Help Center page for Google Docs
- [Microsoft Excel: Help and learning<svg aria-labelledby="cds-react-aria-844-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--9" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.microsoft.com/en-us/excel)
- : Microsoft Support page for Excel
- [Google Sheets<svg aria-labelledby="cds-react-aria-845-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--10" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.google.com/docs/topic/9054603?hl=en&ref_topic=1382883)
- : Help Center page for Google Sheets
- [Microsoft PowerPoint: Help and learning<svg aria-labelledby="cds-react-aria-846-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--11" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.microsoft.com/en-us/powerpoint)
- : Microsoft Support page for PowerPoint
- [How to use Google Slides<svg aria-labelledby="cds-react-aria-847-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--12" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.google.com/docs/answer/2763168?hl=en&co=GENIE.Platform%3DDesktop)
- : Help Center page for Google Slides
- [Common problems with labs<svg aria-labelledby="cds-react-aria-848-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--13" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.google.com/qwiklabs/answer/9133560?hl=en&ref_topic=9134804)

- : Troubleshooting help for Qwiklabs activities

## Weekly, course, and certificate glossaries

This program covers a lot of terms and concepts, some of which you may already know and some of which may be unfamiliar to you. To review terms and help you prepare for graded quizzes, refer to the following glossaries:

- **Weekly glossaries**: At the end of each week’s content, you can review a glossary of terms from that week. Each week’s glossary builds upon the terms from the previous weeks in that course. The weekly glossaries are not downloadable; however, all of the terms and definitions are included in the course and certificate glossaries, which are downloadable.
- **Course glossaries**: At the end of each course, you can access and download a glossary that covers all of the terms in that course.
- **Certificate glossary**: The certificate glossary includes all of the terms in the entire certificate program and is a helpful resource that you can reference throughout the program or at any time in the future.

You can access and download the certificate glossaries and save them on your computer. You can always find the course and certificate glossaries through the course’s [Resources<svg aria-labelledby="cds-react-aria-849-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--14" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/resources/FUN4o)

section. To access the **Cybersecurity Certificate glossary**, click the link below and select *Use Template*.

- [Cybersecurity Certificate glossary<svg aria-labelledby="cds-react-aria-850-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--15" role="img" viewbox="0 0 16 16" width="16"></svg>](https://docs.google.com/document/d/1Feb8pHRY-blnpaLOohds2esd6IWdCIp-ikG7G_omSj4/template/preview?usp=sharing&resourcekey=0-YHcAISkCiqGDq5KwO6yNeQ)

OR

- If you don’t have a Google account, you can download the glossary directly from the attachment below.

<div id="bkmrk--17">- [click to donwload the doc](https://d3c33hcgiwev3.cloudfront.net/Q__8HGJKSWKvlbOKLdTtkg_ad50d57e3f79455783a12f606c297af1_Google-Cybersecurity-Certificate-glossary.docx?Expires=1688601600&Signature=WFHqYgcAFHo9Q7oNKvfQ4mhd3UMdBH~VvaEnwJUxXkb9Hw4dG1Mk6TSfVPryJArjtJuJou~tzWwmHchZAkJph-zhuE9XkUtcRiyjRXX90yBGs3B335JBRpDzW9wdLZPfx7KAusM6Ye55lmrgvLPO5dW3FyQdHeXlLE4RDVMGtxM_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A)

</div>## Course feedback

Providing feedback on videos, readings, and other materials is easy. With the resource open in your browser, you can find the thumbs-up and thumbs-down symbols.

- Click **thumbs-up** for materials that are helpful.
- Click **thumbs-down** for materials that are not helpful.

If you want to flag a specific issue with an item, click the flag icon, select a category, and enter an explanation in the text box. This feedback goes back to the course development team and isn’t visible to other learners. All feedback received helps to create even better certificate programs in the future.

For technical help, visit the [Learner Help Center<svg aria-labelledby="cds-react-aria-852-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--18" role="img" viewbox="0 0 16 16" width="16"></svg>](https://learner.coursera.help/hc/en-us)

.

# Welcome to week 1;  Introduction to operating systems

<div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-how-many-times-a-wee"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from How many times a week do you use a computer?" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">How many times a week do you use a computer? </span></div><div aria-label="toggle video from For some of us, the answer might be "a lot"!" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">For some of us, the answer might be "a lot"! </span></div><div aria-label="toggle video from They are incredible machines that" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">They are incredible machines that </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">let us do everything from using </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">specialized applications when completing a task at work </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">to sending emails to loved ones in a distant place. </span></div><div aria-label="toggle video from Have you ever thought about how computers" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Have you ever thought about how computers </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">can do all of this? </span></div><div aria-label="toggle video from Have you ever thought about how computers" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Well, that's where opperating systems come in.</span></div><div aria-label="toggle video from Have you ever thought about how computers" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"></div></div></div></div><div class="phrases" id="bkmrk-in-this-section%2C-we%27"><div aria-label="toggle video from In this section, we'll learn about" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"></div></div></div></div><div aria-label="toggle video from In this section, we'll learn about" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In this section, we'll learn about </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">common operating systems, and we'll explore </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the main functions of an operating system. </span></div><div aria-label="toggle video from Then, we'll learn the relationship between" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Then, we'll learn the relationship between </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">operating systems, applications, and hardware. </span></div><div aria-label="toggle video from Finally, we'll compare" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Finally, we'll compare </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">graphical user interfaces and command-line interfaces. </span></div><div aria-label="toggle video from The command-line interface will be" class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The command-line interface will be </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">an essential part of your job as a security analyst. </span></div><div aria-label="toggle video from Understanding operating systems is" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Understanding operating systems is </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">an important foundation for your career in security. </span></div></div><div aria-label="toggle video from Understanding operating systems is" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" id="bkmrk--1" role="button" tabindex="0"></div><div aria-label="toggle video from Understanding operating systems is" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" id="bkmrk--2" role="button" tabindex="0"></div><div aria-label="toggle video from Understanding operating systems is" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" id="bkmrk--3" role="button" tabindex="0"></div><div class="phrases" id="bkmrk-there%27s-so-much-to-e"><div aria-label="toggle video from There's so much to explore. Let's begin." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">There's so much to explore. Let's begin. </span></div><div aria-label="toggle video from There's so much to explore. Let's begin." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0">---

</div><div aria-label="toggle video from There's so much to explore. Let's begin." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Devices like computers, smartphones, and tablets all have operating systems." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Devices like computers, smartphones, and tablets all have operating systems. </span></div><div aria-label="toggle video from If you've used a desktop or laptop computer," class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">If you've used a desktop or laptop computer, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you may have used the Windows or MacOs operating systems. Smartphones and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">tablets run on mobile operating systems like Android and iOS. </span></div><div aria-label="toggle video from Another popular operating system is Linux." class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Another popular operating system is Linux. </span></div><div aria-label="toggle video from Linux is used in the security industry," class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Linux is used in the security industry, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and as a security professional, it's likely that you'll interact with the Linux OS. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from So what exactly is an operating system?" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">So what exactly is an operating system? </span></div><div aria-label="toggle video from It's the interface between the computer hardware and the user." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">It's the interface between the computer hardware and the user. </span></div><div aria-label="toggle video from The operating system, or the OS as it's commonly called, is responsible for" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The operating system, or the OS as it's commonly called, is responsible for </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">making the computer run as efficiently as possible while also making it easy to use. </span></div><div aria-label="toggle video from Hardware may be another new term." class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Hardware may be another new term. </span></div><div aria-label="toggle video from Hardware refers to the physical components of a computer." class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Hardware refers to the physical components of a computer. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The OS interface that we now rely on every day is something that early" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The OS interface that we now rely on every day is something that early </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">computers didn't have. </span></div><div aria-label="toggle video from In the 1950s the biggest challenge with early computers was the amount of time" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In the 1950s the biggest challenge with early computers was the amount of time </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">it took to run a computer program. At the time, computers could not run multiple </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">programs simultaneously. </span></div><div aria-label="toggle video from Instead, people had to wait for a program to finish running," class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Instead, people had to wait for a program to finish running, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">reset the computer, and load up the new program. </span></div><div aria-label="toggle video from Imagine having to turn your computer on and" class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Imagine having to turn your computer on and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">off each time you had to open a new application! </span></div><div aria-label="toggle video from It would take a long time to complete a simple task like sending an email." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">It would take a long time to complete a simple task like sending an email. </span></div><div aria-label="toggle video from Since then, operating systems have evolved, and" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Since then, operating systems have evolved, and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">we no longer have to worry about wasting time in this way. </span></div><div aria-label="toggle video from Thanks to operating systems and their evolution," class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Thanks to operating systems and their evolution, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">today's computers run efficiently. </span></div><div aria-label="toggle video from They run multiple applications at once, and" class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">They run multiple applications at once, and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">they also access external devices like printers, keyboards, and mice. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Another reason why operating systems are important is that they help humans and" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Another reason why operating systems are important is that they help humans and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">computers communicate with each other. </span></div><div aria-label="toggle video from Computers communicate in a language called binary, which consists of 0s and 1s." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Computers communicate in a language called binary, which consists of 0s and 1s. </span></div><div aria-label="toggle video from The OS provides an interface to bridge this communication gap between the user" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The OS provides an interface to bridge this communication gap between the user </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and the computer, allowing you to interact with the computer in complex ways. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-arowdh cds-597 cds-grid-item cds-642 cds-667"><div><div class="rc-TranscriptHighlighter css-79elbk"><div class="rc-Transcript css-9li235" data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="interactive_transcript" data-track-page="item_layout" role="presentation"><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Operating systems are critical for the use of computers. Likewise," class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Operating systems are critical for the use of computers. Likewise, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">OS security is also critical for the security of a computer. </span></div><div aria-label="toggle video from This involves securing files, data access, and user authentication to" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">This involves securing files, data access, and user authentication to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">help protect and prevent against threats such as viruses, worms, and malware. </span></div><div aria-label="toggle video from Knowing how operating systems work is essential for" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Knowing how operating systems work is essential for </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">completing different security related tasks. </span></div><div aria-label="toggle video from For example, as a security analyst, you may be responsible for configuring and" class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">For example, as a security analyst, you may be responsible for configuring and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">maintaining the security of a system by managing access. </span></div><div aria-label="toggle video from You may also be responsible for managing and configuring firewalls," class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You may also be responsible for managing and configuring firewalls, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">setting security policies, enabling virus protection, and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">performing auditing, accounting, and logging to detect unusual behavior. </span></div><div aria-label="toggle video from All these tasks require a deep understanding of operating systems, and" class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">All these tasks require a deep understanding of operating systems, and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">as we continue this course, we'll explore operating systems in greater detail. </span></div></div></div></div></div></div></div></div><div class="cds-595 css-hcqebr cds-597 cds-grid-item cds-642 cds-660"><div class="cds-1106 cds-formControl-root css-4p0j7c cds-1109">  
</div></div><div class="cds-1106 cds-formControl-root css-4p0j7c cds-1109"><div class="cds-1144 cds-1129 cds-input-root cds-input-onLight cds-select-field-root css-rg9d6z cds-1145"><fieldset aria-hidden="true" class="cds-1166 cds-1138 cds-input-notchedOutline" style="padding-left: 8px;"><legend class="cds-1167" style="width: 0.01px;">​</legend></fieldset></div></div>---

<div class="cds-595 css-8xlvzn cds-596"><div class="cds-595 css-0 cds-597 cds-grid-item"><div class="rc-ItemFeedback css-1f0x564"><div class="rc-ItemFeedbackContent horizontal-box css-lfchfm"><div class="css-e40v4" data-testid="like-button"><div class="rc-LikeContent"><div>  
</div></div></div></div></div></div></div><div class="css-e40v4" data-testid="dislike-button"><div class="rc-LikeContent"><div>  
</div></div></div><div class="cds-595 css-0 cds-597 cds-grid-item"><div class="rc-ItemFeedback css-1f0x564"><div class="rc-ItemFeedbackContent horizontal-box css-lfchfm"><div class="css-e40v4"><div class="rc-FlagContent css-8dn4zy" id="bkmrk--4"><div aria-live="polite" role="alert">  
</div><div class="ReactModalPortal">  
</div></div></div></div></div></div><div class="cds-595 css-0 cds-597 cds-grid-item"><div class="rc-ShareButtonWithModal" data-e2e="universal-share-cta"><div aria-label="Share this video" data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="universal_sharing_cta" data-track-page="item_layout" role="button" tabindex="0">  
</div></div></div><div class="rc-Course" role="none"><div class="rc-LegacyDataFetch"><section class="cds-595 css-kt8aw0 cds-596 cds-599"><div class="cds-595 css-0 cds-596 cds-597 cds-grid-item cds-602 cds-605"><div class="cds-595 css-1fsmhyl cds-596 cds-597 cds-grid-item cds-599 cds-602" id="bkmrk--5"><div class="cds-595 css-12jam8y cds-597 cds-grid-item cds-642"><main class="item-page-content css-b5no2e" id="bkmrk--6" style="height: 100%;"><div data-testid="faker"></div></main></div></div></div></section></div></div></div></div>

# Kim: My journey into computing

<div class="phrases" id="bkmrk-hi%2C-i%27m-kim.-i%27m-a-t"><div aria-label="toggle video from Hi, I'm Kim." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Hi, I'm Kim. </span></div><div aria-label="toggle video from I'm a technical program manager at Google." class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I'm a technical program manager at Google. </span></div><div aria-label="toggle video from I'm a technical program manager at Google." class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I'm currently working in </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the security, mergers, and acquisitions team. </span></div><div aria-label="toggle video from Where I work with other companies that we purchase," class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Where I work with other companies that we purchase, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and I help them integrate into the Google environment. </span></div><div aria-label="toggle video from I've held multiple roles before getting into" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I've held multiple roles before getting into </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">cybersecurity and even technology. </span></div><div aria-label="toggle video from I first started working as a restaurant worker," class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I first started working as a restaurant worker, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and then I became an English Tutor </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">for international students at my local college. </span></div><div aria-label="toggle video from After doing multiple internships," class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">After doing multiple internships, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and graduating from university, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I had my first opportunity to work in technology, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and that's where my interests in technology, </span></div><div aria-label="toggle video from and eventually cybersecurity began." class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and eventually cybersecurity began. </span></div><div aria-label="toggle video from I want to tell everyone with any type of" class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I want to tell everyone with any type of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">background that you can get into cybersecurity. </span></div><div aria-label="toggle video from If you're interested in protecting information," class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">If you're interested in protecting information, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">if you're interested in protecting people in the future, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">security is there for you. </span></div><div aria-label="toggle video from There are so many different roles you can do," class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">There are so many different roles you can do, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and all of the skills that you have now, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and that you've gathered previously, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">can be applicable within security. </span></div><div aria-label="toggle video from The skill that I use the most is" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The skill that I use the most is </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">connecting with people every day. </span></div><div aria-label="toggle video from connecting with people every day." class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I can't get anything done </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">unless I connect with them the right way. </span></div><div aria-label="toggle video from So that's actually the biggest skill I" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">So that's actually the biggest skill I </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">lean on the most working in security. </span></div><div aria-label="toggle video from A piece of advice I would give" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A piece of advice I would give </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">for someone new starting in </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the cybersecurity field is to keep an open mind. </span></div><div aria-label="toggle video from I started out with a degree in business," class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">I started out with a degree in business, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">so I didn't even feel like I was </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">technical enough to be where I am today. </span></div><div aria-label="toggle video from And before that, all of my experiences" class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">And before that, all of my experiences </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">were either restaurant work, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">or marketing work, or just something that </span></div><div aria-label="toggle video from felt like it was unrelated to technology." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">felt like it was unrelated to technology. </span></div><div aria-label="toggle video from felt like it was unrelated to technology." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">But all of that helped me and motivated me to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">actually kind of get my feet more wet into technology, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and then eventually security. </span></div><div aria-label="toggle video from And before I knew it," class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">And before I knew it, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">that self-doubt was really </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">replaced with more of a support </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">from my peers and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">respect from other people that I've worked with.</span></div></div>

# Compare operating systems

You previously explored why operating systems are an important part of how a computer works. In this reading, you’ll compare some popular operating systems used today. You’ll also focus on the risks of using legacy operating systems.

## Common operating systems

The following operating systems are useful to know in the security industry: Windows, macOS®, Linux, ChromeOS, Android, and iOS.

### **Windows and macOS**

Windows and macOS are both common operating systems. The Windows operating system was introduced in 1985, and macOS was introduced in 1984. Both operating systems are used in personal and enterprise computers.

Windows is a closed-source operating system, which means the source code is not shared freely with the public. macOS is partially open source. It has some open-source components, such as macOS’s kernel. macOS also has some closed-source components.

### **Linux**

The first version of Linux was released in 1991, and other major releases followed in the early 1990s. Linux is a completely open-source operating system, which means that anyone can access Linux and its source code. The open-source nature of Linux allows developers in the Linux community to collaborate.

Linux is particularly important to the security industry. There are some distributions that are specifically designed for security. Later in this course, you’ll learn about Linux and its importance to the security industry.

### **ChromeOS**

ChromeOS launched in 2011. It’s partially open source and is derived from Chromium OS, which is completely open source. ChromeOS is frequently used in the education field.

### **Android and iOS**

Android and iOS are both mobile operating systems. Unlike the other operating systems mentioned, mobile operating systems are typically used in mobile devices, such as phones, tablets, and watches. Android was introduced for public use in 2008, and iOS was introduced in 2007. Android is open source, and iOS is partially open source.

## Operating systems and vulnerabilities

Security issues are inevitable with all operating systems. An important part of protecting an operating system is keeping the system and all of its components up to date.

### **Legacy operating systems**

A **legacy operating system** is an operating system that is outdated but still being used. Some organizations continue to use legacy operating systems because software they rely on is not compatible with newer operating systems. This can be more common in industries that use a lot of equipment that requires embedded software—software that’s placed inside components of the equipment.

Legacy operating systems can be vulnerable to security issues because they’re no longer supported or updated. This means that legacy operating systems might be vulnerable to new threats.

### **Other vulnerabilities**

Even when operating systems are kept up to date, they can still become vulnerable to attack. Below are several resources that include information on operating systems and their vulnerabilities.

<div class="rc-CML" dir="auto" id="bkmrk-microsoft-security-r"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- [Microsoft Security Response Center (MSRC)<svg aria-labelledby="cds-react-aria-1059-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk-" role="img" viewbox="0 0 16 16" width="16"></svg>](https://msrc.microsoft.com/update-guide/vulnerability)

</div></div></div></div></div>- - A list of known vulnerabilities affecting Microsoft products and services
- [Apple Security Updates<svg aria-labelledby="cds-react-aria-1060-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--1" role="img" viewbox="0 0 16 16" width="16"></svg>](https://support.apple.com/en-us/HT201222)
    
    
    - A list of security updates and information for Apple® operating systems, including macOS and iOS, and other products
- [Common Vulnerabilities and Exposures (CVE) Report for Ubuntu<svg aria-labelledby="cds-react-aria-1061-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--2" role="img" viewbox="0 0 16 16" width="16"></svg>](https://ubuntu.com/security/cves)
    
    
    - A list of known vulnerabilities affecting Ubuntu, which is a specific distribution of Linux
- [Google Cloud Security Bulletin<svg aria-labelledby="cds-react-aria-1062-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--3" role="img" viewbox="0 0 16 16" width="16"></svg>](https://cloud.google.com/support/bulletins)
    
    
    - A list of known vulnerabilities affecting Google Cloud products and services

Keeping an operating system up to date is one key way to help the system stay secure. Because it can be difficult to keep all systems updated at all times, it’s important for security analysts to be knowledgeable about legacy operating systems and the risks they can create.

## Key takeaways

Windows, macOS, Linux, ChromeOS, Android, and iOS are all commonly used operating systems. Security analysts should be aware of vulnerabilities that affect operating systems. It’s especially important for security analysts to be familiar with legacy operating systems, which are systems that are outdated but still being used.

# Inside the operating system

<div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-previously%2C-you-lear"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Previously, you learned about what operating systems are." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Previously, you learned about what operating systems are. </span></div><div aria-label="toggle video from Now, let's discuss how they work." class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Now, let's discuss how they work. </span></div><div aria-label="toggle video from In this video, you'll learn what happens with" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In this video, you'll learn what happens with </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">an operating system, or OS, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">when someone uses a computer for a task. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-think-about-when-som"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Think about when someone drives a car." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Think about when someone drives a car. </span></div><div aria-label="toggle video from current lecture segment: They push the gas pedal and the car moves forward." class="rc-Phrase active css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">They push the gas pedal and the car moves forward. </span></div><div aria-label="toggle video from They don't need to pay attention to" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">They don't need to pay attention to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">all the mechanics that allow the car to move. </span></div><div aria-label="toggle video from Just like a car can't work without its engine," class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Just like a car can't work without its engine, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a computer can't work without its operating system. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--1"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-the-job-of-an-os-is-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The job of an OS is to help" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The job of an OS is to help </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">other computer programs run efficiently. </span></div><div aria-label="toggle video from The OS does this by taking care of" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The OS does this by taking care of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">all the messy details related to controlling, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the computer's hardware, so you don't have to. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--2"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-first%2C-let%27s-see-wha"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from First, let's see what" class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">First, let's see what </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">happens when you turn on the computer. </span></div><div aria-label="toggle video from When you press the power button," class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">When you press the power button, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you're interacting with the hardware. </span></div><div aria-label="toggle video from This boosts the computer and" class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">This boosts the computer and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">brings up the operating system. </span></div><div aria-label="toggle video from Booting the computer means that" class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Booting the computer means that </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a special microchip called a BIOS is activated. </span></div><div aria-label="toggle video from On many computers built after 2007," class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">On many computers built after 2007, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the chip was replaced by the UEFI. </span></div><div aria-label="toggle video from Both BIOS and UEFI contain booting instructions that are" class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Both BIOS and UEFI contain booting instructions that are </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">responsible for loading a special program </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">called the bootloader. </span></div><div aria-label="toggle video from Then, the bootloader is" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Then, the bootloader is </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">responsible for starting the operating system. </span></div><div aria-label="toggle video from Just like that, your computer is on." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Just like that, your computer is on. </span></div><div aria-label="toggle video from Just like that, your computer is on." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-as-a-security-analys"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">As a security analyst, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">understanding these processes can be helpful for you. </span></div><div aria-label="toggle video from Vulnerabilities can occur in" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Vulnerabilities can occur in </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">something like a booting process. </span></div><div aria-label="toggle video from Often, the BIOS is not" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Often, the BIOS is not </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">scanned by the antivirus software, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">so it can be vulnerable to malware infection. </span></div><div aria-label="toggle video from Now, that you learned how to boot the operating system," class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Now, that you learned how to boot the operating system, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">let's look at how you and all users </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">communicate with the system to complete a task. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--3"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-the-process-starts-w"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The process starts with you, the user." class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The process starts with you, the user. </span></div><div aria-label="toggle video from And to complete tasks, you use applications on your computer." class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">And to complete tasks, you use applications on your computer. </span></div><div aria-label="toggle video from An application is a program" class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">An application is a program </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">that performs a specific task. </span></div><div aria-label="toggle video from When you do this, the application" class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">When you do this, the application </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">sends your request to the operating system. </span></div><div aria-label="toggle video from From there, the operating system interprets this request" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">From there, the operating system interprets this request </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and directs it to the appropriate component </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">of the computer's hardware. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--4"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-in-the-previous-vide"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In the previous video," class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In the previous video, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">we learned that the hardware consists of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">all the physical components of the computer. </span></div><div aria-label="toggle video from The hardware will also send" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The hardware will also send </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">information back to the operating system. </span></div><div aria-label="toggle video from The hardware will also send" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">And this in turn is sent back to the application. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--5"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-let%27s-give-a-simple-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's give a simple overview of how this works" class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Let's give a simple overview of how this works </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">when you want to use the calculator on your computer. </span></div><div aria-label="toggle video from You use your mouse to click on" class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You use your mouse to click on </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the calculator application on your computer. </span></div><div aria-label="toggle video from When you type in the number you want to calculate," class="rc-Phrase css-ugczj4" data-cue="62" data-cue-index="61" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">When you type in the number you want to calculate, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the application communicates with the operating system. </span></div><div aria-label="toggle video from Your operating system then sends" class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Your operating system then sends </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a calculation to a component of the hardware, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the central processing unit, or CPU. </span></div><div aria-label="toggle video from Once the hardware does the work" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Once the hardware does the work </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">of determining the final number, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">it sends the answer back to your operating system. </span></div><div aria-label="toggle video from Then, it can be displayed in your calculator application." class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Then, it can be displayed in your calculator application. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--6"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-understanding-this-p"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Understanding this process is" class="rc-Phrase css-ugczj4" data-cue="71" data-cue-index="70" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Understanding this process is </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">helpful when investigating security events. </span></div><div aria-label="toggle video from Security analysts should be able to" class="rc-Phrase css-ugczj4" data-cue="73" data-cue-index="72" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Security analysts should be able to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">trace back through this process flow </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">to analyze where a security event could have occurred. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--7"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-arowdh cds-597 cds-grid-item cds-642 cds-667" id="bkmrk-just-like-a-mechanic"><div><div class="rc-TranscriptHighlighter css-79elbk"><div class="rc-Transcript css-9li235" data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="interactive_transcript" data-track-page="item_layout" role="presentation"><div class="cds-595 css-xl5mb3 cds-596"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Just like a mechanic needs to" class="rc-Phrase css-ugczj4" data-cue="76" data-cue-index="75" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Just like a mechanic needs to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">understand the inner workings of a car </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">more than an average driver, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">recognizing how operating systems </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">work is important knowledge for a security analyst. </span></div></div></div></div></div></div></div></div><div class="cds-595 css-hcqebr cds-597 cds-grid-item cds-642 cds-660" id="bkmrk--8"><div class="cds-1233 cds-formControl-root css-4p0j7c cds-1236"></div></div>

# Requests to the operating system

Operating systems are a critical component of a computer. They make connections between applications and hardware to allow users to perform tasks. In this reading, you’ll explore this complex process further and consider it using a new analogy and a new example.

## Booting the computer

When you boot, or turn on, your computer, either a BIOS or UEFI microchip is activated. The **Basic Input/Output System (BIOS)** is a microchip that contains loading instructions for the computer and is prevalent in older systems. The **Unified Extensible Firmware Interface (UEFI)** is a microchip that contains loading instructions for the computer and replaces BIOS on more modern systems.

The BIOS and UEFI chips both perform the same function for booting the computer. BIOS was the standard chip until 2007, when UEFI chips increased in use. Now, most new computers include a UEFI chip. UEFI provides enhanced security features.

The BIOS or UEFI microchips contain a variety of loading instructions for the computer to follow. For example, one of the loading instructions is to verify the health of the computer’s hardware.

The last instruction from the BIOS or UEFI activates the bootloader. The **bootloader** is a software program that boots the operating system. Once the operating system has finished booting, your computer is ready for use.

## Completing a task

As previously discussed, operating systems help us use computers more efficiently. Once a computer has gone through the booting process, completing a task on a computer is a four-part process.

<div class="rc-CML" dir="auto" id="bkmrk-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Shows a process that moves from user to application to operating systems and finally to hardware.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/bfvQyeg_SC-DSgUsegf8PQ_8405d4e94af147e1b98df5150c2fd7f1_CS_R-060_User-Application-Operating-System-Hardware.png?expiry=1688601600000&hmac=EV-flhwJXOjUJkSqojHptL7P7bTzrVMmWqRu1JWgR54)</figure></div></div></div></div></div></div>### User

The first part of the process is the user. The user initiates the process by having something they want to accomplish on the computer. Right now, you’re a user! You’ve initiated the process of accessing this reading.

### Application

The application is the software program that users interact with to complete a task. For example, if you want to calculate something, you would use the calculator application. If you want to write a report, you would use a word processing application. This is the second part of the process.

### Operating system

The operating system receives the user’s request from the application. It’s the operating system’s job to interpret the request and direct its flow. In order to complete the task, the operating system sends it on to applicable components of the hardware.

### Hardware

The hardware is where all the processing is done to complete the tasks initiated by the user. For example, when a user wants to calculate a number, the CPU figures out the answer. As another example, when a user wants to save a file, another component of the hardware, the hard drive, handles this task.

After the work is done by the hardware, it sends the output back through the operating system to the application so that it can display the results to the user.

## The OS at work behind the scenes

Consider once again how a computer is similar to a car. There are processes that someone won’t directly observe when operating a car, but they do feel it move forward when they press the gas pedal. It’s the same with a computer. Important work happens inside a computer that you don’t experience directly. This work involves the operating system.

You can explore this through another analogy. The process of using an operating system is also similar to ordering at a restaurant. At a restaurant you place an order and get your food, but you don’t see what’s happening in the kitchen when the cooks prepare the food.

Ordering food is similar to using an application on a computer. When you order your food, you make a specific request like “a small soup, very hot.” When you use an application, you also make specific requests like “print three double-sided copies of this document.”

You can compare the food you receive to what happens when the hardware sends output. You receive the food that you ordered. You receive the document that you wanted to print.

Finally, the kitchen is like the OS. You don’t know what happens in the kitchen, but it’s critical in interpreting the request and ensuring you receive what you ordered. Similarly, though the work of the OS is not directly transparent to you, it’s critical in completing your tasks.

## An example: Downloading a file from an internet browser

Previously, you explored how operating systems, applications, and hardware work together by examining a task involving a calculation. You can expand this understanding by exploring how the OS completes another task, downloading a file from an internet browser:

<div class="rc-CML" dir="auto" id="bkmrk-first%2C-the-user-deci"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- First, the user decides they want to download a file that they found online, so they click on a download button near the file in the internet browser application.
- Then, the internet browser communicates this action to the OS.
- The OS sends the request to download the file to the appropriate hardware for processing.
- The hardware begins downloading the file, and the OS sends this information to the internet browser application. The internet browser then informs the user when the file has been downloaded.

</div></div></div></div></div>## Key takeaways

Although it operates in the background, the operating system is an essential part of the process of using a computer. The operating system connects applications and hardware to allow users to complete a task.

# Resource allocation via the OS

<div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-now-we%27re-ready-to-d"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now we're ready to discuss" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Now we're ready to discuss </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a different aspect of your operating system. </span></div><div aria-label="toggle video from Not only does the OS" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Not only does the OS </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">interact with other parts of your computer, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">but it's also responsible for </span></div><div aria-label="toggle video from managing the resources of the system." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">managing the resources of the system. </span></div><div aria-label="toggle video from This is a big task that requires a lot of balance to make" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">This is a big task that requires a lot of balance to make </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">sure all the resources of </span></div><div aria-label="toggle video from the computer are used efficiently." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the computer are used efficiently. </span></div><div aria-label="toggle video from Think of this like the concept of energy." class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Think of this like the concept of energy. </span></div><div aria-label="toggle video from A person needs energy to complete different tasks." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A person needs energy to complete different tasks. </span></div><div aria-label="toggle video from current lecture segment: Some tasks need more energy," class="rc-Phrase active css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Some tasks need more energy, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">while others require less. </span></div><div aria-label="toggle video from For example, going for a run" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">For example, going for a run </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">requires more energy than watching TV. </span></div><div aria-label="toggle video from A computer's OS also needs to make sure that it" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A computer's OS also needs to make sure that it </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">has enough energy to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">function correctly for certain tasks. </span></div><div aria-label="toggle video from Running an antivirus scan on your computer will use" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Running an antivirus scan on your computer will use </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">more energy than using the calculator application. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-imagine-your-compute"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Imagine your computer is an orchestra." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Imagine your computer is an orchestra. </span></div><div aria-label="toggle video from Many different instruments like violins," class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Many different instruments like violins, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">drums, and trumpets are all part of the orchestra. </span></div><div aria-label="toggle video from An orchestra also has" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">An orchestra also has </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a conductor to direct the flow of the music. </span></div><div aria-label="toggle video from In a computer, the OS is the conductor." class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In a computer, the OS is the conductor. </span></div><div aria-label="toggle video from In a computer, the OS is the conductor." class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">T</span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">he OS handles resource and memory management to ensure </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the limited capacity of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the computer system is used where it's needed most. </span></div><div aria-label="toggle video from A variety of programs, tasks," class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A variety of programs, tasks, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and processes are constantly competing for </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the resources of the central processing unit, or CPU. </span></div><div aria-label="toggle video from They all have their own reasons why they need memory," class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">They all have their own reasons why they need memory, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">storage, and input/output bandwidth. </span></div><div aria-label="toggle video from The OS is responsible for ensuring that" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The OS is responsible for ensuring that </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">each program is allocating and de-allocating resources. </span></div><div aria-label="toggle video from All this occurs in your computer at" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">All this occurs in your computer at </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the same time so that your system functions efficiently. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--1"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-much-of-this-is-hidd"><div aria-label="toggle video from Much of this is hidden from you as a user." class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Much of this is hidden from you as a user. </span></div><div aria-label="toggle video from For example, your" class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">For example, your </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">browser's task manager will list all of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the tasks that are being processed, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">along with their memory and CPU usage. </span></div><div aria-label="toggle video from For example, your" class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">As an analyst, it's helpful to know </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">where a system's resources are used. </span></div><div aria-label="toggle video from Understanding usage of resources can help you respond" class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Understanding usage of resources can help you respond </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">to an incident and troubleshoot </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">applications in the system. </span></div><div aria-label="toggle video from For example, if a computer is running slowly," class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">For example, if a computer is running slowly, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">an analyst might discover </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">it's allocating resources to malware. </span></div><div aria-label="toggle video from A basic understanding of how" class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A basic understanding of how </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">operating systems work will help you </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">better understand the security skills </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you will learn later in this program. </span></div></div>

# Virtualization technology

You've explored a lot about operating systems. One more aspect to consider is that operating systems can run on virtual machines. In this reading, you’ll learn about virtual machines and the general concept of virtualization. You’ll explore how virtual machines work and the benefits of using them.

## What is a virtual machine?

A **virtual machine (VM)** is a virtual version of a physical computer. Virtual machines are one example of virtualization. Virtualization is the process of using software to create virtual representations of various physical machines. The term “virtual” refers to machines that don’t exist physically, but operate like they do because their software simulates physical hardware. Virtual systems don’t use dedicated physical hardware. Instead, they use software-defined versions of the physical hardware. This means that a single virtual machine has a virtual CPU, virtual storage, and other virtual hardware. Virtual systems are just code.

You can run multiple virtual machines using the physical hardware of a single computer. This involves dividing the resources of the host computer to be shared across all physical and virtual components. For example, **Random Access Memory (RAM)** is a hardware component used for short-term memory. If a computer has 16GB of RAM, it can host three virtual machines so that the physical computer and virtual machines each have 4GB of RAM. Also, each of these virtual machines would have their own operating system and function similarly to a typical computer.

## Benefits of virtual machines

Security professionals commonly use virtualization and virtual machines. Virtualization can increase security for many tasks and can also increase efficiency.

### **Security**

One benefit is that virtualization can provide an isolated environment, or a sandbox, on the physical host machine. When a computer has multiple virtual machines, these virtual machines are “guests” of the computer. Specifically, they are isolated from the host computer and other guest virtual machines. This provides a layer of security, because virtual machines can be kept separate from the other systems. For example, if an individual virtual machine becomes infected with malware, it can be dealt with more securely because it’s isolated from the other machines. A security professional could also intentionally place malware on a virtual machine to examine it in a more secure environment.

**Note:** Although using virtual machines is useful when investigating potentially infected machines or running malware in a constrained environment, there are still some risks. For example, a malicious program can escape virtualization and access the host machine. This is why you should never completely trust virtualized systems.

### **Efficiency**

Using virtual machines can also be an efficient and convenient way to perform security tasks. You can open multiple virtual machines at once and switch easily between them. This allows you to streamline security tasks, such as testing and exploring various applications.

You can compare the efficiency of a virtual machine to a city bus. A single city bus has a lot of room and is an efficient way to transport many people simultaneously. If city buses didn’t exist, then everyone on the bus would have to drive their own cars. This uses more gas, cars, and other resources than riding the city bus.

Similar to how many people can ride one bus, many virtual machines can be hosted on the same physical machine. That way, separate physical machines aren't needed to perform certain tasks.

## Managing virtual machines

Virtual machines can be managed with a software called a hypervisor. Hypervisors help users manage multiple virtual machines and connect the virtual and physical hardware. Hypervisors also help with allocating the shared resources of the physical host machine to one or more virtual machines.

One hypervisor that is useful for you to be familiar with is the Kernel-based Virtual Machine (KVM). KVM is an open-source hypervisor that is supported by most major Linux distributions. It is built into the Linux kernel, which means it can be used to create virtual machines on any machine running a Linux operating system without the need for additional software.

## Other forms of virtualization

In addition to virtual machines, there are other forms of virtualization. Some of these virtualization technologies do not use operating systems. For example, multiple virtual servers can be created from a single physical server. Virtual networks can also be created to more efficiently use the hardware of a physical network.

## Key takeaways

Virtual machines are virtual versions of physical computers and are one example of virtualization. Virtualization is a key technology in the security industry, and it’s important for security analysts to understand the basics. There are many benefits to using virtual machines, such as isolation of malware and other security risks. However, it’s important to remember there’s still a risk of malicious software escaping their virtualized environments.

# GUI versus CLI

<div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-now-that-you%27ve-lear"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now that you've learned the inner workings of computers," class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Now that you've learned the inner workings of computers, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">let's discuss how users and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">operating systems communicate with each other. </span></div><div aria-label="toggle video from Now that you've learned the inner workings of computers," class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">So far, you've learned that a computer has </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">an operating system, hardware, and applications. </span></div><div aria-label="toggle video from Remember, the operating system" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Remember, the operating system </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">communicates with the hardware to execute tasks. </span></div><div aria-label="toggle video from In this video, you'll learn how the" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In this video, you'll learn how the </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">user—that's you—interacts with </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the operating system in order to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">send tasks to the hardware. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-the-user-communicate"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The user communicates with" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The user communicates with </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the operating system via an interface. </span></div><div aria-label="toggle video from A user interface is a program that allows" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A user interface is a program that allows </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a user to control the functions of the operating system. </span></div><div aria-label="toggle video from Two user interfaces that we'll discuss are" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Two user interfaces that we'll discuss are </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the graphical user interface, or </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">GUI, and the command-line interface, or CLI. </span></div><div aria-label="toggle video from Let's cover these interfaces in more detail." class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Let's cover these interfaces in more detail. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--1"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-a-gui-is-a-user-inte"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from A GUI is a user interface that uses icons on" class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A GUI is a user interface that uses icons on </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the screen to manage different tasks on the computer. </span></div><div aria-label="toggle video from Most operating systems can be" class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Most operating systems can be </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">used with a graphical user interface. </span></div><div aria-label="toggle video from If you've used a personal computer or a cell phone," class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">If you've used a personal computer or a cell phone, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you have experienced operating a GUI. </span></div><div aria-label="toggle video from Most GUIs include these components:" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Most GUIs include these components:</span></div><div aria-label="toggle video from Most GUIs include these components:" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733"> </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a start menu with program groups, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a task bar for launching programs, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">and a desktop with icons and shortcuts. </span></div><div aria-label="toggle video from All these components help you" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">All these components help you </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">communicate with the OS to execute tasks. </span></div><div aria-label="toggle video from In addition to clicking on icons," class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In addition to clicking on icons, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">when you use a GUI, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you can also search for files or </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">applications from the start menu. </span></div><div aria-label="toggle video from You just have to remember the icon or name" class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You just have to remember the icon or name </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">of the program to activate an application. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--2"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-now-let%27s-discuss-th"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now let's discuss the command-line interface." class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Now let's discuss the command-line interface. </span></div><div aria-label="toggle video from In comparison, the command-line interface, or CLI," class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In comparison, the command-line interface, or CLI, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">is a text-based user interface </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">that uses commands to interact with the computer. </span></div><div aria-label="toggle video from These commands communicate with" class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">These commands communicate with </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">the operating system and execute </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">tasks like opening programs. </span></div><div aria-label="toggle video from The command-line interface is" class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The command-line interface is </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a much different structure </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">than the graphical user interface. </span></div><div aria-label="toggle video from When you use the CLI," class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">When you use the CLI, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you'll immediately notice a difference. </span></div><div aria-label="toggle video from There are no icons or graphics on the screen." class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">There are no icons or graphics on the screen. </span></div><div aria-label="toggle video from The command-line interface looks similar to" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">The command-line interface looks similar to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">lines of code using certain text languages. </span></div><div aria-label="toggle video from A CLI is more flexible and more powerful than a GUI." class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">A CLI is more flexible and more powerful than a GUI. </span></div><div aria-label="toggle video from Think about using a CLI" class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Think about using a CLI </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">like creating whatever meal you'd like </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">from ingredients bought at a grocery store. </span></div><div aria-label="toggle video from This gives you a lot of control and" class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">This gives you a lot of control and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">customization about what you're going to eat. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--3"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk-in-comparison%2C%C2%A0using"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In comparison," class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In comparison, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">using a GUI is more like ordering food from a restaurant. </span></div><div aria-label="toggle video from You can only order what's on the menu." class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You can only order what's on the menu. </span></div><div aria-label="toggle video from If you want both a noodle dish and pizza," class="rc-Phrase css-ugczj4" data-cue="62" data-cue-index="61" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">If you want both a noodle dish and pizza, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">but the first restaurant you go to only has pizza, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you'll have to go to another restaurant </span></div><div aria-label="toggle video from to order the noodles." class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">to order the noodles. </span></div><div aria-label="toggle video from With a graphical user interface," class="rc-Phrase css-ugczj4" data-cue="66" data-cue-index="65" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">With a graphical user interface, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you must do one task at a time. </span></div><div aria-label="toggle video from But the command-line interface allows for customization," class="rc-Phrase css-ugczj4" data-cue="68" data-cue-index="67" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">But the command-line interface allows for customization, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">which lets you complete multiple tasks simultaneously. </span></div><div aria-label="toggle video from For example, imagine you" class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">For example, imagine you </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">have a folder with hundreds of files of </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">different file types, and you need to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">move only the JPEG files to a new folder. </span></div><div aria-label="toggle video from Think about how slow and" class="rc-Phrase css-ugczj4" data-cue="74" data-cue-index="73" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Think about how slow and </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">tedious this would be as you use a GUI to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">find each JPEG file in </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">this folder and move it into the new one. </span></div><div aria-label="toggle video from On the other hand, the CLI would allow you to" class="rc-Phrase css-ugczj4" data-cue="78" data-cue-index="77" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">On the other hand, the CLI would allow you to </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">streamline this process and move them all at once. </span></div></div></div></div><div class="cds-595 css-xl5mb3 cds-596" id="bkmrk--4"><div class="cds-595 rc-Paragraph css-1lz62pp cds-597 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-as-you-can-see%2C-ther"><div aria-label="toggle video from As you can see, there are" class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">As you can see, there are </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">very big differences in </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">these two types of user interfaces. </span></div><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="83" data-cue-index="82" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">As a security analyst, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">some of your work may involve the command-line interface. </span></div><div aria-label="toggle video from When analyzing logs or" class="rc-Phrase css-ugczj4" data-cue="85" data-cue-index="84" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">When analyzing logs or </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">authenticating and authorizing users, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">security analysts commonly use </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">a CLI in their everyday work. </span></div><div aria-label="toggle video from In this video, we discussed two types of user interfaces." class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">In this video, we discussed two types of user interfaces. </span></div><div aria-label="toggle video from In this video, we discussed two types of user interfaces." class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You learned that you already have </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">experience using a graphical user interface, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">as most personal computers and cell phones use a GUI. </span></div><div aria-label="toggle video from You were introduced to the command-line interface." class="rc-Phrase css-ugczj4" data-cue="93" data-cue-index="92" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You were introduced to the command-line interface. </span></div><div aria-label="toggle video from Later in the program," class="rc-Phrase css-ugczj4" data-cue="94" data-cue-index="93" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">Later in the program, </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">you'll learn how to use a CLI in Linux and how </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">relevant it is to your daily work as a security analyst. </span></div><div aria-label="toggle video from You'll get practical experience" class="rc-Phrase css-ugczj4" data-cue="97" data-cue-index="96" role="button" tabindex="0"><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">You'll get practical experience </span><span aria-hidden="true" class="cds-731 css-80vnnb cds-733">communicating through the command line. Pretty exciting, right? </span></div></div>

# The command line in use

Previously, you explored graphical user interfaces (GUI) and command-line user interfaces (CLI). In this reading, you’ll compare these two interfaces and learn more about how they’re used in cybersecurity.

## CLI vs. GUI

A **graphical user** **interface (GUI)** is a user interface that uses icons on the screen to manage different tasks on the computer. A **command-line interface (CLI)** is a text-based user interface that uses commands to interact with the computer.

### Display

One notable difference between these two interfaces is how they appear on the screen. A GUI has graphics and icons, such as the icons on your desktop or taskbar for launching programs. In contrast, a CLI only has text. It looks similar to lines of code.

<div class="rc-CML" dir="auto" id="bkmrk-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Side by side comparison of a graphical user interface with icons and a command line interface with code.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/jPiBzy6QRUC9BFKsrZSzXQ_9657c9ea0df1405aa8ba6fa1639f7bf1_Eq1sask98GT1PJWgAlVVsdoJ4BUZUA19gHHuvnwl9z5e3KfXeQ1vBp7IN8d19BsiN9mYkEWBY_x_jxXBN9NjvXa_fOEwuLWdr8JKi-Uk8ztLWl0Wm4PvLdipIryGpvtv-qMJ6WT6R2kDGXxSeF-ZJStysiZtPxlectb2JtueXryWq9cQ1Sy8YwTnUPwozg?expiry=1688601600000&hmac=BY1KrPtW-EOH6e-QIibT9C92mFBN8nbwMnZoJfzZZRM)</figure></div></div></div></div></div></div>### **Function**

These two interfaces also differ in how they function. A GUI is an interface that only allows you to make one request at a time. However, a CLI allows you to make multiple requests at a time.

## Advantages of a CLI in cybersecurity

The choice between using a GUI or CLI is partly based on personal preference, but security analysts should be able to use both interfaces. Using a CLI can provide certain advantages.

### Efficiency

Some prefer the CLI because it can be used more quickly when you know how to manage this interface. For a new user, a GUI might be more efficient because they’re easier for beginners to navigate.

Because a CLI can accept multiple requests at one time, it’s more powerful when you need to perform multiple tasks efficiently. For example, if you had to create multiple new files in your system, you could quickly perform this task in a CLI. If you were using a GUI, this could take much longer, because you have to repeat the same steps for each new file.

### History file

For security analysts, using the Linux CLI is helpful because it records a history file of all the commands and actions in the CLI. If you were using a GUI, your actions are not necessarily saved in a history file.

For example, you might be in a situation where you’re responding to an incident using a playbook. The playbook’s instructions require you to run a series of different commands. If you used a CLI, you’d be able to go back to the history and ensure all of the commands were correctly used. This could be helpful if there were issues using the playbook and you had to review the steps you performed in the command line.

Additionally, if you suspect an attacker has compromised your system, you might be able to trace their actions using the history file.

## Key takeaways

GUIs and CLIs are two types of user interfaces that security analysts should be familiar with. There are multiple differences between a GUI and a CLI, including their displays and how they function. When working in cybersecurity, a CLI is often preferred over a GUI because it can handle multiple tasks simultaneously and it includes a history file.

# Ellen: My path into cybersecurity

<div aria-label="toggle video from [MUSIC]" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" id="bkmrk-" role="button">  
</div><div aria-label="toggle video from My name is Ellen and I am a security engineering manager at Google focused" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" id="bkmrk-my-name-is-ellen-and" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">My name is Ellen and I am a security engineering manager at Google focused </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">in on how Google uses the cloud. </span></div><div aria-label="toggle video from current lecture segment: Cybersecurity wasn't a field when I got started in technology," class="rc-Phrase active css-ugczj4" data-cue="4" data-cue-index="3" id="bkmrk-cybersecurity-wasn%27t" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Cybersecurity wasn't a field when I got started in technology, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">something I came to later. </span></div><div aria-label="toggle video from I got started in technology when I was working retail at a poster store." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" id="bkmrk-i-got-started-in-tec" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">I got started in technology when I was working retail at a poster store. </span></div><div aria-label="toggle video from And we needed to build a website and my feet hurt and I really needed to sit down." class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" id="bkmrk-and-we-needed-to-bui" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">And we needed to build a website and my feet hurt and I really needed to sit down. </span></div><div aria-label="toggle video from And so I asked friends to teach me how to do HTML so" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" id="bkmrk-and-so-i-asked-frien" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">And so I asked friends to teach me how to do HTML so </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">I could sit down while working and I could let my blisters have a rest. </span></div><div aria-label="toggle video from While I was at the poster store, one of our customers worked at a start up and" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" id="bkmrk-while-i-was-at-the-p" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">While I was at the poster store, one of our customers worked at a start up and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">used to get employee photos framed and they asked them for </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">feedback on my website, and they ended up giving me an internship. </span></div><div aria-label="toggle video from One of the specialties that I ended up having was API design or" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" id="bkmrk-one-of-the-specialti" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">One of the specialties that I ended up having was API design or </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">designing the interface by which a developer communicates with the machine. </span></div><div aria-label="toggle video from As part of that, I got into a job where I was designing a miniature version of" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" id="bkmrk-as-part-of-that%2C-i-g" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">As part of that, I got into a job where I was designing a miniature version of </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">an operating system for security technology and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">started learning security from there. </span></div><div aria-label="toggle video from Most of the people I know from cyber security, especially in the early days," class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" id="bkmrk-most-of-the-people-i" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Most of the people I know from cyber security, especially in the early days, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">do not have a degree at all. </span></div><div aria-label="toggle video from Or if they do, they have a degree like I do in something like philosophy or poetry." class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" id="bkmrk-or-if-they-do%2C-they-" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Or if they do, they have a degree like I do in something like philosophy or poetry. </span></div><div aria-label="toggle video from Almost everyone learned on their own by experimenting," class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" id="bkmrk-almost-everyone-lear" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Almost everyone learned on their own by experimenting, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">by talking to people, by reading. </span></div><div aria-label="toggle video from And so I would say no technical background is required." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" id="bkmrk-and-so-i-would-say-n" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">And so I would say no technical background is required. </span></div><div aria-label="toggle video from And so I would say no technical background is required." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" id="bkmrk-and-in-fact%2C-having-" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">And in fact, having a background where you're used to being out in the real world </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">can sometimes make cybersecurity make more sense and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">help you make more balanced choices. </span></div><div aria-label="toggle video from In almost all areas, there is a security community that you can find." class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" id="bkmrk-in-almost-all-areas%2C" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In almost all areas, there is a security community that you can find. </span></div><div aria-label="toggle video from Figure out where they are, look for local conferences, start talking to people." class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" id="bkmrk-figure-out-where-the" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Figure out where they are, look for local conferences, start talking to people. </span></div><div aria-label="toggle video from It's a lot more fun to learn that way than it is in a vacuum." class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" id="bkmrk-it%27s-a-lot-more-fun-" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">It's a lot more fun to learn that way than it is in a vacuum. </span></div><div aria-label="toggle video from I've found that most people if you come to them and say, hey, you're really good at" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" id="bkmrk-i%27ve-found-that-most" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">I've found that most people if you come to them and say, hey, you're really good at </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">this thing, would you mind if I bought you a coffee and you showed me how to do it? </span></div><div aria-label="toggle video from That they'll always pretty much say yes." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" id="bkmrk-that-they%27ll-always-" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">That they'll always pretty much say yes. </span></div><div aria-label="toggle video from The advice I give to people who don't have technical backgrounds, the first one is," class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" id="bkmrk-the-advice-i-give-to" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The advice I give to people who don't have technical backgrounds, the first one is, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">I wouldn't be afraid of the technology. </span></div><div aria-label="toggle video from It can seem like only somebody with a computer science degree could ever" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" id="bkmrk-it-can-seem-like-onl" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">It can seem like only somebody with a computer science degree could ever </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">understand things, but these concepts, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">these technologies are understandable by anyone. </span></div><div aria-label="toggle video from And so never let the fact that you might not have a technical background get" class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" id="bkmrk-and-so-never-let-the" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">And so never let the fact that you might not have a technical background get </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">in the way, just pick an area that interests you and start diving in. </span></div><div aria-label="toggle video from And as long as you're curious, and as long as you find it interesting, you'll," class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" id="bkmrk-and-as-long-as-you%27r" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">And as long as you're curious, and as long as you find it interesting, you'll, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">you'll learn the technology. </span></div>

# Wrap-up; Glossary terms from week 1

<div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-we-did-it%21-what-a-gr"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We did it!" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">We did it! </span></div><div aria-label="toggle video from What a great section of learning!" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">What a great section of learning! </span></div><div aria-label="toggle video from The best thing is that we did this together and" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The best thing is that we did this together and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">covered some very useful topics. </span></div><div aria-label="toggle video from Let's recap this section's lessons." class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Let's recap this section's lessons. </span></div><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">As a security analyst, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">it's important that you understand the systems that you're working with. </span></div><div aria-label="toggle video from Understanding computer basics will help you do your job more effectively and" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Understanding computer basics will help you do your job more effectively and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">efficiently. </span></div><div aria-label="toggle video from In this section, we covered common operating systems." class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In this section, we covered common operating systems. </span></div><div aria-label="toggle video from In this section, we covered common operating systems." class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">We also discussed the main functions of an operating system. </span></div><div aria-label="toggle video from Importantly, you learned about the relationship between operating systems," class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Importantly, you learned about the relationship between operating systems, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">applications, and hardware. </span></div><div aria-label="toggle video from It was nice to learn how they flow together like an orchestra." class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">It was nice to learn how they flow together like an orchestra. </span></div><div aria-label="toggle video from In addition, you learned about the differences between the graphical user" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In addition, you learned about the differences between the graphical user </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">interface and the command-line interface. </span></div><div aria-label="toggle video from Understanding the command-line interface will be very important for your work." class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Understanding the command-line interface will be very important for your work. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-i-enjoyed-exploring-"><div aria-label="toggle video from I enjoyed exploring the world of operating systems with you." class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">I enjoyed exploring the world of operating systems with you. </span></div><div aria-label="toggle video from Knowing how operating systems work is an important step in preparing for" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Knowing how operating systems work is an important step in preparing for </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">a position as a security analyst. </span></div><div aria-label="toggle video from You're doing great!" class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You're doing great! </span></div><div aria-label="toggle video from Let's keep moving forward with this program." class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Let's keep moving forward with this program. </span></div><div aria-label="toggle video from In the next section," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In the next section, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">we'll focus specifically on the Linux operating system. </span></div></div><div aria-label="toggle video from In the next section," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" id="bkmrk--1" role="button" tabindex="0">---

</div>## **Terms and definitions from Course 4, Week 1**

**Application:** A program that performs a specific task

**Basic Input/Output System (BIOS):** A microchip that contains loading instructions for the computer and is prevalent in older systems

**Bootloader:** A software program that boots the operating system

**Command-line interface (CLI):** A text-based user interface that uses commands to interact with the computer

**Graphical user interface (GUI):** A user interface that uses icons on the screen to manage different tasks on the computer

**Hardware:** The physical components of a computer

**Legacy operating system:** An operating system that is outdated but still being used

**Operating system (OS)**: The interface between computer hardware and the user

**Random Access Memory (RAM):** A hardware component used for short-term memory

**Unified Extensible Firmware Interface (UEFI):** A microchip that contains loading instructions for the computer and replaces BIOS on more modern systems

**User interface:** A program that allows the user to control the functions of the operating system

**Virtual machine (VM)**: A virtual version of a physical computer

# Linux Basics

# Welcome to week 2; introduction to linux

Welcome back! We have another important topic to explore.  
Previously, you learned aboutoperating systems and user interfaces.  
You learned how operating systems work and how resources are allocated in computers.  
We also reviewed several common operating systems.  
You may already have a favorite operating system.  
It's common to hear that people are fans of one over another, but in the security world,  
Linux is commonly used.  
In this section, you'll be learning more about the Linux operating system and how  
it's used in everyday tasks in security.  
First, you'll learn about the architecture of Linux.  
After this, we'll compare the different distributions of Linux that are available.  
Lastly, you'll explore the shell, a key Linux component that allows you to communicate with the system.  
I remember when I first learned about the Linux OS, and I'm really happy to explore it with you now.

# Introduction to Linux

<div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-you-might-have-seen-"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from You might have seen or heard the name Linux in the past." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You might have seen or heard the name Linux in the past. </span></div><div aria-label="toggle video from But did you know Linux is the most-used operating system in security today?" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">But did you know Linux is the most-used operating system in security today? </span></div><div aria-label="toggle video from current lecture segment: Let's start by taking a look at Linux and how it's used in security." class="rc-Phrase active css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Let's start by taking a look at Linux and how it's used in security. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-linux-is-an-open-sou"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Linux is an open-source operating system." class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Linux is an open-source operating system. </span></div><div aria-label="toggle video from It was created in two parts." class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">It was created in two parts. </span></div><div aria-label="toggle video from In the early 1990s, two different people were working separately on projects to" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In the early 1990s, two different people were working separately on projects to </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">improve computer engineering. </span></div><div aria-label="toggle video from The first person was Linus Torvalds." class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The first person was Linus Torvalds. </span></div><div aria-label="toggle video from At the time, the UNIX operating system was already in use." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">At the time, the UNIX operating system was already in use. </span></div><div aria-label="toggle video from He wanted to improve it and make it open source and accessible to anyone." class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">He wanted to improve it and make it open source and accessible to anyone. </span></div><div aria-label="toggle video from What was revolutionary was his introduction of the Linux kernel." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">What was revolutionary was his introduction of the Linux kernel. </span></div><div aria-label="toggle video from We're going to learn what the kernel does later." class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">We're going to learn what the kernel does later. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--1"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-around-the-same-time"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Around the same time, Richard Stallman started working on GNU." class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Around the same time, Richard Stallman started working on GNU. </span></div><div aria-label="toggle video from GNU was also an operating system based on UNIX." class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">GNU was also an operating system based on UNIX. </span></div><div aria-label="toggle video from Stallman shared Torvalds' goal of creating software that was free and" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Stallman shared Torvalds' goal of creating software that was free and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">open to anyone. </span></div><div aria-label="toggle video from After working on GNU for a few years, the missing element for" class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">After working on GNU for a few years, the missing element for </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the software was a kernel. </span></div><div aria-label="toggle video from Together, Torvalds' and Stallman’s innovations made what is commonly referred" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Together, Torvalds' and Stallman’s innovations made what is commonly referred </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">to as Linux. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--2"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-now-that-you%27ve-lear"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now that you've learned the history behind Linux," class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Now that you've learned the history behind Linux, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">let's take a look at what makes Linux unique. </span></div><div aria-label="toggle video from As mentioned before, Linux is open source," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">As mentioned before, Linux is open source, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">meaning anyone can have access to the operating system and the source code. </span></div><div aria-label="toggle video from Linux and many of the programs that come with Linux are licensed under the terms" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Linux and many of the programs that come with Linux are licensed under the terms </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">of the GNU Public License, which allow you to use, share, and modify them freely. </span></div><div aria-label="toggle video from Thanks to Linux's open-source philosophy as well as a strong feature set," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Thanks to Linux's open-source philosophy as well as a strong feature set, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">an entire community of developers has adopted this operating system. </span></div><div aria-label="toggle video from These developers are able to collaborate on projects and" class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">These developers are able to collaborate on projects and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">advance computing together. </span></div><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">As a security analyst, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">you'll discover that Linux is used at different organizations. </span></div><div aria-label="toggle video from More specifically, Linux is used in many security programs." class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">More specifically, Linux is used in many security programs. </span></div><div aria-label="toggle video from Another unique feature about Linux is the different distributions, or" class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Another unique feature about Linux is the different distributions, or </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">varieties, that have been developed. </span></div><div aria-label="toggle video from Because of the large community contribution," class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Because of the large community contribution, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">there are over 600 distributions of Linux. </span></div><div aria-label="toggle video from Later you'll learn more about distributions." class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Later you'll learn more about distributions. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--3"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-finally%2C-let%27s-take-"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Finally, let's take a look at how you would use Linux in an entry-level" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Finally, let's take a look at how you would use Linux in an entry-level </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">security position. </span></div><div aria-label="toggle video from As a security analyst, you'll use many tools and programs in everyday work." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">As a security analyst, you'll use many tools and programs in everyday work. </span></div><div aria-label="toggle video from As a security analyst, you'll use many tools and programs in everyday work." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You might examine different types of logs to identify what's going on in the system. </span></div><div aria-label="toggle video from For example," class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">For example, </span></div><div aria-label="toggle video from you might find yourself looking at an error log when investigating an issue." class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">you might find yourself looking at an error log when investigating an issue. </span></div><div aria-label="toggle video from Another place where you will use Linux is to verify access and" class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Another place where you will use Linux is to verify access and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">authorization in an identity and access management system. </span></div><div aria-label="toggle video from In security, managing access is key in order to ensure a secure system." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In security, managing access is key in order to ensure a secure system. </span></div><div aria-label="toggle video from We'll take a closer look into access and authorization later." class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">We'll take a closer look into access and authorization later. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--4"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-finally%2C-as-an-analy"><div aria-label="toggle video from Finally, as an analyst, you might find yourself working" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Finally, as an analyst, you might find yourself working </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">with specific distributions designed for a particular task. </span></div><div aria-label="toggle video from For example, you might use a distribution that has a digital forensic tool" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">For example, you might use a distribution that has a digital forensic tool </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">to investigate what happened in an event alert. </span></div><div aria-label="toggle video from You might also use a distribution that's for" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You might also use a distribution that's for </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">pen testing in offensive security to look for vulnerabilities in the system. </span></div><div aria-label="toggle video from Distributions are created to fit the needs of their users." class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Distributions are created to fit the needs of their users. </span></div><div aria-label="toggle video from I hope you're excited to learn more about Linux." class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">I hope you're excited to learn more about Linux. </span></div><div aria-label="toggle video from This will be a very useful skill in the security field." class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">This will be a very useful skill in the security field. </span></div></div>

# Linux architecture

<div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-let-me-start-with-a-"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let me start with a quick question that may" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Let me start with a quick question that may </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">seem unrelated to security. </span></div><div aria-label="toggle video from Do you have a favorite building?" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Do you have a favorite building? </span></div><div aria-label="toggle video from And what is it about" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">And what is it about </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">its architecture that impresses you the most? </span></div><div aria-label="toggle video from current lecture segment: The windows? The structure of the walls?" class="rc-Phrase active css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The windows? The structure of the walls? </span></div><div aria-label="toggle video from current lecture segment: The windows? The structure of the walls?" class="rc-Phrase active css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Just like buildings, operating systems also have </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">an architecture and are made up of </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">discrete components that work together to form the whole. </span></div><div aria-label="toggle video from In this video, we're going to look at" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In this video, we're going to look at </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">all the components that together make up Linux. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-the-components-of-li"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The components of Linux include the user, applications," class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The components of Linux include the user, applications, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the shell, the Filesystem Hierarchy Standard, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the kernel, and the hardware. </span></div><div aria-label="toggle video from Don't worry—we'll go into" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Don't worry—we'll go into </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">these components one by one together. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--1"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-first%2C-you-are-the-u"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from First, you are the user." class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">First, you are the user. </span></div><div aria-label="toggle video from The user is the person interacting with the computer." class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The user is the person interacting with the computer. </span></div><div aria-label="toggle video from The user is the person interacting with the computer." class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">In Linux, you're the first element </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">to the architecture of the operating system. </span></div><div aria-label="toggle video from You're initiating the tasks or" class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You're initiating the tasks or </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">commands that the OS is going to execute. </span></div><div aria-label="toggle video from Linux is a multi-user system." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Linux is a multi-user system. </span></div><div aria-label="toggle video from This means that more than one user can" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">This means that more than one user can </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">use the system's resources at the same time. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--2"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-the-second-element-o"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The second element of the architecture" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The second element of the architecture </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">is the applications within a system. </span></div><div aria-label="toggle video from An application is a program" class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">An application is a program </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">that performs a specific task, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">such as a word processor or a calculator. </span></div><div aria-label="toggle video from You might hear the word "applications"" class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You might hear the word "applications" </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">and "programs" used interchangeably. </span></div><div aria-label="toggle video from As an example," class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">As an example, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">one popular Linux application that </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">we'll learn more about later is Nano. </span></div><div aria-label="toggle video from Nano is a text editor." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Nano is a text editor. </span></div><div aria-label="toggle video from This simple application helps" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">This simple application helps </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">you keep notes on the screen. </span></div><div aria-label="toggle video from Linux applications are commonly" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Linux applications are commonly </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">distributed through package managers. </span></div><div aria-label="toggle video from We'll learn more about this process later." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">We'll learn more about this process later. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--3"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-the-next-component-i"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The next component in the architecture" class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The next component in the architecture </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">of Linux is the shell. </span></div><div aria-label="toggle video from This is an important element because" class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">This is an important element because </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">it is how you will communicate with the system. </span></div><div aria-label="toggle video from The shell is a command line interpreter." class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The shell is a command line interpreter. </span></div><div aria-label="toggle video from It processes commands and outputs the results." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">It processes commands and outputs the results. </span></div><div aria-label="toggle video from This might sound familiar." class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">This might sound familiar. </span></div><div aria-label="toggle video from Previously, we learned" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Previously, we learned </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">about the two types of user interfaces: </span></div><div aria-label="toggle video from Previously, we learned" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the GUI and the CLI. </span></div><div aria-label="toggle video from You can think of the shell as a CLI." class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You can think of the shell as a CLI. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--4"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-another-element-of-t"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Another element of the architecture of" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Another element of the architecture of </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Linux is the Filesystem Hierarchy Standard, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">or FHS. It's </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the component of the Linux OS that organizes data. </span></div><div aria-label="toggle video from An easy way for you to think about" class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">An easy way for you to think about </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the FHS is to think about it as a filing cabinet of data. </span></div><div aria-label="toggle video from The FHS is how data is stored in a system." class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The FHS is how data is stored in a system. </span></div><div aria-label="toggle video from The FHS is how data is stored in a system." class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">It's a way to organize data so that it can be </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">found when the data is accessed by the system. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--5"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-that-brings-us-to-th"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from That brings us to the kernel." class="rc-Phrase css-ugczj4" data-cue="62" data-cue-index="61" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">That brings us to the kernel. </span></div><div aria-label="toggle video from The kernel is a component of" class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The kernel is a component of </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the Linux OS that manages processes and memory. </span></div><div aria-label="toggle video from The kernel communicates with the hardware" class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The kernel communicates with the hardware </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">to execute the commands sent by the shell. </span></div><div aria-label="toggle video from The kernel uses drivers to enable" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The kernel uses drivers to enable </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">applications to execute tasks. </span></div><div aria-label="toggle video from The Linux kernel helps ensure that the system" class="rc-Phrase css-ugczj4" data-cue="69" data-cue-index="68" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The Linux kernel helps ensure that the system </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">allocates resources more efficiently </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">and makes the system work faster. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--6"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-finally%2C-the-last-co"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Finally, the last component of" class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Finally, the last component of </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the architecture is the hardware. </span></div><div aria-label="toggle video from Hardware refers to the physical components of a computer." class="rc-Phrase css-ugczj4" data-cue="74" data-cue-index="73" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Hardware refers to the physical components of a computer. </span></div><div aria-label="toggle video from You can compare this to software applications" class="rc-Phrase css-ugczj4" data-cue="75" data-cue-index="74" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You can compare this to software applications </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">which can be downloaded into a system. </span></div><div aria-label="toggle video from The hardware in your computer are things" class="rc-Phrase css-ugczj4" data-cue="77" data-cue-index="76" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The hardware in your computer are things </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">like the CPU, mouse, and keyboard. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--7"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-congratulations%21-we%27"><div aria-label="toggle video from Congratulations!" class="rc-Phrase css-ugczj4" data-cue="79" data-cue-index="78" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Congratulations! </span></div><div aria-label="toggle video from We've now covered the architecture" class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">We've now covered the architecture </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">of Linux.</span></div><div aria-label="toggle video from We've now covered the architecture" class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803"> An understanding of </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">these components will help you </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">become increasingly familiar with Linux. </span></div></div>

# Linux architecture explained

Understanding the Linux architecture is important for a security analyst. When you understand how a system is organized, it makes it easier to understand how it functions. In this reading, you’ll learn more about the individual components in the Linux architecture. A request to complete a task starts with the user and then flows through applications, the shell, the Filesystem Hierarchy Standard, the kernel, and the hardware.

## User

The **user** is the person interacting with a computer. They initiate and manage computer tasks. Linux is a multi-user system, which means that multiple users can use the same resources at the same time.

## Applications

An **application** is a program that performs a specific task. There are many different applications on your computer. Some applications typically come pre-installed on your computer, such as calculators or calendars. Other applications might have to be installed, such as some web browsers or email clients. In Linux, you'll often use a package manager to install applications. A **package manager** is a tool that helps users install, manage, and remove packages or applications. A **package** is a piece of software that can be combined with other packages to form an application.

## Shell

The **shell** is the command-line interpreter. Everything entered into the shell is text based. The shell allows users to give commands to the kernel and receive responses from it. You can think of the shell as a translator between you and your computer. The shell translates the commands you enter so that the computer can perform the tasks you want.

## Filesystem Hierarchy Standard (FHS)

The **Filesystem Hierarchy Standard (FHS)** is the component of the Linux OS that organizes data. It specifies the location where data is stored in the operating system.

A **directory** is a file that organizes where other files are stored. Directories are sometimes called “folders,” and they can contain files or other directories. The FHS defines how directories, directory contents, and other storage is organized so the operating system knows where to find specific data.

## Kernel

The **kernel** is the component of the Linux OS that manages processes and memory. It communicates with the applications to route commands. The Linux kernel is unique to the Linux OS and is critical for allocating resources in the system. The kernel controls all major functions of the hardware, which can help get tasks expedited more efficiently.

## Hardware

The **hardware** is the physical components of a computer. You might be familiar with some hardware components, such as hard drives or CPUs. Hardware is categorized as either peripheral or internal.

### **Peripheral devices**

**Peripheral devices** are hardware components that are attached and controlled by the computer system. They are not core components needed to run the computer system. Peripheral devices can be added or removed freely. Examples of peripheral devices include monitors, printers, the keyboard, and the mouse.

### **Internal hardware**

**Internal hardware** are the components required to run the computer. Internal hardware includes a main circuit board and all components attached to it. This main circuit board is also called the motherboard. Internal hardware includes the following:

<div class="rc-CML" dir="auto" id="bkmrk-the-central-processi"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- The **Central Processing Unit (CPU)** is a computer’s main processor, which is used to perform general computing tasks on a computer. The CPU executes the instructions provided by programs, which enables these programs to run.
- **Random Access Memory (RAM)** is a hardware component used for short-term memory. It’s where data is stored temporarily as you perform tasks on your computer. For example, if you’re writing a report on your computer, the data needed for this is stored in RAM. After you’ve finished writing the report and closed down that program, this data is deleted from RAM. Information in RAM cannot be accessed once the computer has been turned off. The CPU takes the data from RAM to run programs.
- The **hard drive** is a hardware component used for long-term memory. It’s where programs and files are stored for the computer to access later. Information on the hard drive can be accessed even after a computer has been turned off and on again. A computer can have multiple hard drives.

</div></div></div></div></div>## Key takeaways

It’s important for security analysts to understand the Linux architecture and how these components are organized. The components of the Linux architecture are the user, applications, shell, Filesystem Hierarchy Standard, kernel, and hardware. Each of these components is important in how Linux functions.

# Linux distributions

<div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-let%27s-learn-a-little"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's learn a little bit more about Linux and" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Let's learn a little bit more about Linux and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">what you need to know about this operating system when working as a security analyst. </span></div><div aria-label="toggle video from Linux is a very customizable operating system." class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Linux is a very customizable operating system. </span></div><div aria-label="toggle video from Unlike other operating systems, there are different versions available for" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Unlike other operating systems, there are different versions available for </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">you to use. </span></div><div aria-label="toggle video from These different versions of Linux are called distributions." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">These different versions of Linux are called distributions. </span></div><div aria-label="toggle video from You might also hear them called distros or flavors of Linux." class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">You might also hear them called distros or flavors of Linux. </span></div><div aria-label="toggle video from It's essential for you to understand the distribution that you're using" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">It's essential for you to understand the distribution that you're using </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">so you know what tools and apps are available to you. </span></div><div aria-label="toggle video from For example," class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">For example, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Debian is a distro that has different tools than the Ubuntu distribution. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-let%27s-use-an-analogy"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's use an analogy to describe Linux distributions." class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Let's use an analogy to describe Linux distributions. </span></div><div aria-label="toggle video from Think of the OS as a vehicle." class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Think of the OS as a vehicle. </span></div><div aria-label="toggle video from First, we'll start with its engine—that would be the kernel. Just as the engine" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">First, we'll start with its engine—that would be the kernel. Just as the engine </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">makes a vehicle run, the kernel is the most important component of the Linux OS. </span></div><div aria-label="toggle video from Because the Linux kernel is open source, anyone can take the kernel and" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Because the Linux kernel is open source, anyone can take the kernel and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">modify it to build a new distribution. </span></div><div aria-label="toggle video from This is comparable to a vehicle manufacturer taking an engine and" class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">This is comparable to a vehicle manufacturer taking an engine and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">creating different types of vehicles: trucks, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">cars, vans, convertibles, busses, airplanes, and so on. </span></div><div aria-label="toggle video from These different types of vehicles can be compared to different Linux distributions." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">These different types of vehicles can be compared to different Linux distributions. </span></div><div aria-label="toggle video from A bus is used to transport lots of people." class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">A bus is used to transport lots of people. </span></div><div aria-label="toggle video from A truck is used to transport a large number of goods across vast distances." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">A truck is used to transport a large number of goods across vast distances. </span></div><div aria-label="toggle video from An aircraft transports passengers or goods by air." class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">An aircraft transports passengers or goods by air. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--1"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-just-as-each-vehicle"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Just as each vehicle serves its own purpose," class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Just as each vehicle serves its own purpose, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">different distributions are used for different reasons. </span></div><div aria-label="toggle video from Additionally, vehicles all have different components which distinguish them from" class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Additionally, vehicles all have different components which distinguish them from </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">each other. </span></div><div aria-label="toggle video from Aircrafts have control panels with buttons and knobs." class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Aircrafts have control panels with buttons and knobs. </span></div><div aria-label="toggle video from Regular cars have four tires, but trucks can have more." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Regular cars have four tires, but trucks can have more. </span></div><div aria-label="toggle video from Similarly, different Linux distributions contain different preinstalled programs," class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Similarly, different Linux distributions contain different preinstalled programs, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">user interfaces, and much more. </span></div><div aria-label="toggle video from A lot of this is based on what the Linux user needs, but" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">A lot of this is based on what the Linux user needs, but </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">some distros are also chosen based on preference—the </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">same way a sports car might be chosen as a vehicle. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--2"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-the-advantage-of-usi"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The advantage of using Linux as an OS is that you can customize it." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The advantage of using Linux as an OS is that you can customize it. </span></div><div aria-label="toggle video from Distributions include the Linux kernel, utilities," class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Distributions include the Linux kernel, utilities, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">a package management system, and an installer. </span></div><div aria-label="toggle video from We learned earlier that Linux is open source, and" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">We learned earlier that Linux is open source, and </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">anyone can contribute to adding to the source code. </span></div><div aria-label="toggle video from That is how new distributions are created." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">That is how new distributions are created. </span></div><div aria-label="toggle video from That is how new distributions are created." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk-all-distros-are-deri"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item"><div class="phrases"><div aria-label="toggle video from All distros are derived from another distro, but" class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">All distros are derived from another distro, but </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">there are a few that are considered parent distributions. </span></div><div aria-label="toggle video from Red Hat® is the parent of CentOS, and Slackware® is the parent of SUSE®." class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Red Hat® is the parent of CentOS, and Slackware® is the parent of SUSE®. </span></div><div aria-label="toggle video from Both Ubuntu and KALI LINUX™ are derived from Debian." class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">Both Ubuntu and KALI LINUX™ are derived from Debian. </span></div></div></div></div><div class="cds-1665 css-xl5mb3 cds-1666" id="bkmrk--3"><div class="cds-1665 rc-Paragraph css-1lz62pp cds-1667 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-as-we-continue%2C-we%27r"><div aria-label="toggle video from current lecture segment: As we continue, we're going to take a look at some of the distributions most commonly" class="rc-Phrase active css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">As we continue, we're going to take a look at some of the distributions most commonly </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">used by security analysts. </span></div><div aria-label="toggle video from The more you understand these distributions," class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">The more you understand these distributions, </span><span aria-hidden="true" class="cds-1801 css-80vnnb cds-1803">the easier your work will be. </span></div></div>

# KALI LINUX ™

<div class="cds-206 css-xl5mb3 cds-207" id="bkmrk-in-this-section%2C-we%27"><div class="cds-206 rc-Paragraph css-1lz62pp cds-208 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In this section, we're going to cover a Linux distribution that's widely used in" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">In this section, we're going to cover a Linux distribution that's widely used in </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">security and discuss KALI LINUX™. </span></div><div aria-label="toggle video from KALI LINUX™ is a trademark of Offensive Security and is Debian derived." class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">KALI LINUX™ is a trademark of Offensive Security and is Debian derived. </span></div><div aria-label="toggle video from This open-source distro was made specifically with penetration testing and" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">This open-source distro was made specifically with penetration testing and </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">digital forensics in mind. </span></div><div aria-label="toggle video from There are many tools pre-installed into KALI LINUX™." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">There are many tools pre-installed into KALI LINUX™. </span></div><div aria-label="toggle video from It's important to note that KALI LINUX™ should be used on a virtual machine." class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">It's important to note that KALI LINUX™ should be used on a virtual machine. </span></div><div aria-label="toggle video from This prevents damage to your system in the event its tools are used improperly." class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">This prevents damage to your system in the event its tools are used improperly. </span></div><div aria-label="toggle video from An additional benefit is that using a virtual machine gives you the ability to" class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">An additional benefit is that using a virtual machine gives you the ability to </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">revert to a previous state. </span></div></div></div></div><div class="cds-206 css-xl5mb3 cds-207" id="bkmrk-"><div class="cds-206 rc-Paragraph css-1lz62pp cds-208 cds-grid-item">  
</div></div><div class="cds-206 css-xl5mb3 cds-207" id="bkmrk-as-security-professi"><div class="cds-206 rc-Paragraph css-1lz62pp cds-208 cds-grid-item"><div class="phrases"><div aria-label="toggle video from As security professionals advance in their careers, some specialize in penetration testing." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">As security professionals advance in their careers, some specialize in penetration testing. </span></div><div aria-label="toggle video from A penetration test is a simulated attack that helps identify vulnerabilities in" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">A penetration test is a simulated attack that helps identify vulnerabilities in </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">systems, networks, websites, applications, and processes. </span></div><div aria-label="toggle video from KALI LINUX™ has numerous tools that are useful during penetration testing." class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">KALI LINUX™ has numerous tools that are useful during penetration testing. </span></div><div aria-label="toggle video from Let's look at a few examples." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">Let's look at a few examples. </span></div></div></div></div><div class="cds-206 css-xl5mb3 cds-207" id="bkmrk--1"><div class="cds-206 rc-Paragraph css-1lz62pp cds-208 cds-grid-item">  
</div></div><div class="cds-206 css-xl5mb3 cds-207" id="bkmrk-to-begin%2C-metasploit"><div class="cds-206 rc-Paragraph css-1lz62pp cds-208 cds-grid-item"><div class="phrases"><div aria-label="toggle video from To begin, Metasploit can be used to look for and exploit vulnerabilities on machines." class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">To begin, Metasploit can be used to look for and exploit vulnerabilities on machines. </span></div><div aria-label="toggle video from Burp Suite is another tool that helps to test for weaknesses in web applications." class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">Burp Suite is another tool that helps to test for weaknesses in web applications. </span></div><div aria-label="toggle video from And finally, John the Ripper is a tool used to guess passwords." class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">And finally, John the Ripper is a tool used to guess passwords. </span></div><div aria-label="toggle video from As a security analyst, your work might involve digital forensics." class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">As a security analyst, your work might involve digital forensics. </span></div><div aria-label="toggle video from Digital forensics is the process of collecting and" class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">Digital forensics is the process of collecting and </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">analyzing data to determine what has happened after an attack. </span></div><div aria-label="toggle video from For example," class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">For example, </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">you might take an investigative look at data related to network activity. </span></div><div aria-label="toggle video from KALI LINUX™ is also a useful distribution for" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">KALI LINUX™ is also a useful distribution for </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">security professionals who are involved in digital forensic work. </span></div><div aria-label="toggle video from It has a large number of tools that can be used for this. As one example," class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">It has a large number of tools that can be used for this. As one example, </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">tcpdump is a command-line packet analyzer. It's used to capture network traffic. </span></div><div aria-label="toggle video from Another tool commonly used in the security profession is Wireshark." class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">Another tool commonly used in the security profession is Wireshark. </span></div><div aria-label="toggle video from It has a graphical user interface that can be used to analyze live and" class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">It has a graphical user interface that can be used to analyze live and </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">captured network traffic. </span></div><div aria-label="toggle video from And as a final example," class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">And as a final example, </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">Autopsy is a forensic tool used to analyze hard drives and smartphones. </span></div><div aria-label="toggle video from These are just a few tools included with KALI LINUX™." class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">These are just a few tools included with KALI LINUX™. </span></div><div aria-label="toggle video from This distribution has many tools used to conduct pen testing and digital forensics." class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">This distribution has many tools used to conduct pen testing and digital forensics. </span></div></div></div></div><div class="cds-206 css-xl5mb3 cds-207" id="bkmrk--2"><div class="cds-206 rc-Paragraph css-1lz62pp cds-208 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-we%27ve-explored-how-k"><div aria-label="toggle video from We've explored how KALI LINUX™ is an important distribution that's widely" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">We've explored how KALI LINUX™ is an important distribution that's widely </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">used in security, </span><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">but there are other distributions that security professionals use as well. </span></div><div aria-label="toggle video from Next we'll explore a few more distributions." class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-342 css-80vnnb cds-344">Next we'll explore a few more distributions.   
  
quick note from the student.. the course says to use it on a VM, however you can use it as your own flavor of Linux for your desktop. its not recommended unless you know what you are doing or willing to wipe the machine :p  
</span></div></div>

# More Linux distributions

Previously, you were introduced to the different distributions of Linux. This included KALI LINUX ™. (KALI LINUX ™ is a trademark of OffSec.) In addition to KALI LINUX ™, there are multiple other Linux distributions that security analysts should be familiar with. In this reading, you’ll learn about additional Linux distributions.

## KALI LINUX ™

**KALI LINUX ™** is an open-source distribution of Linux that is widely used in the security industry. This is because KALI LINUX ™, which is Debian-based, is pre-installed with many useful tools for penetration testing and digital forensics. A **penetration test** is a simulated attack that helps identify vulnerabilities in systems, networks, websites, applications, and processes. **Digital forensics** is the practice of collecting and analyzing data to determine what has happened after an attack. These are key activities in the security industry.

However, KALI LINUX ™ is not the only Linux distribution that is used in cybersecurity.

## Ubuntu

**Ubuntu** is an open-source, user-friendly distribution that is widely used in security and other industries. It has both a command-line interface (CLI) and a graphical user interface (GUI). Ubuntu is also Debian-derived and includes common applications by default. Users can also download many more applications from a package manager, including security-focused tools. Because of its wide use, Ubuntu has an especially large number of community resources to support users.

Ubuntu is also widely used for cloud computing. As organizations migrate to cloud servers, cybersecurity work may more regularly involve Ubuntu derivatives.

## Parrot

**Parrot** is an open-source distribution that is commonly used for security. Similar to KALI LINUX ™, Parrot comes with pre-installed tools related to penetration testing and digital forensics. Like both KALI LINUX ™ and Ubuntu, it is based on Debian.

Parrot is also considered to be a user-friendly Linux distribution. This is because it has a GUI that many find easy to navigate. This is in addition to Parrot’s CLI.

## Red Hat® Enterprise Linux®

**Red Hat Enterprise Linux** is a subscription-based distribution of Linux built for enterprise use. Red Hat is not free\*, which is a major difference from the previously mentioned distributions. Because it’s built and supported for enterprise use, Red Hat also offers a dedicated support team for customers to call about issues.

with my personal experience, you can use RHEL9 for personal use. also as of July of 2023, its parent company may be trying to break copyright law by limiting access to source code, and close sourcing the project. if they succeed many other distros might die or become less secure or die, like centOS. I likely wont update this but you can google it yourself to see how that went.

## CentOS

**CentOS** is an open-source distribution that is closely related to Red Hat. It uses source code published by Red Hat to provide a similar platform. However, CentOS does not offer the same enterprise support that Red Hat provides and is supported through the community.   
p.s. CentOS may be dead because its parent company is trying to kill it at the time of posting this page, google it to see if it has died LOL

### Arch Linux

**Arch Linux** is an open-source distribution known for its simplicity and user-focused design. It adheres to the "Keep It Simple, Stupid" (KISS) principle, offering a minimal base system that users can customize to their needs, reducing potential security risks, provides more control over the system, rolling-release model ensures up-to-date security updates.

A key feature is the Arch User Repository (AUR), a community-driven repository that lets users compile and install packages from source using the Arch package manager, pacman.

## Key takeaways

KALI LINUX ™, Ubuntu, Parrot, Red Hat, and CentOS are all widely used Linux distributions. It’s important for security analysts to be aware of these distributions that they might encounter in their career.

# Package managers for installing applications

Previously, you learned about Linux distributions and that different distributions derive from different sources, such as Debian or Red Hat Enterprise Linux distribution. You were also introduced to package managers, and learned that Linux applications are commonly distributed through package managers. In this reading, you’ll apply this knowledge to learn more about package managers.

## Introduction to package managers

A **package** is a piece of software that can be combined with other packages to form an application. Some packages may be large enough to form applications on their own.

Packages contain the files necessary for an application to be installed. These files include dependencies, which are supplemental files used to run an application.

Package managers can help resolve any issues with dependencies and perform other management tasks. A **package manager** is a tool that helps users install, manage, and remove packages or applications. Linux uses multiple package managers.

**Note:** It’s important to use the most recent version of a package when possible. The most recent version has the most up-to-date bug fixes and security patches. These help keep your system more secure.

## Types of package managers

Many commonly used Linux distributions are derived from the same parent distribution. For example, KALI LINUX ™, Ubuntu, and Parrot all come from Debian. CentOS comes from Red Hat.

This knowledge is useful when installing applications because certain package managers work with certain distributions. For example, the Red Hat Package Manager (RPM) can be used for Linux distributions derived from Red Hat, and package managers such as dpkg can be used for Linux distributions derived from Debian.

Different package managers typically use different file extensions. For example, Red Hat Package Manager (RPM) has files which use the <var>.rpm</var> file extension, such as <var>Package-Version-Release\_Architecture.rpm</var>. Package managers for Debian-derived Linux distributions, such as dpkg, have files which use the <var>.deb</var> file extension, such as <var>Package\_Version-Release\_Architecture.deb</var>.

## Package management tools

In addition to package managers like RPM and dpkg, there are also package management tools that allow you to easily work with packages through the shell. Package management tools are sometimes utilized instead of package managers because they allow users to more easily perform basic tasks, such as installing a new package. Two notable tools are the Advanced Package Tool (APT) and Yellowdog Updater Modified (YUM).

### **Advanced Package Tool (APT)** 

APT is a tool used with Debian-derived distributions. It is run from the command-line interface to manage, search, and install packages.

### **Yellowdog Updater Modified (YUM)**

YUM is a tool used with Red Hat-derived distributions. It is run from the command-line interface to manage, search, and install packages. YUM works with <var>.rpm</var> files.

## Key takeaways

A package is a piece of software that can be combined with other packages to form an application. Packages can be managed using a package manager. There are multiple package managers and package management tools for different Linux distributions. Package management tools allow users to easily work with packages through the shell. Debian-derived Linux distributions use package managers like dpkg as well as package management tools like Advanced Package Tool (APT). Red Hat-derived distributions use the Red Hat Package Manager (RPM) or tools like Yellowdog Updater Modified (YUM).

# Vanilla os

i came accross vanilla os in a yt video and it appears to be realy interesting. i quite like gnome as a base and im thinking this is potentially one of the best options in the future if they stick with it. also theres only two updates per year and a roling release but you have to manually enable rolling releases

tl;dr

its stable asf, and you can run any app on it!

**Vanilla OS: A Unique Solution to Distro Hopping and the Future of Software Installation**

Vanilla OS is a Linux distribution that aims to resolve the common practice of distro hopping. This term refers to the habit among Linux users of switching between different Linux distributions to find the perfect balance of stability, hardware support, and application access. Vanilla OS offers all these features within a single, highly stable base.

What sets Vanilla OS apart is its approach to software installation. It introduces 'apx', a package manager that allows software installation from any source by installing them onto distro containers. This means that Vanilla OS can run virtually any software developed for Linux, effectively addressing the issue of distro packaging fragmentation. This unique combination of features positions Vanilla OS as a potential game-changer in the Linux ecosystem.

**Intuitive User Experience**

Vanilla OS prioritizes user-friendliness in its design. The intuitive installer guides users through the necessary steps, and post-installation, users can customize their experience, choosing between dark and light mode, enabling support for Flatpak and AppImage, and selecting their preferred apps. This user-centric approach makes Vanilla OS accessible to both beginners and technically inclined users.

**Immutability and Atomicity: Enhancing Security and Stability**

One of the distinguishing features of Vanilla OS is its immutable and atomic nature. The base system is locked down, preventing both applications and users from writing to it, except for certain directories like the home folder or partition and the /etc and /var directories. This design principle significantly bolsters the system's security.

Updates in Vanilla OS are applied atomically, meaning each update either completes successfully or, if any issue arises, the entire operation is reverted, leaving the system unaltered. This ensures that any reboot will either return the system to its previous state or update it successfully.

**Is Vanilla OS the Future of Linux Distributions?**

Vanilla OS represents a promising concept that could potentially shape the future of Linux distributions. It provides access to virtually all Linux-developed software at native speeds within a highly stable base. However, it's not a one-size-fits-all solution. Users who only need software from FlatHub may not require Vanilla OS, and those unfamiliar with the command line or the concept of containers might find it challenging to use. However, with further development, such as a graphical layer on 'apx' for intuitive software installation from containers, Vanilla OS could become an optimal solution for users seeking extensive software access without compromising system stability

<sub>for anyone who cares this one was written with ai, modified by me...</sub>

# Nix OS

make page on nix os, alternative to vanilla os?

# Resources for completing Linux labs

This course features hands-on lab activities where you’ll have the opportunity to practice Linux commands in the terminal. You’ll use a platform called Qwiklabs to complete these labs. In this reading, you’ll learn how to use Qwiklabs.

This reading first provides a section on how to use Qwiklabs, which includes details on how to launch a lab, how to interact within the Qwiklabs environment, and how to end a lab. This is followed by another section on helpful navigation tips and keyboard shortcuts; these may be useful when working in the terminal.

**Note**: You will not launch Qwiklabs directly from this reading and instead will do this through lab activities and exemplars that you encounter throughout the course. Im not posting the Qwiklabs, this is just how to use Qwiklabs, and if you use Qwiklabs thats on you.

## How to use Qwiklabs

### **Launching Qwiklabs**

When you select a lab, you start from a Coursera page. You will need to click **Launch App** on that page. After you click **Launch App**, a new tab will open with a Qwiklabs page that contains instructions for that particular lab.

### **Start Lab button**

On the Qwiklabs page, you must click **Start Lab** to open a temporary terminal. The instructions for the lab will move to the right side of the screen.

<div class="rc-CML" dir="auto" id="bkmrk-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Green button with text “Start Lab” and a maximum time limit of 20 minutes displayed.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/bbLYK8KXTheEmp-pArlF-g_ef7afc94b9304f30844a19e45e922ff1_wPU2KdBxIZhEA0euFsDlhs_nHve2ceZ69LNUPx4ZE0Bb8jVXhx-Qq2dfRIK1a8IFwZ08_GkPEgh4NR_8yvGYvn0U4FTm6l8QGhpbBlTwXew2thU31_64Ivi7nwPKJNCtemriZhtJWAfZdc0dQ-tTfEo?expiry=1688688000000&hmac=Xs_PR-pKuEqZUuDwbTvXOG4xEqxiu8fZfNRcFei0SYc)</figure></div></div></div></div></div></div>Read the instructions and complete all the tasks in the lab by entering commands in the terminal.

**Note**: It may take a moment for the terminal to start.

### **Lab control dialog box**

After you click **Start Lab**, the lab control dialog box opens. It contains the **End Lab** button, the **timer**, and the **Open Linux Console** button.

You can hide or unhide the dialog box by clicking the following icon in the red box:

<div class="rc-CML" dir="auto" id="bkmrk--1"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Four rectangles spiraling next to each other to comprise one square surrounded by a red box in a screenshot of the lab.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/9J3KUOFWRNWzekD6Uiykyg_f489a579c31c4a8b8c2f9b68467495f1_LuMypehj-sqYyJlYCJGk-0LPWQirKP_cVeCYhsw1ism9amvqsYDhZEdh-Wyzh1tW__cut8UToAifaNs6LRj3iXCr4ujUo_RA7h-qx4rJVs1CRjAwAwCGM-gnKcx4wIWeV2b9IqCRB14qOVyda1LeQDA?expiry=1688688000000&hmac=sUwVJcuIGXiK6OC-T6cB8nckcTeHRtnugLt3Wh56lAI)</figure></div></div></div></div></div></div>### **The timer**

The **timer** starts when the terminal has loaded. The timer keeps track of the amount of time you have left to complete a lab. The timer counts down until it reaches 00:00:00. When it does, your temporary terminal and resources are deleted.

You will have ample time to complete the labs. But, stay focused on completing the tasks to ensure you use your time well.

### **Open Linux Console button**

When you click the button to **Open Linux Console**, the terminal opens in a new browser window:

<div class="rc-CML" dir="auto" id="bkmrk--2"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![A red square around a button with text “Open Linux Console”.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/GL_lszqoS_SwMddGbzYgEQ_1bd87af68f5f46a0be668b190f51f6f1_tEIGaT6dW10ie3BjpmzvFivoi8feEG9-Iw7O_lAjvdvWpFXlZOm8HmiNc2c9OgRKvKUBjJhp8HfoR3qu9JPY4GzGbCSOvh_nC-pKywu_G0B7V_ULMpjKTT06CYfx4b7oS1HPZnudcST_D-LjQmdIwmY?expiry=1688688000000&hmac=vwiCV0cQqzvmvDv9YdaDCvAWu2lfLxRHEr1NoC1gp4Y)</figure></div></div></div></div></div></div>Use this feature if you want a full-screen view of the terminal. You can close this window at any time. Closing the window does not end your lab, and you can continue working in the terminal in the original tab.

### **Check progress**

You can check your progress by clicking **Check my progress** at the end of each task.

<div class="rc-CML" dir="auto" id="bkmrk--3"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Blue button with text “Check my progress” below a sample task.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/IbOfFeajT2q9yZWHyXxHOA_e8b0749220334c5aa3ac5f0aa7070ef1_kN58Isr_cUeyITXiw1gAqBQeWHP4UIaMnQbwyVY6sRQre_L0gtmYjALeqKvApc1L8XchdZeLsfUaNwA9aQZL0Kir1h0c8BJjGsKWq8mfHEmrS0pVNBb4h5c-3hJ-__kbwaa0LN5U8CbJBLlqWToABF0?expiry=1688688000000&hmac=z0DH9eRfFA4-sNQbkhRuP2m3aJnXx6AtSwQHrTRBNgs)</figure></div></div></div></div></div></div>If you haven’t yet completed a task, you’ll receive hints on what you must do to complete it.

You can click **Check my progress** whenever you want to check the completion status of a task or receive a hint.

### **Using copy/paste commands**

The first time you try to use copy or paste keyboard shortcuts (such as **CTRL + C**), you’ll receive a pop-up requesting permission to use your device’s clipboard: “**googlecoursera.qwiklabs.com wants to see text and images copied to the clipboard.**” Please click **Allow** if you would like to be able to use these shortcuts in the Qwiklabs platform. If you choose not to allow Qwiklabs access to your clipboard, you cannot use keyboard shortcuts but you can still complete the lab.

### **Code block**

Certain steps may include a code block. Click the copy button to copy the code provided and then paste it into the terminal.

<div class="rc-CML" dir="auto" id="bkmrk--4"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Two layered rectangles surrounded by a red box on the right side of a sample code block to indicate copy.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/tSaH4Zd2T9qHv2ALlr1fGA_a4c26fdc722a4b3c8f38f12e15c863f1_OhCX3BSN-yf0Nd8lnjLLk4t5hUVBbpR913lAp_yIdqsaOEgDIiV-p9N2nflw4o4ED_Fwxsg6Dez7gopRSYphMueEEoblkkIBY3ELnRDiqKhC6ZILGCJH1NSugmPxU2Y50M2sGk98kdv--GwRMchPRJU?expiry=1688688000000&hmac=BbUXv1jOAecIBgkFxB-BNnArWB5Mh4cP64x510LU_bc)</figure></div></div></div></div></div></div>To paste code or other text content that you have copied from the instructions into the terminal, activate the terminal by clicking anywhere inside it. The terminal is active when the cursor in the terminal changes from a static empty outline to a flashing solid block.

<div class="rc-CML" dir="auto" id="bkmrk--5"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![A dollar sign prompt and white rectangle cursor surrounded by a red box in the terminal.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/cgjBaqtES0ayrgvTCk3QZQ_25005fa6300f4d1ba01ef6a768097ef1_NCn3RU6ab8eSTxYYo2V1zh5y2ehRWaP-OavQGkZpJgxI-K-JeeIL5QSJCMqQqMQ-09eapv_GCAub7jZG6zmqX3VZ3Vx59qV_qXdJVo4LUqGW2kQz36DXIGk17rzkSmMmPvVRlrMp3nfeoC9dbYjk98Q?expiry=1688688000000&hmac=fzzGgVZjDG9kHsL4nqHgUnecySZzEBUaJTrxqO_hR0g)</figure></div></div></div></div></div></div>Once the terminal is active, use the keyboard shortcut **CTRL + V** (hold down the **CTRL** key and press the **V** key) to insert the copied text into the terminal at the location of the flashing cursor.

### **Scrolling**

In certain situations, you may want to scroll within the terminal window. To do so, use the scroll wheel on your mouse or the touchpad of your computer.

### **End Lab button**

<div class="rc-CML" dir="auto" id="bkmrk--6"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![A red button with text “End Lab” surrounded by a red box.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/dN9wPgYMQl2fBxFAffoZjw_38694553980f42cd94d8906a1f2d1bf1_Mfw27huMPvdOZI21TbioE29m49cakKuRkC3cEtNpIUkdnVMw7P8r1N9ETGXSSloVpG_zhsBqeA4uj7RTVMTFLChkhBUdF4yYkeIfa5Y42X6AWHf7HrQqiBm9sPcDBpY2pxdpvQVQRQSvbQbmCS43wY8?expiry=1688688000000&hmac=CNDm4LP82u_528axrzmV1g9S7A6blmUT64A0P6CbPX8)</figure></div></div></div></div></div></div>Finally, click **End Lab** when you’ve completed the tasks in the lab.

**Note**: Don't click **End Lab** until you're finished; you'll lose access to the work you've done throughout the lab.

### **Tracking progress on Coursera**

If you complete a lab but your progress hasn’t been tracked on Coursera, you may need to refresh the page for your progress to be registered. Once you complete the lab and refresh the page, the green check mark should appear.

## Helpful navigation tips and keyboard shortcuts

The following contains a list of navigation tips and keyboard shortcuts you may find useful when completing your Linux labs. Your cursor must be in the terminal window to use these navigation tips and keyboard shortcuts.

<div class="rc-CML" dir="auto" id="bkmrk-ctrl-%2B-c%3A-terminates"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>CTRL + C</var>: Terminates a command that is currently running; from the instructions portion of Qwiklabs, you can use <var>CTRL + C</var> to copy, but within the terminal, it will only terminate a command and if one isn't running, it will display <var>^C</var> at the prompt
- <var>CTRL + V</var>: Pastes text
- <var>clear</var>: Clears the terminal screen; this can also be done by entering <var>CTRL + L</var>
- <var>CTRL + A</var>: Sets your cursor at the beginning of a command
- <var>CTRL + E</var>: Sets your cursor at the end of a command
- <var>Left arrow</var> **key**: Moves left within a command
- <var>Right arrow</var> **key**: Moves right within a command
- <var>Up arrow</var> **key**: Provides the last command you entered into the command line; can be entered multiple times to go through multiple commands from the command history
- <var>Down arrow</var> **key**: Provides the next command in the command history; must be after using the <var>up arrow</var> key
- <var>Tab</var> **key**: Provides available suggestions for completing your text

</div></div></div></div></div>## Key takeaways

Knowing how to navigate Qwiklabs will be useful as you complete the labs throughout this course. These labs can help you practice what you’ve learned in an interactive environment.

# Introduction to the shell

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-welcome-back%21-in-thi"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Welcome back! In this video, we're going to discuss the Linux shell." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Welcome back! In this video, we're going to discuss the Linux shell. </span></div><div aria-label="toggle video from This part of the Linux architecture is where the action will happen for" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This part of the Linux architecture is where the action will happen for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you as a security analyst. </span></div><div aria-label="toggle video from We introduced the shell with other components of the Linux OS earlier," class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We introduced the shell with other components of the Linux OS earlier, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but let's take a deeper look at what the shell is and what it does. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-the-shell-is-the-com"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The shell is the command-line interpreter." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The shell is the command-line interpreter. </span></div><div aria-label="toggle video from That means it helps you communicate with the operating system through" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That means it helps you communicate with the operating system through </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the command line. </span></div><div aria-label="toggle video from Previously, we discussed a command-line interface." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Previously, we discussed a command-line interface. </span></div><div aria-label="toggle video from This is essentially the shell." class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is essentially the shell. </span></div><div aria-label="toggle video from current lecture segment: The shell provides the command-line interface for you to interact with the OS." class="rc-Phrase active css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The shell provides the command-line interface for you to interact with the OS. </span></div><div aria-label="toggle video from To tell the OS what to do, you enter commands into this interface." class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To tell the OS what to do, you enter commands into this interface. </span></div><div aria-label="toggle video from A command is an instruction telling the computer to do something." class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A command is an instruction telling the computer to do something. </span></div><div aria-label="toggle video from The shell communicates with the kernel to execute these commands." class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The shell communicates with the kernel to execute these commands. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-earlier%2C-we-discusse"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Earlier, we discussed how the operating system helps humans and" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Earlier, we discussed how the operating system helps humans and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">computers speak with each other. </span></div><div aria-label="toggle video from The shell is the part of the OS that allows you to do this." class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The shell is the part of the OS that allows you to do this. </span></div><div aria-label="toggle video from Think of this as a very helpful language interpreter between you and your system." class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Think of this as a very helpful language interpreter between you and your system. </span></div><div aria-label="toggle video from Since you do not speak computer language or binary," class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since you do not speak computer language or binary, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you can't directly communicate with your system. </span></div><div aria-label="toggle video from This is where the shell comes in to help you." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is where the shell comes in to help you. </span></div><div aria-label="toggle video from Your OS doesn't need the shell for most of its work, but" class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Your OS doesn't need the shell for most of its work, but </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it is an interface between you and what your system can offer. </span></div><div aria-label="toggle video from It allows you to perform math, run tests, and execute applications." class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It allows you to perform math, run tests, and execute applications. </span></div><div aria-label="toggle video from More importantly, it allows you to combine these operations and" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">More importantly, it allows you to combine these operations and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">connect applications to each other </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to perform complex and automated tasks. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-arowdh cds-3 cds-grid-item cds-48 cds-73" id="bkmrk-just-as-there-are-ma"><div><div class="rc-TranscriptHighlighter css-79elbk"><div class="rc-Transcript css-9li235" data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="interactive_transcript" data-track-page="item_layout" role="presentation"><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Just as there are many Linux distributions," class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Just as there are many Linux distributions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there are many different types of shells. </span></div><div aria-label="toggle video from We'll primarily focus on the Bash shell in this course." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll primarily focus on the Bash shell in this course. </span></div><div aria-label="toggle video from Let's continue to learn more about the shell." class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's continue to learn more about the shell. </span></div></div></div></div></div></div></div></div><div class="cds-1 css-hcqebr cds-3 cds-grid-item cds-48 cds-66" id="bkmrk--3"><div class="cds-251 cds-formControl-root css-4p0j7c cds-254"><div class="css-1whdyhf" data-testid="visually-hidden">  
</div></div></div>

# Different types of shells

Knowing how to work with Linux shells is an important skill for cybersecurity professionals. Shells can be used for many common tasks. Previously, you were introduced to shells and their functions. This reading will review shells and introduce you to different types, including the one that you'll use in this course.

## Communicate through a shell

As you explored previously, the **shell** is the command-line interpreter. You can think of a shell as a translator between you and the computer system. Shells allow you to give commands to the computer and receive responses from it. When you enter a command into a shell, the shell executes many internal processes to interpret your command, send it to the kernel, and return your results.

## Types of shells

The many different types of Linux shells include the following:

<div class="rc-CML" dir="auto" id="bkmrk-bourne-again-shell-%28"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- Bourne-Again Shell (bash)
- C Shell (csh)
- Korn Shell (ksh)
- Enhanced C shell (tcsh)
- Z Shell (zsh)
- PowerShell (by microsoft also on windows)

</div></div></div></div></div>All Linux shells use common Linux commands, but they can differ in other features. For example, ksh and bash use the dollar sign (<var>$</var>) to indicate where users type in their commands. Other shells, such as zsh, use the percent sign (<var>%</var>) for this purpose.

## Bash

**Bash** is the default shell in most Linux distributions. It’s considered a user-friendly shell. You can use bash for basic Linux commands as well as larger projects.

Bash is also the most popular shell in the cybersecurity profession. You’ll use bash throughout this course as you learn and practice Linux commands.

## Key takeaways

Shells are a fundamental part of the Linux operating system. Shells allow you to give commands to the computer and receive responses from it. They can be thought of as a translator between you and your computer system. There are many different types of shells, but the bash shell is the most commonly used shell in the cybersecurity profession. You’ll learn how to enter Linux commands through the bash shell later in this course.

# Input and output in the shell

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-hello-again%21-in-this"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Hello again! In this video," class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Hello again! In this video, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we're going to learn a little more about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the shell and how to communicate with it. </span></div><div aria-label="toggle video from Communicating with a computer is" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Communicating with a computer is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">like having a conversation with your friend. </span></div><div aria-label="toggle video from One person asks a question" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">One person asks a question </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and the other person answers with a response. </span></div><div aria-label="toggle video from If you don't know the answer," class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If you don't know the answer, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you can just say you don't know the answer. </span></div><div aria-label="toggle video from When you communicate with the shell," class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When you communicate with the shell, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the commands in the shell can take input, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">give output, or give error messages. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-explore-standa"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's explore standard input," class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's explore standard input, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">standard output, and error messages in more detail. </span></div><div aria-label="toggle video from Standard input consists of information" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Standard input consists of information </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">received by the OS via the command line. </span></div><div aria-label="toggle video from This is like you asking your friend" class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is like you asking your friend </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a question during a conversation. </span></div><div aria-label="toggle video from The information is input from your keyboard to the shell." class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The information is input from your keyboard to the shell. </span></div><div aria-label="toggle video from If the shell can interpret your request," class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If the shell can interpret your request, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it asks the kernel for the resources it </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">needs to execute the related task. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-take-a-look-at"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's take a look at this through echo," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's take a look at this through echo, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a Linux command that outputs a specified string of text. </span></div><div aria-label="toggle video from String data is data consisting" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">String data is data consisting </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of an ordered sequence of characters. </span></div><div aria-label="toggle video from In our example, we'll just have" class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In our example, we'll just have </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it output the string of: hello. </span></div><div aria-label="toggle video from So, as input, we'll type: echo hello into the shell." class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So, as input, we'll type: echo hello into the shell. </span></div><div aria-label="toggle video from Later, when we press enter, we'll get the output." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Later, when we press enter, we'll get the output. </span></div><div aria-label="toggle video from But before we do that," class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But before we do that, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's first discuss the concept of output in more detail. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-standard-output-is-t"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Standard output is the information" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Standard output is the information </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">returned by the OS through the shell. </span></div><div aria-label="toggle video from In the same way that your friend" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the same way that your friend </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">gives an answer to your question, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">output is a computer's response to the command you input. </span></div><div aria-label="toggle video from current lecture segment: Output is what you receive." class="rc-Phrase active css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Output is what you receive. </span></div><div aria-label="toggle video from Let's pick up where we left off in our example and send" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's pick up where we left off in our example and send </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the input of: echo hello to the OS by pressing enter. </span></div><div aria-label="toggle video from Immediately, the shell returns the output of: hello." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Immediately, the shell returns the output of: hello. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-finally%2C-standard-er"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Finally, standard error contains" class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, standard error contains </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">error messages returned by the OS through the shell. </span></div><div aria-label="toggle video from Just like your friend might" class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Just like your friend might </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicate that they can't answer a question, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the system responds with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">an error message if they can't respond to your command. </span></div><div aria-label="toggle video from Sometimes this might occur when we misspell" class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Sometimes this might occur when we misspell </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a command or the system </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">doesn't know the response to the command. </span></div><div aria-label="toggle video from Other times, it might happen because we don't have" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Other times, it might happen because we don't have </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the appropriate permissions to perform a command. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-we%27ll-explore-anothe"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We'll explore another example" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll explore another example </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that demonstrates standard error. </span></div><div aria-label="toggle video from Let's input: eco hello into the shell." class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's input: eco hello into the shell. </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Notice I intentionally misspelled echo as e-c-o. </span></div><div aria-label="toggle video from When we press enter," class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we press enter, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">an error message appears. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-to-wrap-up%2C-we%27ve-co"><div aria-label="toggle video from To wrap up, we've covered" class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To wrap up, we've covered </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the basics of communication with the shell. </span></div><div aria-label="toggle video from Communication with the shell can only go in one of" class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Communication with the shell can only go in one of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">three ways: the system </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">receives a command—this is input; </span></div><div aria-label="toggle video from the system responds to the command and produces output;" class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the system responds to the command and produces output; </span></div><div aria-label="toggle video from and finally, the system doesn't know how to respond," class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and finally, the system doesn't know how to respond, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">resulting in an error. </span></div><div aria-label="toggle video from Later, you'll become much more familiar with this as" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Later, you'll become much more familiar with this as </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we explore commands useful for security professionals. </span></div></div>

# Linux basics Wrap-up; Glossary terms from week 2

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-we%27ve-made-it-to-the"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We've made it to the end of this section." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We've made it to the end of this section. </span></div><div aria-label="toggle video from Great work!" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Great work! </span></div><div aria-label="toggle video from Let's recap what you've just completed." class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's recap what you've just completed. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-in-this-section%2C-you"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In this section, you learned" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this section, you learned </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">about the Linux operating system. </span></div><div aria-label="toggle video from current lecture segment: We examined the architecture of Linux." class="rc-Phrase active css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We examined the architecture of Linux. </span></div><div aria-label="toggle video from In our exploration of" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In our exploration of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the different distributions of Linux, we </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">discussed some of the most </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">widely used distros in security. </span></div><div aria-label="toggle video from You were introduced to KALI LINUX™, Ubuntu," class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You were introduced to KALI LINUX™, Ubuntu, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Parrot, Red Hat, and CentOS distributions. </span></div><div aria-label="toggle video from Finally, you learned about the shell and" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, you learned about the shell and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">its role as an interpreter </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">between the user and operating system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-congratulations%21-you"><div aria-label="toggle video from Congratulations! You're doing" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Congratulations! You're doing </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">great, and we have more useful topics to come. </span></div><div aria-label="toggle video from In the next part of the program," class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the next part of the program, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you'll learn specific commands to use within </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the shell while working as </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a security analyst. </span></div><div aria-label="toggle video from In the next part of the program," class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's continue on. </span></div></div>---

## Terms and definitions from Course 4, Week 2

**Application:** A program that performs a specific task

**Bash:** The default shell in most Linux distributions

**CentOS:** An open-source distribution that is closely related to Red Hat

**Central Processing Unit (CPU):** A computer’s main processor, which is used to perform general computing tasks on a computer

**Command:** An instruction telling the computer to do something

**Digital forensics:** The practice of collecting and analyzing data to determine what has happened after an attack

**Directory:** A file that organizes where other files are stored

**Distributions:** The different versions of Linux

**File path:** The location of a file or directory

**Filesystem Hierarchy Standard (FHS):** The component of the Linux OS that organizes data

**Graphical user interface (GUI):** A user interface that uses icons on the screen to manage different tasks on the computer

**Hard drive:** A hardware component used for long-term memory

**Hardware**: The physical components of a computer

**Internal hardware:** The components required to run the computer

**Kali Linux ™**: An open-source distribution of Linux that is widely used in the security industry

**Kernel:** The component of the Linux OS that manages processes and memory

**Linux:** An open source operating system

**Package:** A piece of software that can be combined with other packages to form an application

**Package manager:** A tool that helps users install, manage, and remove packages or applications

**Parrot:** An open-source distribution that is commonly used for security

**Penetration test (pen test):** A simulated attack that helps identify vulnerabilities in systems, networks, websites, applications, and processes

**Peripheral devices:** Hardware components that are attached and controlled by the computer system

**Random Access Memory (RAM):** A hardware component used for short-term memory

**Red Hat® Enterprise Linux®** (also referred to simply as Red Hat in this course)**:** A subscription-based distribution of Linux built for enterprise use

**Shell:** The command-line interpreter

**Standard error:** An error message returned by the OS through the shell

**Standard input:** Information received by the OS via the command line

**Standard output:** Information returned by the OS through the shell

**String data:** Data consisting of an ordered sequence of characters

**Ubuntu:** An open-source, user-friendly distribution that is widely used in security and other industries

**User:** The person interacting with a computer

# stories

# Phil: Learn and grow in the cybersecurity field

Hi, I'm Phil I'm the Chief Information Security Officer for Google Cloud, and a big part of that is, of course, cybersecurity.  
So, in cyber you've always got to learn, you've always got to stay up to date for the simple reason that technology and business and the world of our, kind of digital lives is just always changing.  
The online services that you use today are probably very different even just when what they were 12 months ago.  
In the mid '90s, I worked on one of the world's first internet banking systems.  
And essentially we were building and coding all of the security ourselves.  
I remember working on the first web browsers, the first web servers, the first implementations of encryption on the Internet.  
This was even before Google even existed.  
And so this was the very beginning of the Internet and we were literally kind of assembling and building this and learning how to do it as we went along.  
When you are first getting into cybersecurity, it's important to not get overwhelmed.  
It's a very big space.  
And all of us started off at where you are today.  
And we had to learn into that.  
At one point, I didn't know Linux, I didn't know how to program.  
I didn't know various parts of other operating systems.  
And I had to learn step-by-step, how all of that worked and gradually build up that knowledge over time.  
And even now I still have to look things up occasionally because I don't keep everything in my head all at once and that's totally fine.  
When you're approaching a new situation, you're always going to have a degree of anxiety about whether you're going to be  
able to learn it quickly enough. And generally, with enough experience, you're gradually comfortable that you will.  
But again, this is important to remember that you don't have to learn everything about everything all at once.  
Most of the time you learn enough to be enough of value in the initial part of the process, then you learn as you go.  
Start off by writing a few lines of simple code or looking at somebody else's code and trying to understand what it does and then change it a little bit and just incrementally work into this.  
Build that foundation of knowledge that gives you the ability to learn other things, and I think things will stem from that.

# linux basics part 2; electric boogalooo

# Welcome to week 3; Linux commands via bash the bourne-again shell

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-learning-to-communic"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Learning to communicate in a new way can be exciting." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Learning to communicate in a new way can be exciting. </span></div><div aria-label="toggle video from Maybe you've learned a new language" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Maybe you've learned a new language </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and can remember this feeling. </span></div><div aria-label="toggle video from Perhaps a lot of us share this excitement with" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Perhaps a lot of us share this excitement with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">young children as they are expanding their vocabulary. </span></div><div aria-label="toggle video from Others, including me, remember a sense of wonder when we" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Others, including me, remember a sense of wonder when we </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">first used a specialized language </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to communicate with their computer. </span></div><div aria-label="toggle video from Others, including me, remember a sense of wonder when we" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this section, we'll continue to learn more about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Linux and how to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">communicate with the OS through its shell. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-you%27ll-utilize-the-c"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from You'll utilize the command line" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You'll utilize the command line </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to communicate with the OS. </span></div><div aria-label="toggle video from You'll learn how to input" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You'll learn how to input </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">commands in the shell and learn about some of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the core Linux commands that you'll </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">use as a security analyst. </span></div><div aria-label="toggle video from Specifically, this includes" class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Specifically, this includes </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">navigating and managing the file system. </span></div><div aria-label="toggle video from You'll also focus on" class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You'll also focus on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">authenticating and authorizing users. </span></div><div aria-label="toggle video from This means you'll be able to" class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This means you'll be able to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">use a command line to add and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">delete users from the system and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to control what they have access to. </span></div><div aria-label="toggle video from Finally, there's always more to learn." class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, there's always more to learn. </span></div><div aria-label="toggle video from Finally, there's always more to learn." class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll cover accessing resources that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">support learning new Linux commands. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-i-remember-when-i-fi"><div aria-label="toggle video from I remember when I first learned about the command line" class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I remember when I first learned about the command line </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and was shocked at the capabilities it provided. </span></div><div aria-label="toggle video from I didn't need to click through" class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I didn't need to click through </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">multiple screens to get tasks done. </span></div><div aria-label="toggle video from Although it took some practice and time to get used to," class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Although it took some practice and time to get used to, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it has been one of the biggest tools at my disposal. </span></div><div aria-label="toggle video from After this section, you'll have" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">After this section, you'll have </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a practical experience in an area </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">important to the work of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a security analyst: using Linux commands. </span></div><div aria-label="toggle video from After this section, you'll have" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0">---

<div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Welcome back. Before we get" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Welcome back. Before we get </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">into specific Linux commands, let's </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">explore in more detail the basics of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">communicating with the OS through the shell. </span></div><div aria-label="toggle video from Being able to utilize Linux commands is" class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Being able to utilize Linux commands is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a foundational skill for all security professionals. </span></div><div aria-label="toggle video from As a security analyst, you will work with" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As a security analyst, you will work with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">server logs and you'll need to know how to navigate, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">manage and analyze files </span></div><div aria-label="toggle video from remotely without a graphical user interface." class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">remotely without a graphical user interface. </span></div><div aria-label="toggle video from In addition, you'll need to know how to" class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In addition, you'll need to know how to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">verify and configure users and group access. </span></div><div aria-label="toggle video from You'll also need to give authorization" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You'll also need to give authorization </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and set file permissions. </span></div><div aria-label="toggle video from That means that developing skills with the command line" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That means that developing skills with the command line </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">is essential for your work as a security analyst. </span></div><div aria-label="toggle video from When we learned about the Linux" class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we learned about the Linux </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">architecture, we learned that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the shell is one of the main components </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of an operating system. </span></div><div aria-label="toggle video from We also learned that there are different shells." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We also learned that there are different shells. </span></div><div aria-label="toggle video from In this section, we'll utilize the Bash shell." class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this section, we'll utilize the Bash shell. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Bash is the default shell in most Linux distributions." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Bash is the default shell in most Linux distributions. </span></div><div aria-label="toggle video from For the most part, the key Linux commands that you'll" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For the most part, the key Linux commands that you'll </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">be learning in this section are the same across shells. </span></div><div aria-label="toggle video from Now that you know what shell you'll be" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now that you know what shell you'll be </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">using, let's go into how to write in Bash. </span></div><div aria-label="toggle video from As we discussed in a previous section," class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As we discussed in a previous section, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">communicating with your OS is like a conversation. </span></div><div aria-label="toggle video from You type in commands, and the OS" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You type in commands, and the OS </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">responds with an answer to your command. </span></div><div aria-label="toggle video from A command is an instruction" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A command is an instruction </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">telling the computer to do something. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We'll try out a command in Bash." class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll try out a command in Bash. </span></div><div aria-label="toggle video from Notice a dollar sign before the cursor." class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Notice a dollar sign before the cursor. </span></div><div aria-label="toggle video from This is your prompt to enter a new command." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is your prompt to enter a new command. </span></div><div aria-label="toggle video from Some commands might tell the computer to" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Some commands might tell the computer to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">find something like a specific file. </span></div><div aria-label="toggle video from Others might tell it to launch a program." class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Others might tell it to launch a program. </span></div><div aria-label="toggle video from Or, it might be to output a specific string of text." class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Or, it might be to output a specific string of text. </span></div><div aria-label="toggle video from In the last section," class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the last section, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">when we discussed input and output, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we explored how the echo command did this. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's input the echo command again." class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's input the echo command again. </span></div><div aria-label="toggle video from You may notice that the command" class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You may notice that the command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we just input is not complete. </span></div><div aria-label="toggle video from If we're going to use the echo command" class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we're going to use the echo command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to output a specific string of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">texts, we need to specify what the string of text is. </span></div><div aria-label="toggle video from This is what arguments are for." class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is what arguments are for. </span></div><div aria-label="toggle video from An argument is specific information needed by a command." class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">An argument is specific information needed by a command. </span></div><div aria-label="toggle video from Some commands take multiple arguments." class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Some commands take multiple arguments. </span></div><div aria-label="toggle video from So now let's complete the echo command with an argument." class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So now let's complete the echo command with an argument. </span></div><div aria-label="toggle video from We're learning some pretty technical stuff," class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We're learning some pretty technical stuff, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">so how about we output the words: "You are doing great!" </span></div><div aria-label="toggle video from We'll add this argument, and" class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll add this argument, and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">then we'll press enter to get the output. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases"><div aria-label="toggle video from In this example, our argument was a string of text." class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this example, our argument was a string of text. </span></div><div aria-label="toggle video from Arguments can provide other types of information as well." class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Arguments can provide other types of information as well. </span></div><div aria-label="toggle video from One thing that is really important in Linux is that" class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">One thing that is really important in Linux is that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all commands and arguments are case sensitive. </span></div><div aria-label="toggle video from This includes file and directory names." class="rc-Phrase css-ugczj4" data-cue="62" data-cue-index="61" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This includes file and directory names. </span></div><div aria-label="toggle video from Keep that in mind as you learn more about how to" class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Keep that in mind as you learn more about how to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">use Linux in your day-to-day tasks as a security analyst. </span></div><div aria-label="toggle video from Okay, now that we've covered the basics of" class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Okay, now that we've covered the basics of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">entering Linux commands and arguments </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">through the Bash shell, we're ready </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to learn some specific commands. </span></div><div aria-label="toggle video from This is exciting, so let's get to our next video!" class="rc-Phrase css-ugczj4" data-cue="69" data-cue-index="68" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is exciting, so let's get to our next video! </span></div></div></div></div>

# Portfolio Activity: Use Linux commands to manage file permissions

<div data-react-modal-body-trap="" id="bkmrk-" style="position: absolute; opacity: 0;" tabindex="0">  
</div><div id="bkmrk--1"></div><div aria-hidden="true" id="bkmrk--2"><div class="rc-MetatagsWrapper"><div class="rc-Course" role="none"><div class="rc-LearningAssistant"><div class="_1ed7tibu messages"><div>  
</div></div></div></div></div></div><div class="cds-1 css-1vu88ff cds-3 cds-grid-item cds-48 cds-49" id="bkmrk--3"></div><div class="cds-1 css-12jam8y cds-3 cds-grid-item cds-48" id="bkmrk-portfolio-activity%3A-"><main class="item-page-content css-b5no2e" id="bkmrk-portfolio-activity%3A--1" style="height: 100%;">#   


<div class="cds-1 css-0 cds-2"><div class="cds-1 css-0 cds-3 cds-grid-item cds-48"><div class="css-d48u4r" data-e2e="CoverPageHeader"><div class="cds-137 css-kny9tu cds-139">Quiz<span class="rc-A11yScreenReaderOnly">30 minutes</span><span aria-hidden="true"> • 30 min</span></div><div class="css-16tw56a"><div data-e2e="LearningObjectivesButton">  
</div></div></div></div></div></main></div><div class="cds-1 css-0 cds-3 cds-grid-item cds-48" id="bkmrk--4">  
</div>### Submit your assignment

<div class="cds-1 css-0 cds-3 cds-grid-item cds-48" id="bkmrk-due%C2%A0july-23%2C-11%3A59-p"><div class="css-n1ch8l" data-e2e="CoverPageRow"><div data-e2e="CoverPageRow__left-side-view"><div class="css-1fxprx5" data-e2e="CoverPageRow__step-title">  
</div><div data-e2e="CoverPageRow__step-details"><div class="css-m3ahs"><div class="css-1ap3tds"><div class="css-8bhjx3" data-e2e="CoverPagePhaseDetail"><span class="cds-137 css-qa763e cds-139" data-test="label">Due</span> <span class="cds-137 css-dmxkm1 cds-139" data-e2e="CoverPagePhaseDetail__content" data-test="content"><span class="rc-A11yScreenReaderOnly">July 23, 11:59 PM EDT</span><span aria-hidden="true">Jul 23, 11:59 PM EDT</span></span></div></div></div></div></div><div data-e2e="CoverPageRow__right-side-view"><div class="css-157hk8"><div class="css-xj6xiy"><div><div class="css-w1zv81"><div class="css-1yhoabd">  
</div></div></div></div></div></div></div></div>### Receive grade

<div class="cds-1 css-0 cds-3 cds-grid-item cds-48" id="bkmrk-to-pass%C2%A080%25-or-highe"><div class="css-n1ch8l" data-e2e="CoverPageRow"><div data-e2e="CoverPageRow__left-side-view"><div class="css-1fxprx5" data-e2e="CoverPageRow__step-title">  
</div><div data-e2e="CoverPageRow__step-details"><div class="css-m3ahs"><div class="css-1ap3tds"><div class="css-8bhjx3" data-e2e="CoverPagePhaseDetail"><span class="cds-137 css-qa763e cds-139" data-test="label">To Pass</span> <span class="cds-137 css-dmxkm1 cds-139" data-e2e="CoverPagePhaseDetail__content" data-test="content"><span aria-hidden="false">80% or higher</span></span></div></div></div></div></div><div data-e2e="CoverPageRow__right-side-view"><div class="css-kb0qrp" data-e2e="CoverPageRowRightSideGrade"><div class="css-14p9y0y" data-e2e="CoverPageRowRightSideGrade__grade-info">  
</div></div></div></div></div>### Your grade

<span aria-hidden="true">-</span><span class="rc-A11yScreenReaderOnly">Not available</span>

<div class="css-9fnwu" id="bkmrk--5"><div class="rc-ItemFeedback undefined"><div class="rc-ItemFeedbackContent horizontal-box css-lfchfm"><div class="css-e40v4" data-testid="like-button"><div class="rc-LikeContent"><div>  
</div></div></div></div></div></div><div class="css-e40v4" data-testid="dislike-button" id="bkmrk--6"><div class="rc-LikeContent"><div>  
</div></div></div><div class="rc-FlagContent css-8dn4zy" id="bkmrk--7"></div><div aria-hidden="true" id="bkmrk--8"><div class="rc-MetatagsWrapper"><div class="rc-Course" role="none"><div class="rc-LegacyDataFetch"><section class="cds-1 css-kt8aw0 cds-2 cds-5"><div class="cds-1 css-0 cds-2 cds-3 cds-grid-item cds-8 cds-11"><div class="cds-1 css-1fsmhyl cds-2 cds-3 cds-grid-item cds-5 cds-8" id="bkmrk--9"><div class="cds-1 css-12jam8y cds-3 cds-grid-item cds-48"><main class="item-page-content css-b5no2e" id="bkmrk--10" style="height: 100%;"><div class="cds-1 css-0 cds-2"><div class="css-9fnwu"><div class="rc-ItemFeedback undefined"><div class="rc-ItemFeedbackContent horizontal-box css-lfchfm"><div class="css-e40v4"><div class="rc-FlagContent css-8dn4zy" id="bkmrk--11"><div aria-live="polite" role="alert">  
</div><div class="ReactModalPortal">  
</div></div></div></div></div></div></div><div data-testid="faker">  
</div></main></div></div></div></section></div></div><div class="css-1qaroyf" id="bkmrk--12"></div></div></div><div id="bkmrk--13"></div><div class="css-uslc23" id="bkmrk--14"></div><div class="ReactModal__Overlay ReactModal__Overlay--after-open" id="bkmrk--15" style="position: relative; inset: 0px; background-color: rgba(255, 255, 255, 0.75); z-index: 4000;"><div aria-modal="true" class="ReactModal__Content ReactModal__Content--after-open css-1d1llns" role="dialog" tabindex="-1"><div aria-label="tunnel vision" aria-modal="true" class="rc-TunnelVision _3hmsj" role="dialog"><div class="_80l7z7">  
</div><div class="_oafuo3g" data-classname="tunnelvision-window-0"><div class="rc-TunnelVisionHeader _11sxso0 ">  
</div></div></div></div></div># Portfolio Activity: Use Linux commands to manage file permissions

Graded Quiz<span data-testid="time-commitment"><span class="rc-A11yScreenReaderOnly css-ibxuln">.</span><span aria-hidden="true"> • </span>30 min</span><span class="rc-A11yScreenReaderOnly css-ibxuln">.</span><span aria-hidden="true"> • </span><span class="rc-A11yScreenReaderOnly css-ibxuln">8 total points available.</span><span aria-hidden="true" data-testid="total-points">8 total points</span>

<div class="rc-TunnelVisionHeader _11sxso0 " id="bkmrk-duejul-23%2C-11%3A59-pm-"><div class="_11oc718"><div class="cds-1 css-1n47bz1 cds-2 cds-21" data-e2e="TunnelVisionWrapper__header"><div class="cds-1 css-a90vgb cds-3 cds-grid-item cds-48 cds-59 cds-88" data-e2e="TunnelVisionWrapper__header-left"><div data-e2e="HeaderLeft">  
</div></div><div class="cds-1 css-3bzjfj cds-3 cds-grid-item cds-48 cds-53 cds-80" data-e2e="TunnelVisionWrapper__header-right"><div class="css-gvoll6" data-e2e="HeaderRight"><div><div data-e2e="HeaderRight__deadline"><span class="cds-137 css-1a7vngm cds-139">Due</span><span class="cds-137 css-51cxur cds-139">Jul 23, 11:59 PM EDT</span></div></div></div></div></div></div></div>To pass this course item, you must complete the activity and receive at least 80%, or 7 out of 8 points, on the questions that follow. Once you have completed the activity and questions, review the feedback provided. You can learn more about graded and practice items in the [course overview<svg aria-labelledby="cds-react-aria-86-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--16" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/supplement/rUv9P/course-4-overview)

<div class="css-10k4sfe" id="bkmrk--17"><div class="css-r172lo"><div class="cds-137 css-1emeb4e cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer"><div>  
</div></div></div></div></div></div>## Activity Overview

<div class="css-10k4sfe" id="bkmrk--18"><div class="css-r172lo"><div class="cds-137 css-1emeb4e cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/2AQfHY8kQPi_Sz_ikBsRIA_945de3f0876e4bf081e7fad0a3563cf1_qMcY1UR7VsPnVIFuM8UgB-L2b56IPl0pUO6C1_xSlZUuxSVm7k1ykQkyiztVG18Tlmfne3wuxHRi3BRcXCAwGuDqdBf_fzrPn7N4bdIIgDSB3jEr2YrJ-W35cDSrR9JsqNuh4z7mhD84xoeWycs1BQo?expiry=1688860800000&hmac=RZewvPkuZpPKr-_WmHWw00TIloEW0YQfWvMdyeIkBHM)</figure></div></div></div></div></div></div>In this activity, you will create a new portfolio document to demonstrate your experience using Linux commands to manage file permissions. You can add this document to your cybersecurity portfolio, which you can share with prospective employers or recruiters. To review the importance of building a professional portfolio and options for creating your portfolio, read [Create a cybersecurity portfolio<svg aria-labelledby="cds-react-aria-87-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--19" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/resources/wDFrc)

.

To create your portfolio document, you will review a scenario and follow a series of steps. This scenario is connected to [the lab<svg aria-labelledby="cds-react-aria-88-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--20" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/ungradedLti/483Kl/activity-manage-authorization)

you have just completed about how to examine and manage file permissions. You will explain the commands you used in that lab, and this will help you prepare for future job interviews and other steps in the hiring process.

Be sure to complete this activity and answer the questions that follow before moving on. The next course item will provide you with a completed exemplar to compare to your own work.

## Scenario

<div id="bkmrk--21"><figure contenteditable="false" role="figure">![](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/n3CZ4UsCRPG8LZRWHwB0GA_75550adfbcb14fe19fa4c33d1d61c0f1_932cjNrOIXWC8O30ForxMUYss1gqOznt9oGLtNG7B6KMVZyttaX5azkrmrq9nzKD2GfXYL8hnKlu4Lo9g9KrsJPa6H-tCCibk747bj_S1w_210avbXn8C0S-9oMfZIk2wiK72sdKkOiN5n41vhzhpYI?expiry=1688860800000&hmac=hvYO-lgYx2LIkM57A2p_Tnyob75ullH-vF2G0leLabQ)</figure></div>Review the scenario below. Then, complete the step-by-step instructions.

You are a security professional at a large organization. You mainly work with their research team. Part of your job is to ensure users on this team are authorized with the appropriate permissions. This helps keep the system secure.

Your task is to examine existing permissions on the file system. You’ll need to determine if the permissions match the authorization that should be given. If they do not match, you’ll need to modify the permissions to authorize the appropriate users and remove any unauthorized access.

**Note:** This scenario involves investigating and updating the same file permissions as the ones in the [Manage authorization<svg aria-labelledby="cds-react-aria-89-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--22" role="img" viewbox="0 0 16 16" width="16"></svg>](https://www.coursera.org/learn/linux-and-sql/ungradedLti/483Kl/activity-manage-authorization)

lab. You can revisit the lab to get screenshots to include in your portfolio document. If you choose, it's also possible to complete this activity without revisiting the lab by typing your commands in the template.

## Step-By-Step Instructions

<div class="css-10k4sfe" id="bkmrk--23"><div class="css-r172lo"><div class="cds-137 css-1emeb4e cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/Wu9aOBevT1eXCukQ_LlYfA_2e3b75d0dadc4f7e870172cd764a21f1_932cjNrOIXWC8O30ForxMUYss1gqOznt9oGLtNG7B6KMVZyttaX5azkrmrq9nzKD2GfXYL8hnKlu4Lo9g9KrsJPa6H-tCCibk747bj_S1w_210avbXn8C0S-9oMfZIk2wiK72sdKkOiN5n41vhzhpYI?expiry=1688860800000&hmac=-8jwdecLsL9doSPhVJpVdCIgI9gpiZp3njGmgpAvmnU)</figure></div></div></div></div></div></div>Follow the instructions to complete each step of the activity. Then, answer the 8 questions at the end of the activity before going to the next course item to compare your work to a completed exemplar.

### Step 1: Access the template

To use the template for this course item, click the following link and select *Use Template*. (In this step, you will just open the template. More instructions for how to use the template will be included in later steps.)

Link to template: [File permissions in Linux<svg aria-labelledby="cds-react-aria-90-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--24" role="img" viewbox="0 0 16 16" width="16"></svg>](https://docs.google.com/document/d/1A3xiUi9wbXf5lGvRwm8oFsXq18Q8mP7FUDNndjj89zc/template/preview?usp=sharing)

OR

If you don’t have a Google account, you can download the template directly from the following attachment.

<div id="bkmrk--25"><div contenteditable="false" data-e2e="slate-asset-wrapper">  
</div></div>
<div class="css-10k4sfe" id="bkmrk--26"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--27"></div></div></div></div></div></div>The following supporting materials will help you complete this activity. Keep them open as you proceed to the next steps.

To use the supporting materials for this course item, click the links.

The **Instructions for including Linux commands** document provides instructions and best practices for including samples of Linux commands in your portfolio activity.

Link to supporting material: [Instructions for including Linux commands<svg aria-labelledby="cds-react-aria-94-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--28" role="img" viewbox="0 0 16 16" width="16"></svg>](https://docs.google.com/document/d/1t-9o-bPndpOIh9577FJobiakS10kJxgIKrB6GG7EPwA/template/preview?usp=sharing&resourcekey=0-623w2JztdmNSu3nDbsQJcQ)

The **Current file permissions** document demonstrates how the file structure is built for this portfolio activity. The file permissions for each file or directory are also provided.

Link to supporting material: [Current file permissions<svg aria-labelledby="cds-react-aria-95-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--29" role="img" viewbox="0 0 16 16" width="16"></svg>](https://docs.google.com/document/d/1F3-8XQZsNagSzTkJwFzOGY5OHbGbMRtlb8GbmXE_gCc/template/preview?usp=sharing&resourcekey=0-UUEu0EyFFvMf0SAipcel6w)

**Note**: It is recommended that you use the **Manage authorization** lab to complete this portfolio activity. If you’re revisiting the lab, using the **Current file permissions** document is optional because this file structure has already been created for you.

OR

If you don’t have a Google account, you can download the supporting materials directly from the following attachments.

<div id="bkmrk--30"><div contenteditable="false" data-e2e="slate-asset-wrapper">  
</div></div><div id="bkmrk--31">  
</div><div id="bkmrk--32"><div contenteditable="false" data-e2e="slate-asset-wrapper">  
</div></div>
<div class="css-10k4sfe" id="bkmrk--33"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--34"></div></div></div></div></div></div>In the **Manage authorization** lab, check the permissions set for files and subdirectories in the <var>projects</var> directory. Make sure you display all permissions, including hidden files. Or, use the content of [**Current file permissions**<svg aria-labelledby="cds-react-aria-100-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--35" role="img" viewbox="0 0 16 16" width="16"></svg>](https://docs.google.com/document/d/1F3-8XQZsNagSzTkJwFzOGY5OHbGbMRtlb8GbmXE_gCc/template/preview?usp=sharing&resourcekey=0-UUEu0EyFFvMf0SAipcel6w)

document to determine the current permissions.

Describe the command you can use to check permissions in the **Check file and directory details** section of the **File permissions in Linux** template. From the lab, take a screenshot of the Linux command you used. Or, type this command directly into the template.

Then, use either the output of this command in the lab or the content or the **Current file permissions** document to indicate the current permissions. If using the **Current file permissions** document, write these in the 10-character string that would be part of the command's output.


<div class="css-10k4sfe" id="bkmrk--36"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--37"></div></div></div></div></div></div>Choose one example from the output in the previous step. In the **Describe the permissions string** section of the **File permissions in Linux** template, write a short description that explains the 10-character string in the example. You should describe what the 10-character string is for and what each character represents.


<div class="css-10k4sfe" id="bkmrk--38"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--39"></div></div></div></div></div></div>The organization does not allow other to have write access to any files. Based on the permissions established in Step 3, identify which file needs to have its permissions modified. Use a Linux command to modify these permissions.

Describe the command you used and its output in the **Change file permissions** section of the **File permissions in Linux** template. In the **Manage authorization** lab, take a screenshot of the Linux command you used. Or, type this command directly into the template.


<div class="css-10k4sfe" id="bkmrk--40"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--41"></div></div></div></div></div></div>The research team has archived <var>.project\_x.txt</var>, which is why it’s a hidden file. This file should not have write permissions for anyone, but the user and group should be able to read the file. Use a Linux command to assign <var>.project\_x.txt</var> the appropriate authorization.

Describe the command you used and its output in the **Change file permissions on a hidden file** section of the **File permissions in Linux** template. In the **Manage authorization** lab, take a screenshot of the Linux command you used. Or, type this command directly into the template.


<div class="css-10k4sfe" id="bkmrk--42"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--43"></div></div></div></div></div></div>The files and directories in the projects directory belong to the <var>researcher2</var> user. Only <var>researcher2</var> should be allowed to access the <var>drafts</var> directory and its contents. Use a Linux command to modify the permissions accordingly.

Describe the command you used and its output in the **Change directory permissions** section of the **File permissions in Linux** template. In the **Manage authorization** lab, take a screenshot of the Linux command you used. Or, type this command directly into the template.


<div class="css-10k4sfe" id="bkmrk--44"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--45"></div></div></div></div></div></div>To finalize the document and make its purpose clear to potential employers, be sure to complete the **Project description** and **Summary** sections of the **File permissions in Linux** template.

In the Project description section, give a general overview of the scenario and what you accomplish through Linux. Write two to four sentences.

In the Summary section, provide a short summary of the previous tasks and connect them to the scenario. Write approximately two to four sentences.

## What to Include in Your Response

Be sure to include the following in your completed activity:

<div class="css-10k4sfe" id="bkmrk-screenshots-of-your-"><div class="css-r172lo"><div class="cds-137 css-1emeb4e cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">- Screenshots of your commands or typed versions of the commands
- Explanations of your commands
- A project description at the beginning
- A summary at the end
- Details on using <var>chmod</var> to update file permissions
- Details on checking file permissions with <var>ls -la</var>
- Details on interpreting the 10-character string that represents file permissions
- Details on hidden files and directories

</div></div></div></div></div>
<div class="css-10k4sfe" id="bkmrk--46"><div class="css-r172lo"><div class="css-kz1sc2"><div class="css-1r5pb9u"><div class="cds-AccordionRoot-focusContainer"><div class="cds-AccordionRoot-container cds-AccordionRoot-silent" id="bkmrk--47"></div></div></div></div></div></div>The following is a self-assessment for your **Use Linux commands to manage file permissions** portfolio activity. You will use these statements to review your own work. The self-assessment process is an important part of the learning experience because it allows you to *objectively* assess your **Use Linux commands to manage file permissions** portfolio activity.

There are a total of 8 points possible for this activity and each statement is worth 1 point.

To complete the self-assessment, first open your **Use Linux commands to manage file permissions** portfolio activity. Then respond yes or no to each statement.

When you complete and submit your responses, you will receive a percentage score. This score will help you confirm whether you completed the required steps of the activity. The recommended passing grade for this project is at least 80% (or 7/8 points). If you want to increase your score, you can revise your project and then resubmit your responses to reflect any changes you made. Try to achieve at least 7 points before continuing on to the next course item.

### 1.

<div aria-labelledby="p3IjRJFbEe2Hmg5W0a3aqw-legend" class="rc-FormPartsQuestion" id="bkmrk-question-1" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 1</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes screenshots or typed versions of your commands.

<div aria-labelledby="p3IjRJFbEe2Hmg5W0a3aqw-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-1"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--48"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="p3IjRJFbEe2Hmg5W0a3aqw-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--49"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--50"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div aria-labelledby="p3IjRJFbEe2Hmg5W0a3aqw-legend" class="rc-FormPartsQuestion" id="bkmrk--51" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="p3IjRJFbEe2Hmg5W0a3aqw-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div>No

### 2.

<div aria-labelledby="sJ_RhbngEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsQuestion" id="bkmrk-question-2" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 2</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes a description of the project at the beginning.

<div aria-labelledby="sJ_RhbngEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point-2" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-3"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--52"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="sJ_RhbngEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--53"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--54"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div aria-labelledby="sJ_RhbngEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsQuestion" id="bkmrk--55" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="sJ_RhbngEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div>No

### 3.

<div aria-labelledby="MZxyc7nhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk-question-3" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 3</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes explanations of your commands and their output.

<div aria-labelledby="MZxyc7nhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point-4" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-5"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--56"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="MZxyc7nhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--57"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--58"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div aria-labelledby="MZxyc7nhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk--59" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="MZxyc7nhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div>No

### 4.

<div aria-labelledby="SOh_bLnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsQuestion" id="bkmrk-question-4" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 4</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes a summary at the end.

<div aria-labelledby="SOh_bLnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point-6" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-7"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--60"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="SOh_bLnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--61"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--62"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div aria-labelledby="SOh_bLnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsQuestion" id="bkmrk--63" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="SOh_bLnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div>No

### 5.

<div aria-labelledby="Y8vkZ7nhEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsQuestion" id="bkmrk-question-5" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 5</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes details on using <var>chmod</var> to update file permissions.

<div aria-labelledby="Y8vkZ7nhEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point-8" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-9"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--64"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="Y8vkZ7nhEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--65"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--66"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div aria-labelledby="Y8vkZ7nhEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsQuestion" id="bkmrk--67" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="Y8vkZ7nhEe2PVBJ-i9H_oQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div>No

### 6.

<div aria-labelledby="l-SHqbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk-question-6" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 6</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes details on checking file permissions with <var>ls -la</var>.

<div aria-labelledby="l-SHqbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point-10" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-11"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--68"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="l-SHqbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--69"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--70"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div aria-labelledby="l-SHqbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk--71" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="l-SHqbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div>No

### 7.

<div aria-labelledby="ugtb1LnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsQuestion" id="bkmrk-question-7" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 7</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes details on interpreting the 10-character string that represents file permissions.

<div aria-labelledby="ugtb1LnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point-12" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-13"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--72"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="ugtb1LnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--73"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--74"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div aria-labelledby="ugtb1LnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsQuestion" id="bkmrk--75" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="ugtb1LnhEe2uxQ79iEqrwQ-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div>No

### 8.

<div aria-labelledby="zlQTwbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk-question-8" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend"><div class="rc-FormPartsQuestion__numberCell"><span class="screenreader-only">Question 8</span></div><div class="rc-FormPartsQuestion__contentCell"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div>Your document includes details on hidden files and directories.

<div aria-labelledby="zlQTwbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" id="bkmrk-1-point-14" role="group"><div class="rc-FormPartsQuestion__row" data-test="legend" id="bkmrk-1-point-15"><div class="rc-FormPartsQuestion__contentCell" id="bkmrk--76"><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div><div class="rc-FormPartsQuestion__pointsCell"><div class="css-1mvreox"><span class="cds-137 css-mu0bf1 cds-139">1 point</span></div></div></div><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__numberCell">  
</div><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="zlQTwbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div></div></div></div></div><div class="css-18k2uoc" id="bkmrk--77"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div>Yes

<div class="css-18k2uoc" id="bkmrk--78"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label>  
</div></div><div id="bkmrk--79"><div aria-labelledby="zlQTwbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsQuestion" role="group"><div class="rc-FormPartsQuestion__row" data-testid="form-part"><div class="rc-FormPartsQuestion__contentCell"><div aria-labelledby="zlQTwbnhEe2cjAoY9ZXj2w-legend" class="rc-FormPartsMcq" role="group"><div class="css-18k2uoc"><div class="rc-Option"><label class="_1oyudm1w cui-Checkbox cui-active"></label><div class="cds-137 css-80vnnb cds-139"><div class="rc-CML rc-Option__input-text" dir="auto"><div class="css-1k5v0wb" data-testid="cml-viewer">  
</div></div></div></div></div></div></div></div></div></div>No

<div id="bkmrk--80"><div class="css-1k6gshx"><div><div class="css-5x16xy" data-test="HonorCodeAgreement">  
</div></div></div></div><div id="bkmrk--81"><div class="css-5x16xy" data-test="HonorCodeAgreement"><div class="css-1u4swui"><div data-test="agreement-text"><div class="css-kd6l09">  
</div></div></div></div></div><div class="css-d8g9f1" id="bkmrk--82">  
</div><div class="rc-ItemFeedbackContent horizontal-box css-lfchfm" id="bkmrk--83"><div class="css-e40v4" data-testid="like-button"><div class="rc-LikeContent"><div>  
</div></div></div></div><div class="css-e40v4" data-testid="dislike-button" id="bkmrk--84"><div class="rc-LikeContent"><div>  
</div></div></div><div class="rc-FlagContent css-8dn4zy" id="bkmrk--85"></div>

# Core commands for navigation and reading files

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-welcome-back.-i-hope"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Welcome back. I hope you're learning" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Welcome back. I hope you're learning </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a lot about how to communicate with the Linux OS. </span></div><div aria-label="toggle video from As we continue our journey into" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As we continue our journey into </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">utilizing the Linux command line, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll focus on how to navigate the Linux file system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now%2C-i-want-you-to-i"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now, I want you to imagine a tree." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, I want you to imagine a tree. </span></div><div aria-label="toggle video from What did you notice first about the tree?" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">What did you notice first about the tree? </span></div><div aria-label="toggle video from Would you say the trunk or the branches?" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Would you say the trunk or the branches? </span></div><div aria-label="toggle video from These might definitely get your attention," class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">These might definitely get your attention, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but what about its roots? </span></div><div aria-label="toggle video from Everything about a tree starts in the roots." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Everything about a tree starts in the roots. </span></div><div aria-label="toggle video from Everything about a tree starts in the roots." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Something similar happens when we </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">think about the Linux file system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-previously%2C-we-learn"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Previously, we learned about" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Previously, we learned about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the components of the Linux architecture. </span></div><div aria-label="toggle video from The Filesystem Hierarchy Standard," class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The Filesystem Hierarchy Standard, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">or FHS, is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the component of the Linux OS that organizes data. </span></div><div aria-label="toggle video from This file system is" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This file system is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a very important part of Linux because </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">everything we do in Linux is considered </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a file somewhere in the system's directory. </span></div><div aria-label="toggle video from The FHS is a hierarchical system," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The FHS is a hierarchical system, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and just like with a tree, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">everything grows and branches out from the root. </span></div><div aria-label="toggle video from The root directory is" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The root directory is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the highest-level directory in Linux. </span></div><div aria-label="toggle video from It's designated by a single slash." class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It's designated by a single slash. </span></div><div aria-label="toggle video from It's designated by a single slash." class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Subdirectories branch off from the root directory. </span></div><div aria-label="toggle video from The subdirectories branch out" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The subdirectories branch out </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">further and further away from the root directory. </span></div><div aria-label="toggle video from When describing the directory structure in Linux, slashes" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When describing the directory structure in Linux, slashes </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">are used when tracing </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">back through these branches to the root. </span></div><div aria-label="toggle video from For example, here," class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, here, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the first slash indicates the root directory. </span></div><div aria-label="toggle video from Then it branches out a level into the home subdirectory." class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then it branches out a level into the home subdirectory. </span></div><div aria-label="toggle video from Another slash indicates it is branching out again." class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Another slash indicates it is branching out again. </span></div><div aria-label="toggle video from This time it's to" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This time it's to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the analyst subdirectory that is located within home. </span></div><div aria-label="toggle video from When working in security," class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When working in security, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it is essential that you learn to navigate </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a file system to locate and analyze logs, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">such as log files. </span></div><div aria-label="toggle video from You'll analyze these log files for" class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You'll analyze these log files for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">application usage and authentication. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-with-that-background"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from With that background, we're now ready to learn" class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">With that background, we're now ready to learn </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the commands commonly used </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">for navigating the file system. </span></div><div aria-label="toggle video from First, pwd prints the working directory onto the screen." class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, pwd prints the working directory onto the screen. </span></div><div aria-label="toggle video from When you use this command," class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When you use this command, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the output tells you which directory you're currently in. </span></div><div aria-label="toggle video from When you use this command," class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next, ls displays the names of files and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">directories in the current working directory. And finally, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">cd navigates between directories. </span></div><div aria-label="toggle video from This is the command you'll use" class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is the command you'll use </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">when you want to change directories. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-use-these-comm"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's use these commands in Bash." class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's use these commands in Bash. </span></div><div aria-label="toggle video from First, we'll type the command" class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we'll type the command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">pwd to display the current location and then press enter. </span></div><div aria-label="toggle video from The output is the path to" class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The output is the path to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the analyst directory where we're currently working. </span></div><div aria-label="toggle video from Next, let's input ls to display" class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next, let's input ls to display </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the files and directories within the analyst directory. </span></div><div aria-label="toggle video from The output is the name of" class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The output is the name of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">four directories: logs, oldreports, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">projects, and reports, and one file named updates.txt. </span></div><div aria-label="toggle video from So let's say we now want to go into" class="rc-Phrase css-ugczj4" data-cue="68" data-cue-index="67" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So let's say we now want to go into </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the logs directory to check for unauthorized access. </span></div><div aria-label="toggle video from We'll input: cd logs" class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll input: cd logs </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to change directories. </span></div><div aria-label="toggle video from We won't get any output" class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We won't get any output </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">on the screen from the cd command, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but if we enter pwd again, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">its output indicates that the working directory is logs. </span></div><div aria-label="toggle video from Logs is a subdirectory of the analyst directory." class="rc-Phrase css-ugczj4" data-cue="76" data-cue-index="75" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Logs is a subdirectory of the analyst directory. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-as-a-security-analys"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="77" data-cue-index="76" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As a security analyst, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you'll also need to know how to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">read file content in Linux. </span></div><div aria-label="toggle video from For example, you may need to read" class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, you may need to read </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">files that contain configuration settings to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">identify potential vulnerabilities. </span></div><div aria-label="toggle video from For example, you may need to read" class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Or, you might look </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">at user access reports </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">while investigating unauthorized access. </span></div><div aria-label="toggle video from When reading file content," class="rc-Phrase css-ugczj4" data-cue="85" data-cue-index="84" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When reading file content, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there are some commands that will help you. </span></div><div aria-label="toggle video from First, cat displays the content of a file." class="rc-Phrase css-ugczj4" data-cue="87" data-cue-index="86" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, cat displays the content of a file. </span></div><div aria-label="toggle video from First, cat displays the content of a file." class="rc-Phrase css-ugczj4" data-cue="87" data-cue-index="86" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is useful, but sometimes you </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">won't want the full contents of a large file. </span></div><div aria-label="toggle video from In these cases, you can use the head command." class="rc-Phrase css-ugczj4" data-cue="90" data-cue-index="89" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In these cases, you can use the head command. </span></div><div aria-label="toggle video from In these cases, you can use the head command." class="rc-Phrase css-ugczj4" data-cue="90" data-cue-index="89" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It displays just the beginning of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a file, by default ten lines. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-try-out-these-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's try out these commands." class="rc-Phrase css-ugczj4" data-cue="93" data-cue-index="92" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's try out these commands. </span></div><div aria-label="toggle video from Imagine that we want to read the contents of" class="rc-Phrase css-ugczj4" data-cue="94" data-cue-index="93" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Imagine that we want to read the contents of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access.txt, and we're </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">already in the working directory where it's located. </span></div><div aria-label="toggle video from First, we input the cat command" class="rc-Phrase css-ugczj4" data-cue="97" data-cue-index="96" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we input the cat command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and then follow it with the name of the file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access.txt.</span></div><div aria-label="toggle video from First, we input the cat command" class="rc-Phrase css-ugczj4" data-cue="97" data-cue-index="96" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139"> And </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Bash returns the full contents of this file. </span></div><div aria-label="toggle video from Let's compare that to the head command." class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's compare that to the head command. </span></div><div aria-label="toggle video from Let's compare that to the head command." class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we input the head command followed by our file name, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">only the first 10 lines of this file are displayed. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-wow%2C-this-section-ha"><div aria-label="toggle video from Wow, this section had lots" class="rc-Phrase css-ugczj4" data-cue="104" data-cue-index="103" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Wow, this section had lots </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of action, and it's just the beginning! </span></div><div aria-label="toggle video from I'm glad you learned how security analysts can use" class="rc-Phrase css-ugczj4" data-cue="106" data-cue-index="105" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I'm glad you learned how security analysts can use </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">essential commands to navigate the system. </span></div><div aria-label="toggle video from Next, we'll explore how to manage the system." class="rc-Phrase css-ugczj4" data-cue="108" data-cue-index="107" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next, we'll explore how to manage the system. </span></div></div>

# Navigate Linux and read file content

In this reading, you’ll review how to navigate the file system using Linux commands in Bash. You’ll further explore the organization of the Linux Filesystem Hierarchy Standard, review several common Linux commands for navigation and reading file content, and learn a couple of new commands.

## Filesystem Hierarchy Standard (FHS)

Previously, you learned that the **Filesystem Hierarchy Standard** **(FHS)** is the component of Linux that organizes data. The FHS is important because it defines how directories, directory contents, and other storage is organized in the operating system.

This diagram illustrates the hierarchy of relationships under the FHS:

<div class="rc-CML" dir="auto" id="bkmrk-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Flowchart starts with the root directory at the top and branches down into multiple subdirectories.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/j0RYvFG7TpGNNfni5SSa0Q_012d7d577b564b4fa3ead21d3f69ebf1_Dvcfull14z4M8iWFX3SE6wnrTefQLql8gas9ICAiKpixcG31SsHLbQmACjE1B4qfpEwTcHfkiD1hxEVGhjyYngw0-fXASC-TSuTgXTBpz_qS4pmXtp-Y7i7giD3GJKCkvajg0PzNebmAf6wDKOBNL-SrMDhBJhsE4yH5Es2_bKRVPC0goRafLVPJs81beg?expiry=1688688000000&hmac=wJrU0NP40u2Z7UeZDqrJNIT6IBHtLTixNycjNUzUfJA)</figure></div></div></div></div></div></div>Under the FHS, a file’s location can be described by a file path. A **file path** is the location of a file or directory. In the file path, the different levels of the hierarchy are separated by a forward slash (<var>/</var>).

### **Root directory**

The **root directory** is the highest-level directory in Linux, and it’s always represented with a forward slash (<var>/</var>). All subdirectories branch off the root directory. Subdirectories can continue branching out to as many levels as necessary.

### Standard FHS directories

Directly below the root directory, you’ll find standard FHS directories. In the diagram, <var>home</var>, <var>bin</var>, and <var>etc</var> are standard FHS directories. Here are a few examples of what standard directories contain:

<div class="rc-CML" dir="auto" id="bkmrk-%2Fhome%3A-each-user-in-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>/home</var>: Each user in the system gets their own home directory.
- <var>/bin</var>: This directory stands for “binary” and contains binary files and other executables. Executables are files that contain a series of commands a computer needs to follow to run programs and perform other functions.
- <var>/etc</var>: This directory stores the system’s configuration files.
- <var>/tmp</var>: This directory stores many temporary files. The <var>/tmp</var> directory is commonly used by attackers because anyone in the system can modify data in these files.
- <var>/mnt</var>: This directory stands for “mount” and stores media, such as USB drives and hard drives.

</div></div></div></div></div>**Pro Tip**: You can use the <var>man hier</var> command to learn more about the FHS and its standard directories.

### **User-specific subdirectories**

Under <var>home</var> are subdirectories for specific users. In the diagram, these users are <var>analyst</var> and <var>analyst2</var>. Each user has their own personal subdirectories, such as <var>projects</var>, <var>logs</var>, or <var>reports</var>.

**Note:** When the path leads to a subdirectory below the user’s home directory, the user’s home directory can be represented as the tilde (<var>~</var>). For example, <var>/home/analyst/logs</var> can also be represented as <var>~/logs</var>.

You can navigate to specific subdirectories using their absolute or relative file paths. The **absolute file path** is the full file path, which starts from the root. For example, <var>/home/analyst/projects</var> is an absolute file path. The **relative file path** is the file path that starts from a user's current directory.

**Note:** Relative file paths can use a dot (<var>.</var>) to represent the current directory, or two dots (<var>..</var>) to represent the parent of the current directory. An example of a relative file path could be <var>../projects</var>.

## Key commands for navigating the file system

The following Linux commands can be used to navigate the file system: <var>pwd</var>, <var>ls</var>, and <var>cd</var>.

### **pwd**

The <var>pwd</var> command prints the working directory to the screen. Or in other words, it returns the directory that you’re currently in.

The output gives you the absolute path to this directory. For example, if you’re in your <var>home</var> directory and your username is <var>analyst</var>, entering <var>pwd</var> returns <var>/home/analyst</var>.

**Pro Tip**: To learn what your username is, use the <var>whoami</var> command. The <var>whoami</var> command returns the username of the current user. For example, if your username is <var>analyst</var>, entering <var>whoami</var> returns <var>analyst</var>.

### **ls**

The <var>ls</var> command displays the names of the files and directories in the current working directory. For example, in the video, <var>ls</var> returned directories such as <var>logs</var>, and a file called <var>updates.txt</var>.

**Note**: If you want to return the contents of a directory that’s not your current working directory, you can add an argument after <var>ls</var> with the absolute or relative file path to the desired directory. For example, if you’re in the <var>/home/analyst</var> directory but want to list the contents of its <var>projects</var> subdirectory, you can enter <var>ls /home/analyst/projects</var> or just <var>ls projects</var>.

### **cd**

The <var>cd</var> command navigates between directories. When you need to change directories, you should use this command.

To navigate to a subdirectory of the current directory, you can add an argument after <var>cd</var> with the subdirectory name. For example, if you’re in the <var>/home/analyst</var> directory and want to navigate to its <var>projects</var> subdirectory, you can enter <var>cd projects</var>.

You can also navigate to any specific directory by entering the absolute file path. For example, if you’re in <var>/home/analyst/projects</var>, entering <var>cd /home/analyst/logs</var> changes your current directory to <var>/home/analyst/logs</var>.

**Pro Tip**: You can use the relative file path and enter <var>cd ..</var> to go up one level in the file structure. For example, if the current directory is <var>/home/analyst/projects</var>, entering <var>cd ..</var> would change your working directory to <var>/home/analyst</var>.

## Common commands for reading file content

The following Linux commands are useful for reading file content: <var>cat</var>, <var>head</var>, <var>tail</var>, and <var>less</var>.

### **cat**

The <var>cat</var> command displays the content of a file. For example, entering <var>cat updates.txt</var> returns everything in the <var>updates.txt</var> file.

h.l.

The `cat` command in Linux is short for "concatenate", which means to link things together in a series or chain. The `cat` command is one of the most commonly used commands in Unix-like operating systems like Linux. It reads data from files and outputs their contents. It can also concatenate and display the contents of more than one file.

### **head**

The <var>head</var> command displays just the beginning of a file, by default 10 lines. The <var>head</var> command can be useful when you want to know the basic contents of a file but don’t need the full contents. Entering <var>head updates.txt</var> returns only the first 10 lines of the <var>updates.txt</var> file.

**Pro Tip**: If you want to change the number of lines returned by <var>head</var>, you can specify the number of lines by including <var>-n</var>. For example, if you only want to display the first five lines of the <var>updates.txt</var> file, enter <var>head -n 5 updates.txt</var>.

### **tail**

The <var>tail</var> command does the opposite of <var>head</var>. This command can be used to display just the end of a file, by default 10 lines. Entering <var>tail updates.txt</var> returns only the last 10 lines of the <var>updates.txt</var> file.

**Pro Tip**: You can use <var>tail</var> to read the most recent information in a log file.

### **less**

The <var>less</var> command returns the content of a file one page at a time. For example, entering <var>less updates.txt</var> changes the terminal window to display the contents of <var>updates.txt</var> one page at a time. This allows you to easily move forward and backward through the content.

Once you’ve accessed your content with the <var>less</var> command, you can use several keyboard controls to move through the file:

<div class="rc-CML" dir="auto" id="bkmrk-space-bar%3A-move-forw"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>Space bar</var>: Move forward one page
- <var>b</var>: Move back one page
- <var>Down arrow</var>: Move forward one line
- <var>Up arrow</var>: Move back one line
- <var>q</var>: Quit and return to the previous terminal window

</div></div></div></div></div>note to future NaruZkurai, this control scheme is ascinine, i will be ripping this command then creating one called  
nzkread

## Key takeaways

It’s important for security analysts to be able to navigate Linux and the file system of the FHS. Some key commands for navigating the file system include <var>pwd</var>, <var>ls</var>, and <var>cd</var>. Reading file content is also an important skill in the security profession. This can be done with commands such as <var>cat</var>, <var>head</var>, <var>tail</var>, and <var>less</var>.

# Find what you need with Linux

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now-that-we-covered%3A"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now that we covered: pwd, ls," class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now that we covered: pwd, ls, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and cd and are familiar with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">these basic commands for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">navigating the Linux file system, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's look at a couple of ways to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">find what you need within this system. </span></div><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As a security analyst, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">your work will likely involve </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">filtering for the information you need. </span></div><div aria-label="toggle video from Filtering means searching your system for" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Filtering means searching your system for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">specific information that can </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">help you solve complex problems. </span></div><div aria-label="toggle video from For example, imagine that your team" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, imagine that your team </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">determines a piece of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">malware contains a string of characters. </span></div><div aria-label="toggle video from You might be tasked with finding other files with" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You might be tasked with finding other files with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the same string to determine if </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">those files contain the same malware. </span></div><div aria-label="toggle video from Later, we'll learn more about how" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Later, we'll learn more about how </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you can use SQL to filter a database, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but Linux is a good place to start basic filtering. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-first%2C-we%27ll-start-w"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from First, we'll start with grep." class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we'll start with grep. </span></div><div aria-label="toggle video from First, we'll start with grep." class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The grep command searches a specified file and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">returns all lines in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the file containing a specified string. </span></div><div aria-label="toggle video from First, we'll start with grep." class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Here's an example of this. </span></div><div aria-label="toggle video from Let's say we have a file called updates.txt," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's say we have a file called updates.txt, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and we're currently looking for lines that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">contain the word: OS. </span></div><div aria-label="toggle video from If the file is large," class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If the file is large, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it would take a long time to visually scan for this. </span></div><div aria-label="toggle video from Instead, after navigating to" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Instead, after navigating to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the directory that contains updates.txt, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll type the command: </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">grep OS updates.txt into the shell. </span></div><div aria-label="toggle video from Notice how the grep command is followed by two arguments." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Notice how the grep command is followed by two arguments. </span></div><div aria-label="toggle video from Notice how the grep command is followed by two arguments." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first argument is the string we're searching for; </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in this case, OS. </span></div><div aria-label="toggle video from The second argument is the name of the file" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The second argument is the name of the file </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we're searching through, updates.txt. </span></div><div aria-label="toggle video from When we press enter," class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we press enter, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Bash returns all lines containing the word OS. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now-let%27s-talk-about"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now let's talk about piping." class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now let's talk about piping. </span></div><div aria-label="toggle video from Piping is a Linux command that" class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Piping is a Linux command that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">can be used for a variety of purposes. </span></div><div aria-label="toggle video from In a moment, we'll focus on" class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In a moment, we'll focus on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">how it can be used for filtering. </span></div><div aria-label="toggle video from But first, let's talk about the general idea of piping." class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But first, let's talk about the general idea of piping. </span></div><div aria-label="toggle video from The piping command sends a standard output of" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The piping command sends a standard output of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">one command as standard input </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">into another command for further processing. </span></div><div aria-label="toggle video from It's represented by the vertical bar character." class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It's represented by the vertical bar character. </span></div><div aria-label="toggle video from It's represented by the vertical bar character." class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In our context, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we can refer to this as the pipe character. </span></div><div aria-label="toggle video from Take a moment and imagine a physical pipe." class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Take a moment and imagine a physical pipe. </span></div><div aria-label="toggle video from Physical pipes have two ends." class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Physical pipes have two ends. </span></div><div aria-label="toggle video from On one end, for example," class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">On one end, for example, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">water might enter the pipe from a hot water tank. </span></div><div aria-label="toggle video from Then, it travels through the pipe and" class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then, it travels through the pipe and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">comes out on the other end in a sink. </span></div><div aria-label="toggle video from Similarly, in Linux," class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Similarly, in Linux, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">piping also involves redirection. </span></div><div aria-label="toggle video from Output from one command is sent through" class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Output from one command is sent through </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the pipe and then is used on the other side of the pipe. </span></div><div aria-label="toggle video from Earlier in this video," class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Earlier in this video, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I explained how grep can be used to filter for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">strings of characters within a file. </span></div><div aria-label="toggle video from Grep can also be incorporated after a pipe." class="rc-Phrase css-ugczj4" data-cue="68" data-cue-index="67" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Grep can also be incorporated after a pipe. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-focus-on-this-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's focus on this example." class="rc-Phrase css-ugczj4" data-cue="69" data-cue-index="68" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's focus on this example. </span></div><div aria-label="toggle video from The first command, ls," class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first command, ls, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">instructs the operating system to output the file </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and directory contents of their reports subdirectory. </span></div><div aria-label="toggle video from But because the command is followed by the pipe," class="rc-Phrase css-ugczj4" data-cue="73" data-cue-index="72" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But because the command is followed by the pipe, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the output isn't returned to the screen. </span></div><div aria-label="toggle video from Instead, it's sent to the next command." class="rc-Phrase css-ugczj4" data-cue="75" data-cue-index="74" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Instead, it's sent to the next command. </span></div><div aria-label="toggle video from As we just learned," class="rc-Phrase css-ugczj4" data-cue="76" data-cue-index="75" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As we just learned, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">grep searches for a specified string of characters; </span></div><div aria-label="toggle video from in this case, it's users." class="rc-Phrase css-ugczj4" data-cue="78" data-cue-index="77" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in this case, it's users. </span></div><div aria-label="toggle video from But where is it searching?" class="rc-Phrase css-ugczj4" data-cue="79" data-cue-index="78" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But where is it searching? </span></div><div aria-label="toggle video from Since grep follows a pipe," class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since grep follows a pipe, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the output of the previous command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicates where to search. </span></div><div aria-label="toggle video from In this case, that output is a list of" class="rc-Phrase css-ugczj4" data-cue="83" data-cue-index="82" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this case, that output is a list of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">files and directories within the reports subdirectory. </span></div><div aria-label="toggle video from It will return all files and" class="rc-Phrase css-ugczj4" data-cue="85" data-cue-index="84" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It will return all files and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">directories that contain the word: users. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-explore-this-i"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's explore this in Bash." class="rc-Phrase css-ugczj4" data-cue="87" data-cue-index="86" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's explore this in Bash. </span></div><div aria-label="toggle video from So we can better understand how the filter works," class="rc-Phrase css-ugczj4" data-cue="88" data-cue-index="87" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So we can better understand how the filter works, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's first output everything in the reports directory. </span></div><div aria-label="toggle video from If we were already in the directory," class="rc-Phrase css-ugczj4" data-cue="90" data-cue-index="89" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we were already in the directory, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we would just need to input ls. </span></div><div aria-label="toggle video from But since we're not, we'll also" class="rc-Phrase css-ugczj4" data-cue="92" data-cue-index="91" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But since we're not, we'll also </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">specify the path to this directory. </span></div><div aria-label="toggle video from When we press enter," class="rc-Phrase css-ugczj4" data-cue="94" data-cue-index="93" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we press enter, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the output indicates there are </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">seven files in the reports directory. </span></div><div aria-label="toggle video from Because we want to return" class="rc-Phrase css-ugczj4" data-cue="97" data-cue-index="96" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Because we want to return </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">only the files that contain the word users, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll combine this ls command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">with piping and the grep command. </span></div><div aria-label="toggle video from As the output demonstrates," class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As the output demonstrates, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Linux has been instructed to return </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">only files that contain the word users. </span></div><div aria-label="toggle video from only files that contain the word users." class="rc-Phrase css-ugczj4" data-cue="103" data-cue-index="102" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The two files that don't contain </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this string no longer appear. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-so-now-you-have-two-"><div aria-label="toggle video from So now you have two different ways that you can" class="rc-Phrase css-ugczj4" data-cue="106" data-cue-index="105" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So now you have two different ways that you can </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">filter in Linux while working as an analyst. </span></div><div aria-label="toggle video from Navigating through files and" class="rc-Phrase css-ugczj4" data-cue="108" data-cue-index="107" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Navigating through files and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">filtering are just part of what you need to know. </span></div><div aria-label="toggle video from Let's keep exploring the Linux command line." class="rc-Phrase css-ugczj4" data-cue="110" data-cue-index="109" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's keep exploring the Linux command line. </span></div></div>

# Filter content in Linux

In this reading, you’ll continue exploring Linux commands, which can help you filter for the information you need. You’ll learn a new Linux command, <var>find</var>, which can help you search files and directories for specific information.

## Filtering for information

You previously explored how filtering for information is an important skill for security analysts. **Filtering** is selecting data that match a certain condition. For example, if you had a virus in your system that only affected the <var>.txt</var> files, you could use filtering to find these files quickly. Filtering allows you to search based on specific criteria, such as file extension or a string of text.

## grep

The <var>grep</var> command searches a specified file and returns all lines in the file containing a specified string. The <var>grep</var> command commonly takes two arguments: a specific string to search for and a specific file to search through.

For example, entering <var>grep OS updates.txt</var> returns all lines containing <var>OS</var> in the <var>updates.txt</var> file. In this example, <var>OS</var> is the specific string to search for, and <var>updates.txt</var> is the specific file to search through.

## Piping

The pipe command is accessed using the pipe character (<var>|</var>). **Piping** sends the standard output of one command as standard input to another command for further processing. As a reminder, **standard output** is information returned by the OS through the shell, and **standard input** is information received by the OS via the command line.

The pipe character (<var>|</var>) is located in various places on a keyboard. On many keyboards, it’s located on the same key as the backslash character (<var>\\</var>). On some keyboards, the <var>|</var> can look different and have a small space through the middle of the line. If you can’t find the <var>|</var>, search online for its location on your particular keyboard.

When used with <var>grep</var>, the pipe can help you find directories and files containing a specific word in their names. For example, <var>ls /home/analyst/reports | grep users</var> returns the file and directory names in the <var>reports</var> directory that contain <var>users</var>. Before the pipe, <var>ls</var> indicates to list the names of the files and directories in <var>reports</var>. Then, it sends this output to the command after the pipe. In this case, <var>grep users</var> returns all of the file or directory names containing <var>users</var> from the input it received.

**Note:** Piping is a general form of redirection in Linux and can be used for multiple tasks other than filtering. You can think of piping as a general tool that you can use whenever you want the output of one command to become the input of another command.

## find

The <var>find</var> command searches for directories and files that meet specified criteria. There’s a wide range of criteria that can be specified with <var>find</var>. For example, you can search for files and directories that

<div class="rc-CML" dir="auto" id="bkmrk-contain-a-specific-s"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- Contain a specific string in the name,
- Are a certain file size, or
- Were last modified within a certain time frame.

</div></div></div></div></div>When using <var>find</var>, the first argument after <var>find</var> indicates where to start searching. For example, entering <var>find /home/analyst/projects</var> searches for everything starting at the <var>projects</var> directory.

After this first argument, you need to indicate your criteria for the search. If you don’t include a specific search criteria with your second argument, your search will likely return a lot of directories and files.

Specifying criteria involves options. **Options** modify the behavior of a command and commonly begin with a hyphen (<var>-</var>).

### **-name and -iname**

One key criteria analysts might use with <var>find</var> is to find file or directory names that contain a specific string. The specific string you’re searching for must be entered in quotes after the <var>-name</var> or <var>-iname</var> options. The difference between these two options is that <var>-name</var> is case-sensitive, and <var>-iname</var> is not.

For example, you might want to find all files in the <var>projects</var> directory that contain the word “log” in the file name. To do this, you’d enter <var>find /home/analyst/projects -name "\*log\*"</var>. You could also enter <var>find /home/analyst/projects -iname "\*log\*"</var>.

In these examples, the output would be all files in the <var>projects</var> directory that contain <var>log</var> surrounded by zero or more characters. The <var>"\*log\*"</var> portion of the command is the search criteria that indicates to search for the string “log”. When <var>-name</var> is the option, files with names that include <var>Log</var> or <var>LOG</var>, for example, wouldn’t be returned because this option is case-sensitive. However, they would be returned when <var>-iname</var> is the option.

**Note**: An asterisk (<var>\*</var>) is used as a wildcard to represent zero or more unknown characters.

### **-mtime**

Security analysts might also use <var>find</var> to find files or directories last modified within a certain time frame. The <var>-mtime</var> option can be used for this search. For example, entering <var>find /home/analyst/projects -mtime -3</var> returns all files and directories in the <var>projects</var> directory that have been modified within the past three days.

The <var>-mtime</var> option search is based on days, so entering <var>-mtime +1</var> indicates all files or directories last modified more than one day ago, and entering <var>-mtime -1</var> indicates all files or directories last modified less than one day ago.

**Note:** The option <var>-mmin</var> can be used instead of <var>-mtime</var> if you want to base the search on minutes rather than days.

## Key takeaways

Filtering for information using Linux commands is an important skill for security analysts so that they can customize data to fit their needs. Three key Linux commands for this are <var>grep</var>, piping (<var>|</var>), and <var>find</var>. These commands can be used to navigate and filter for information in the file system.

# Create and modify directories and files

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-make-some-bran"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's make some branches!" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's make some branches! </span></div><div aria-label="toggle video from What do I mean by that?" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">What do I mean by that? </span></div><div aria-label="toggle video from Well, in a previous video," class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Well, in a previous video, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we discussed root directories and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">how other subdirectories branch </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">off of the root directory. </span></div><div aria-label="toggle video from Let's think again about" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's think again about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the file directory system as a tree. </span></div><div aria-label="toggle video from The subdirectories are the branches of the tree." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The subdirectories are the branches of the tree. </span></div><div aria-label="toggle video from They're all connected from the same root" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">They're all connected from the same root </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but can grow to make a complex tree. </span></div><div aria-label="toggle video from In this video, we'll create" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this video, we'll create </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">directories and files and learn how to modify them. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-when-it-comes-to-wor"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from When it comes to working with data in" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When it comes to working with data in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">security, organization is key. </span></div><div aria-label="toggle video from If we know where information is located," class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we know where information is located, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it makes it easier to detect </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">issues and keep information safe. </span></div><div aria-label="toggle video from In a previous video," class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In a previous video, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we've already discussed navigating between directories, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but let's take a moment to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">examine directories more closely. </span></div><div aria-label="toggle video from It's possible you're familiar with the concept" class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It's possible you're familiar with the concept </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of folders for organizing information. </span></div><div aria-label="toggle video from It's possible you're familiar with the concept" class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In Linux, we have directories. </span></div><div aria-label="toggle video from Directories help organize files and subdirectories." class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Directories help organize files and subdirectories. </span></div><div aria-label="toggle video from For example, within a directory for reports," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, within a directory for reports</span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">an analyst may need to create two subdirectories: </span></div><div aria-label="toggle video from For example, within a directory for reports," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">one for drafts and one for final reports. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now-that-we-know-why"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now that we know why we need directories," class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now that we know why we need directories, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">et's take a look at </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">some essential Linux commands for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">managing directories and files. </span></div><div aria-label="toggle video from First, let's take note of" class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, let's take note of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">commands for creating and removing directories. </span></div><div aria-label="toggle video from The mkdir command creates a new directory." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The mkdir command creates a new directory. </span></div><div aria-label="toggle video from The mkdir command creates a new directory." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In contrast, rmdir removes or deletes a directory. </span></div><div aria-label="toggle video from A helpful feature of this command is" class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A helpful feature of this command is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">its built-in warning that lets you </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">know a directory is not empty. </span></div><div aria-label="toggle video from This saves you from accidentally deleting files." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This saves you from accidentally deleting files. </span></div><div aria-label="toggle video from This saves you from accidentally deleting files." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next, you'll use </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">other commands for creating and removing files. </span></div><div aria-label="toggle video from The touch command creates a new file," class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The touch command creates a new file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and then the rm command removes or deletes a file. </span></div><div aria-label="toggle video from And last, we have our commands for copying" class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And last, we have our commands for copying </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and moving files or directories. </span></div><div aria-label="toggle video from The mv command moves a file or directory to new location," class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The mv command moves a file or directory to new location, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and cp copies a file or directory into a new location. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now%2C-we%27re-ready-to-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now, we're ready to try out these commands." class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, we're ready to try out these commands. </span></div><div aria-label="toggle video from First, let's use the pwd command," class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, let's use the pwd command, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and then let's display the names of the files and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">directories in the analyst directory with the ls command. </span></div><div aria-label="toggle video from Imagine that we no longer need" class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Imagine that we no longer need </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the oldreports directory that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">appears among the file contents. </span></div><div aria-label="toggle video from Let's take a look at how to remove it." class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's take a look at how to remove it. </span></div><div aria-label="toggle video from We input the rmdir command and follow it with" class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We input the rmdir command and follow it with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the name of the directory we want to remove: oldreports. </span></div><div aria-label="toggle video from We can use the ls command to confirm that" class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We can use the ls command to confirm that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">oldreports has been deleted </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and no longer appears among the contents. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now%2C-let%27s-make-anot"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now, let's make another change." class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, let's make another change. </span></div><div aria-label="toggle video from We want a new directory for drafts of reports." class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We want a new directory for drafts of reports. </span></div><div aria-label="toggle video from We need to use the command: mkdir" class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We need to use the command: mkdir </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and specify a name for this directory: drafts. </span></div><div aria-label="toggle video from If we input ls again," class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we input ls again, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll notice the new directory drafts </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">included among the contents of the analyst directory. </span></div><div aria-label="toggle video from Let's change into this new directory" class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's change into this new directory </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">by entering: cd drafts. </span></div><div aria-label="toggle video from If we run ls," class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we run ls, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it doesn't return any output, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicating that this directory is currently empty. </span></div><div aria-label="toggle video from But next, we'll add some files to it." class="rc-Phrase css-ugczj4" data-cue="75" data-cue-index="74" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But next, we'll add some files to it. </span></div><div aria-label="toggle video from Let's say we want to draft new reports on" class="rc-Phrase css-ugczj4" data-cue="76" data-cue-index="75" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's say we want to draft new reports on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">recently installed email and OS patches. </span></div><div aria-label="toggle video from To create these files," class="rc-Phrase css-ugczj4" data-cue="78" data-cue-index="77" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To create these files, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we input: touch email\_patches.txt </span></div><div aria-label="toggle video from and then: touch OS_patches.txt." class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and then: touch OS\_patches.txt. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-running-ls-indicates"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Running ls indicates that" class="rc-Phrase css-ugczj4" data-cue="81" data-cue-index="80" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Running ls indicates that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">these files are now in the drafts directory. </span></div><div aria-label="toggle video from What if we realize that we only need a new report on" class="rc-Phrase css-ugczj4" data-cue="83" data-cue-index="82" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">What if we realize that we only need a new report on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">OS patches and we want </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to delete the email patches report? </span></div><div aria-label="toggle video from To do this, we input the rm command and specify the file" class="rc-Phrase css-ugczj4" data-cue="86" data-cue-index="85" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To do this, we input the rm command and specify the file </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to delete as: email\_patches.txt. </span></div><div aria-label="toggle video from Running ls confirms that it's been deleted." class="rc-Phrase css-ugczj4" data-cue="88" data-cue-index="87" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Running ls confirms that it's been deleted. </span></div><div aria-label="toggle video from Running ls confirms that it's been deleted." class="rc-Phrase css-ugczj4" data-cue="88" data-cue-index="87" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, let's focus on our commands for moving and copying. </span></div><div aria-label="toggle video from We realized that we have a file called email" class="rc-Phrase css-ugczj4" data-cue="90" data-cue-index="89" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We realized that we have a file called email </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">policy in the reports folder </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that is currently in draft format. </span></div><div aria-label="toggle video from We want to move it into the newly created drafts folder." class="rc-Phrase css-ugczj4" data-cue="93" data-cue-index="92" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We want to move it into the newly created drafts folder. </span></div><div aria-label="toggle video from We want to move it into the newly created drafts folder." class="rc-Phrase css-ugczj4" data-cue="93" data-cue-index="92" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To do this, we need to change </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">into the directory that currently has that file. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-running-ls-in-that-d"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Running ls in that directory indicates that it contains" class="rc-Phrase css-ugczj4" data-cue="96" data-cue-index="95" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Running ls in that directory indicates that it contains </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">several files, including email\_policy.txt. </span></div><div aria-label="toggle video from Then to move that file," class="rc-Phrase css-ugczj4" data-cue="98" data-cue-index="97" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then to move that file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll enter the mv command followed by two arguments. </span></div><div aria-label="toggle video from The first argument" class="rc-Phrase css-ugczj4" data-cue="100" data-cue-index="99" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first argument </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">after mv identifies the file to be moved. </span></div><div aria-label="toggle video from The second argument indicates where to move it." class="rc-Phrase css-ugczj4" data-cue="102" data-cue-index="101" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The second argument indicates where to move it. </span></div><div aria-label="toggle video from If we change directories into" class="rc-Phrase css-ugczj4" data-cue="103" data-cue-index="102" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we change directories into </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">drafts and then display its contents, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll notice that the email policy file </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">has been moved to this directory. </span></div><div aria-label="toggle video from We'll change back into reports." class="rc-Phrase css-ugczj4" data-cue="107" data-cue-index="106" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll change back into reports. </span></div><div aria-label="toggle video from Displaying the file contents confirms that" class="rc-Phrase css-ugczj4" data-cue="108" data-cue-index="107" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Displaying the file contents confirms that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">email\_policy is no longer there. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-okay%2C-one-more-thing"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Okay, one more thing. vulnerabilities.txt is" class="rc-Phrase css-ugczj4" data-cue="110" data-cue-index="109" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Okay, one more thing. vulnerabilities.txt is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a file that we want to keep in the reports directory. </span></div><div aria-label="toggle video from But since it affects an upcoming project," class="rc-Phrase css-ugczj4" data-cue="112" data-cue-index="111" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But since it affects an upcoming project, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we also want to copy it into the project's directory. </span></div><div aria-label="toggle video from Since we're already in the directory that has this file," class="rc-Phrase css-ugczj4" data-cue="114" data-cue-index="113" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since we're already in the directory that has this file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll use the cp command to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">copy it into the projects directory. </span></div><div aria-label="toggle video from Notice that the first argument" class="rc-Phrase css-ugczj4" data-cue="117" data-cue-index="116" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Notice that the first argument </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicates which file to copy, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and the second argument provides </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the path to the directory that it will be copied into. </span></div><div aria-label="toggle video from Notice that the first argument" class="rc-Phrase css-ugczj4" data-cue="117" data-cue-index="116" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we press Enter, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this copies the vulnerabilities file into </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the projects directory while also </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">leaving the original within reports. </span></div><div aria-label="toggle video from Isn't it cool what we can do with these commands?" class="rc-Phrase css-ugczj4" data-cue="125" data-cue-index="124" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Isn't it cool what we can do with these commands? </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--7"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now%2C-let%27s-focus-on%C2%A0"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now, let's focus on" class="rc-Phrase css-ugczj4" data-cue="126" data-cue-index="125" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, let's focus on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">one more concept related to modifying files. </span></div><div aria-label="toggle video from In addition to using commands," class="rc-Phrase css-ugczj4" data-cue="128" data-cue-index="127" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In addition to using commands, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you can also use applications to help you edit files. </span></div><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="130" data-cue-index="129" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As a security analyst, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">file editors are often necessary for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">your daily tasks, like writing or editing reports. </span></div><div aria-label="toggle video from A popular file editor is nano." class="rc-Phrase css-ugczj4" data-cue="133" data-cue-index="132" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A popular file editor is nano. </span></div><div aria-label="toggle video from A popular file editor is nano." class="rc-Phrase css-ugczj4" data-cue="133" data-cue-index="132" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It's good for beginners. </span></div><div aria-label="toggle video from You can access this tool through the nano command." class="rc-Phrase css-ugczj4" data-cue="135" data-cue-index="134" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You can access this tool through the nano command. </span></div><div aria-label="toggle video from Let's get familiar with nano together." class="rc-Phrase css-ugczj4" data-cue="136" data-cue-index="135" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's get familiar with nano together. </span></div><div aria-label="toggle video from We'll add a title to" class="rc-Phrase css-ugczj4" data-cue="137" data-cue-index="136" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll add a title to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">our new draft report: OS\_patches.txt. </span></div><div aria-label="toggle video from First, we change into" class="rc-Phrase css-ugczj4" data-cue="139" data-cue-index="138" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we change into </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the directory containing that file, </span></div><div aria-label="toggle video from then we input nano" class="rc-Phrase css-ugczj4" data-cue="141" data-cue-index="140" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">then we input nano </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">followed by the name of the file we want </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to edit: OS\_patches.txt. </span></div><div aria-label="toggle video from This brings up the nano file editor with that file open." class="rc-Phrase css-ugczj4" data-cue="144" data-cue-index="143" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This brings up the nano file editor with that file open. </span></div><div aria-label="toggle video from For now, we'll just enter" class="rc-Phrase css-ugczj4" data-cue="145" data-cue-index="144" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For now, we'll just enter </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the title OS Patches by typing this into the editor. </span></div><div aria-label="toggle video from We need to save this before" class="rc-Phrase css-ugczj4" data-cue="147" data-cue-index="146" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We need to save this before </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">returning to the command line, and to do so, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we press Ctrl+O </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and then enter to save it with the current file name. </span></div><div aria-label="toggle video from We need to save this before" class="rc-Phrase css-ugczj4" data-cue="147" data-cue-index="146" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then to exit, we press Ctrl+X. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--8"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-great-work%21-we%27ve-co"><div aria-label="toggle video from Great work!" class="rc-Phrase css-ugczj4" data-cue="152" data-cue-index="151" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Great work! </span></div><div aria-label="toggle video from We've covered a lot of topics here—from" class="rc-Phrase css-ugczj4" data-cue="153" data-cue-index="152" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We've covered a lot of topics here—from </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">creating and removing directories and files </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to copying or moving them, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and just now, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we've added editing files. </span></div><div aria-label="toggle video from You're well on your way to learning Linux commands!" class="rc-Phrase css-ugczj4" data-cue="158" data-cue-index="157" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You're well on your way to learning Linux commands! </span></div></div>

# Manage directories and files

Previously, you explored how to manage the file system using Linux commands. The following commands were introduced: <var>mkdir</var>, <var>rmdir</var>, <var>touch</var>, <var>rm</var>, <var>mv</var>, and <var>cp</var>. In this reading, you’ll review these commands, the nano text editor, and learn another way to write to files.

## Creating and modifying directories

### **mkdir**

The <var>mkdir</var> command creates a new directory. Like all of the commands presented in this reading, you can either provide the new directory as the absolute file path, which starts from the root, or as a relative file path, which starts from your current directory.

For example, if you want to create a new directory called <var>network</var> in your <var>/home/analyst/logs</var> directory, you can enter <var>mkdir /home/analyst/logs/network</var> to create this new directory. If you’re already in the <var>/home/analyst/logs</var> directory, you can also create this new directory by entering <var>mkdir network</var>.

**Pro Tip**: You can use the <var>ls</var> command to confirm the new directory was added.

### **rmdir**

The <var>rmdir</var> command removes, or deletes, a directory. For example, entering <var>rmdir /home/analyst/logs/network</var> would remove this empty directory from the file system.

**Note**: The <var>rmdir</var> command cannot delete directories with files or subdirectories inside. For example, entering <var>rmdir /home/analyst</var> returns an error message.

## Creating and modifying files

### **touch and rm**

The <var>touch</var> command creates a new file. This file won’t have any content inside. If your current directory is <var>/home/analyst/reports</var>, entering <var>touch permissions.txt</var> creates a new file in the <var>reports</var> subdirectory called <var>permissions.txt</var>.

The <var>rm</var> command removes, or deletes, a file. This command should be used carefully because it’s not easy to recover files deleted with <var>rm</var>. To remove the permissions file you just created, enter <var>rm permissions.txt</var>.

**Pro Tip:** You can verify that <var>permissions.txt</var> was successfully created or removed by entering <var>ls</var>.

### **mv and cp**

You can also use <var>mv</var> and <var>cp</var> when working with files. The <var>mv</var> command moves a file or directory to a new location, and the <var>cp</var> command copies a file or directory into a new location. The first argument after <var>mv</var> or <var>cp</var> is the file or directory you want to move or copy, and the second argument is the location you want to move or copy it to.

To move <var>permissions.txt</var> into the <var>logs</var> subdirectory, enter <var>mv permissions.txt /home/analyst/logs</var>. Moving a file removes the file from its original location. However, copying a file doesn’t remove it from its original location. To copy <var>permissions.txt</var> into the <var>logs</var> subdirectory while also keeping it in its original location, enter <var>cp permissions.txt /home/analyst/logs</var>.

**Note**: The <var>mv</var> command can also be used to rename files. To rename a file, pass the new name in as the second argument instead of the new location. For example, entering <var>mv permissions.txt perm.txt</var> renames the <var>permissions.txt</var> file to <var>perm.txt</var>.

## nano text editor

**nano** is a command-line file editor that is available by default in many Linux distributions. Many beginners find it easy to use, and it’s widely used in the security profession. You can perform multiple basic tasks in nano, such as creating new files and modifying file contents.

To open an existing file in nano from the directory that contains it, enter <var>nano</var> followed by the file name. For example, entering <var>nano permissions.txt</var> from the <var>/home/analyst/reports</var> directory opens a new nano editing window with the <var>permissions.txt</var> file open for editing. You can also provide the absolute file path to the file if you’re not in the directory that contains it.

You can also create a new file in nano by entering <var>nano</var> followed by a new file name. For example, entering <var>nano authorized\_users.txt</var> from the <var>/home/analyst/reports</var> directory creates the <var>authorized\_users.txt</var> file within that directory and opens it in a new nano editing window.

Since there isn't an auto-saving feature in nano, it’s important to save your work before exiting. To save a file in nano, use the keyboard shortcut <var>Ctrl + O</var>. You’ll be prompted to confirm the file name before saving. To exit out of nano, use the keyboard shortcut <var>Ctrl + X</var>.

**Note**: Vim and Emacs are also popular command-line text editors.

## Standard output redirection

There’s an additional way you can write to files. Previously, you learned about standard input and standard output. **Standard input** is information received by the OS via the command line, and **standard output** is information returned by the OS through the shell.

You’ve also learned about piping. **Piping** sends the standard output of one command as standard input to another command for further processing. It uses the pipe character (<var>|</var>).

In addition to the pipe (<var>|</var>), you can also use the right angle bracket (<var>&gt;</var>) and double right angle bracket (<var>&gt;&gt;</var>) operators to redirect standard output.

When used with <var>echo</var>, the <var>&gt;</var> and <var>&gt;&gt;</var> operators can be used to send the output of <var>echo</var> to a specified file rather than the screen. The difference between the two is that <var>&gt;</var> overwrites your existing file, and <var>&gt;&gt;</var> adds your content to the end of the existing file instead of overwriting it. The <var>&gt;</var> operator should be used carefully, because it’s not easy to recover overwritten files.

When you’re inside the directory containing the <var>permissions.txt</var> file, entering <var>echo "last updated date" &gt;&gt; permissions.txt</var> adds the string “last updated date” to the file contents. Entering <var>echo "time" &gt; permissions.txt</var> after this command overwrites the entire file contents of <var>permissions.txt</var> with the string “time”.

**Note:** Both the <var>&gt;</var> and <var>&gt;&gt;</var> operators will create a new file if one doesn’t already exist with your specified name.

## Key takeaways

Knowing how to manage the file system in Linux is an important skill for security analysts. Useful commands for this include: <var>mkdir</var>, <var>rmdir</var>, <var>touch</var>, <var>rm</var>, <var>mv</var>, and <var>cp</var>. When security analysts need to write to files, they can use the nano text editor, or the <var>&gt;</var> and <var>&gt;&gt;</var> operators.

# File permissions and ownership

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-hi-there.-it%27s-great"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from current lecture segment: Hi there. It's great to have you back!" class="rc-Phrase active css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Hi there. It's great to have you back! </span></div><div aria-label="toggle video from Let's continue to learn more about how to" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's continue to learn more about how to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">work in Linux as a security analyst. </span></div><div aria-label="toggle video from In this video, we'll explore" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this video, we'll explore </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">file and directory permissions. </span></div><div aria-label="toggle video from We'll learn how Linux represents permissions" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll learn how Linux represents permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and how you can check for the permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">associated with files and directories. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-permissions-are-the-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Permissions are the type of" class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Permissions are the type of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access granted for a file or directory. </span></div><div aria-label="toggle video from Permissions are related to authorization." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Permissions are related to authorization. </span></div><div aria-label="toggle video from Authorization is the concept of granting" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Authorization is the concept of granting </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access to specific resources in a system. </span></div><div aria-label="toggle video from Authorization allows you to limit" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Authorization allows you to limit </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access to specified files or directories. </span></div><div aria-label="toggle video from A good rule to follow is that" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A good rule to follow is that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">data access is on a need-to-know basis. </span></div><div aria-label="toggle video from You can imagine the security risk" class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You can imagine the security risk </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it would impose if anyone </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">could access or modify </span></div><div aria-label="toggle video from anything they wanted to on a system." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">anything they wanted to on a system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-there-are-three-type"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from There are three types of permissions in" class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There are three types of permissions in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Linux that an authorized user can have. </span></div><div aria-label="toggle video from The first type of permission is read." class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first type of permission is read. </span></div><div aria-label="toggle video from The first type of permission is read." class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">On a file, read permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">means contents on the file can be read. </span></div><div aria-label="toggle video from On a directory," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">On a directory, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this permission means you can read </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all files in that directory. </span></div><div aria-label="toggle video from Next are write permissions." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next are write permissions. </span></div><div aria-label="toggle video from Next are write permissions." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Write permissions on a file allow </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">modifications of contents of the file. </span></div><div aria-label="toggle video from On a directory, write permissions indicate that" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">On a directory, write permissions indicate that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">new files can be created in that directory. </span></div><div aria-label="toggle video from Finally, there are also execute permissions." class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, there are also execute permissions. </span></div><div aria-label="toggle video from Execute permissions on files mean that" class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Execute permissions on files mean that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the file can be executed if it's an executable file. </span></div><div aria-label="toggle video from Execute permissions on directories allow users to" class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Execute permissions on directories allow users to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">enter into a directory and access its files. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-permissions-are-gran"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Permissions are granted for" class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Permissions are granted for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">three different types of owners. </span></div><div aria-label="toggle video from The first type is the user." class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first type is the user. </span></div><div aria-label="toggle video from The user is the owner of the file." class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The user is the owner of the file. </span></div><div aria-label="toggle video from When you create a file," class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When you create a file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you become the owner of the file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but the ownership can be changed. </span></div><div aria-label="toggle video from Group is the next type." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Group is the next type. </span></div><div aria-label="toggle video from Every user is a part of a certain group." class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Every user is a part of a certain group. </span></div><div aria-label="toggle video from A group consists of several users," class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A group consists of several users, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and this is one way to manage a multi-user environment. </span></div><div aria-label="toggle video from Finally, there is other." class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, there is other. </span></div><div aria-label="toggle video from Other can be considered all other users on the system." class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Other can be considered all other users on the system. </span></div><div aria-label="toggle video from Basically, anyone else with access" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Basically, anyone else with access </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to the system belongs to this group. </span></div><div aria-label="toggle video from In Linux, file permissions are" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In Linux, file permissions are </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">represented with a 10-character string. </span></div><div aria-label="toggle video from For a directory with full permissions for the user group," class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For a directory with full permissions for the user group, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this string would be: drwxrwxrwx. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-examine-what-t"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's examine what this means more closely." class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's examine what this means more closely. </span></div><div aria-label="toggle video from The first character indicates the file type." class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first character indicates the file type. </span></div><div aria-label="toggle video from As shown in this example," class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As shown in this example, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">d is used to indicate it is a directory. </span></div><div aria-label="toggle video from If this character contains a hyphen instead," class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If this character contains a hyphen instead, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it would be a regular file. </span></div><div aria-label="toggle video from The second, third, and" class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The second, third, and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">fourth characters indicate the permissions for the user. </span></div><div aria-label="toggle video from In this example, r" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0">- <span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this example, </span>
- <span aria-hidden="true" class="cds-137 css-80vnnb cds-139">r </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicates the user has read permissions, </span>
- <span aria-hidden="true" class="cds-137 css-80vnnb cds-139">w indicates the user has write permissions, </span>
- <span aria-hidden="true" class="cds-137 css-80vnnb cds-139">x indicates the user has execute permissions. </span>

</div></div></div></div><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If one of these permissions was missing, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there would be a hyphen instead of the letter. </span>

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-in-the-same-way%2C-the"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In this example, r" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0">  
</div><div aria-label="toggle video from In the same way, the fifth, sixth," class="rc-Phrase css-ugczj4" data-cue="73" data-cue-index="72" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the same way, the fifth, sixth, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and seventh characters indicate </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">permissions for the next owner type group. </span></div><div aria-label="toggle video from As it shows here," class="rc-Phrase css-ugczj4" data-cue="76" data-cue-index="75" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As it shows here, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the type group also has read, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">write, and execute permissions. </span></div><div aria-label="toggle video from There are no hyphens to indicate that" class="rc-Phrase css-ugczj4" data-cue="79" data-cue-index="78" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There are no hyphens to indicate that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">any of these permissions haven't been granted. </span></div><div aria-label="toggle video from Finally, the eighth through tenth characters" class="rc-Phrase css-ugczj4" data-cue="81" data-cue-index="80" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, the eighth through tenth characters </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicate permissions for the last owner type: other. </span></div><div aria-label="toggle video from They also have read, write," class="rc-Phrase css-ugczj4" data-cue="83" data-cue-index="82" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">They also have read, write, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and execute permissions in this example. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-ensuring-files-and-d"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Ensuring files and directories are set" class="rc-Phrase css-ugczj4" data-cue="85" data-cue-index="84" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Ensuring files and directories are set </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">with their appropriate access permissions is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">critical to protecting sensitive files and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">maintaining the overall security of a system. </span></div><div aria-label="toggle video from For example, payroll departments" class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, payroll departments </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">handle sensitive information. </span></div><div aria-label="toggle video from If someone outside of" class="rc-Phrase css-ugczj4" data-cue="91" data-cue-index="90" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If someone outside of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the payroll group could read this file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this would be a privacy concern. </span></div><div aria-label="toggle video from Another example is when the user," class="rc-Phrase css-ugczj4" data-cue="94" data-cue-index="93" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Another example is when the user, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the group, and other can all write to a file. </span></div><div aria-label="toggle video from This type of file is considered a world-writable file." class="rc-Phrase css-ugczj4" data-cue="96" data-cue-index="95" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This type of file is considered a world-writable file. </span></div><div aria-label="toggle video from World-writable files can pose significant security risks." class="rc-Phrase css-ugczj4" data-cue="97" data-cue-index="96" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">World-writable files can pose significant security risks. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-so-how-do-we-check-p"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from So how do we check permissions?" class="rc-Phrase css-ugczj4" data-cue="98" data-cue-index="97" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So how do we check permissions? </span></div><div aria-label="toggle video from First, we need to understand what options are." class="rc-Phrase css-ugczj4" data-cue="99" data-cue-index="98" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we need to understand what options are. </span></div><div aria-label="toggle video from Options modify the behavior of the command." class="rc-Phrase css-ugczj4" data-cue="100" data-cue-index="99" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Options modify the behavior of the command. </span></div><div aria-label="toggle video from The options for a command" class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The options for a command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">can be a single letter or a full word. </span></div><div aria-label="toggle video from Checking permissions involves adding" class="rc-Phrase css-ugczj4" data-cue="103" data-cue-index="102" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Checking permissions involves adding </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">options to the ls command. </span></div><div aria-label="toggle video from First, ls -l displays" class="rc-Phrase css-ugczj4" data-cue="105" data-cue-index="104" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, ls -l displays </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">permissions to files and directories. </span></div><div aria-label="toggle video from You might also want to display" class="rc-Phrase css-ugczj4" data-cue="107" data-cue-index="106" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You might also want to display </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">hidden files and identify their permissions. </span></div><div aria-label="toggle video from Hidden files, which begin with" class="rc-Phrase css-ugczj4" data-cue="109" data-cue-index="108" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Hidden files, which begin with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a period before their name, don't </span></div><div aria-label="toggle video from normally appear when you use ls to display file contents." class="rc-Phrase css-ugczj4" data-cue="111" data-cue-index="110" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">normally appear when you use ls to display file contents. </span></div><div aria-label="toggle video from Entering ls -a displays hidden files." class="rc-Phrase css-ugczj4" data-cue="112" data-cue-index="111" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Entering ls -a displays hidden files. </span></div><div aria-label="toggle video from Then you can combine these two options to do both." class="rc-Phrase css-ugczj4" data-cue="113" data-cue-index="112" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then you can combine these two options to do both. </span></div><div aria-label="toggle video from Entering ls -la displays permissions" class="rc-Phrase css-ugczj4" data-cue="114" data-cue-index="113" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Entering ls -la displays permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to files and directories, including hidden files. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-get-into-bash-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's get into Bash and try out these options." class="rc-Phrase css-ugczj4" data-cue="116" data-cue-index="115" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's get into Bash and try out these options. </span></div><div aria-label="toggle video from Right now, we're in the project subdirectory." class="rc-Phrase css-ugczj4" data-cue="117" data-cue-index="116" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Right now, we're in the project subdirectory. </span></div><div aria-label="toggle video from First, let's use the ls command to display its contents." class="rc-Phrase css-ugczj4" data-cue="118" data-cue-index="117" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, let's use the ls command to display its contents. </span></div><div aria-label="toggle video from The output displays the files in this directory," class="rc-Phrase css-ugczj4" data-cue="119" data-cue-index="118" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The output displays the files in this directory, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but we don't know anything about their permissions. </span></div><div aria-label="toggle video from By using ls -l instead," class="rc-Phrase css-ugczj4" data-cue="121" data-cue-index="120" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">By using ls -l instead, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we get expanded information on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">these files. Let's do this. </span></div><div aria-label="toggle video from The file names are now on the right side of each row." class="rc-Phrase css-ugczj4" data-cue="124" data-cue-index="123" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The file names are now on the right side of each row. </span></div><div aria-label="toggle video from The first piece of information in each row" class="rc-Phrase css-ugczj4" data-cue="125" data-cue-index="124" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first piece of information in each row </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">shows the permissions in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the format that we discussed earlier. </span></div><div aria-label="toggle video from Since these are all files and not directories," class="rc-Phrase css-ugczj4" data-cue="128" data-cue-index="127" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since these are all files and not directories, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">notice how the first character is a hyphen. </span></div><div aria-label="toggle video from Let's focus on one specific file: project1.txt." class="rc-Phrase css-ugczj4" data-cue="130" data-cue-index="129" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's focus on one specific file: project1.txt. </span></div><div aria-label="toggle video from The second through fourth characters of its" class="rc-Phrase css-ugczj4" data-cue="131" data-cue-index="130" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The second through fourth characters of its </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">permissions show us the user </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">has both read and write permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but lacks execute permissions. </span></div><div aria-label="toggle video from In both the fifth through" class="rc-Phrase css-ugczj4" data-cue="135" data-cue-index="134" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In both the fifth through </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">seventh characters and eighth through tenth characters, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the sequence is r--. </span></div><div aria-label="toggle video from This means group and other have only read privileges." class="rc-Phrase css-ugczj4" data-cue="138" data-cue-index="137" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This means group and other have only read privileges. </span></div><div aria-label="toggle video from After the permissions, ls -l first displays the username." class="rc-Phrase css-ugczj4" data-cue="139" data-cue-index="138" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">After the permissions, ls -l first displays the username. </span></div><div aria-label="toggle video from Here, that's us, analyst." class="rc-Phrase css-ugczj4" data-cue="140" data-cue-index="139" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Here, that's us, analyst. </span></div><div aria-label="toggle video from Next comes the group name;" class="rc-Phrase css-ugczj4" data-cue="141" data-cue-index="140" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next comes the group name; </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in our case, the security group. </span></div><div aria-label="toggle video from Now let's use ls -a" class="rc-Phrase css-ugczj4" data-cue="143" data-cue-index="142" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now let's use ls -a </span></div><div aria-label="toggle video from The output includes two more files—hidden" class="rc-Phrase css-ugczj4" data-cue="144" data-cue-index="143" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The output includes two more files—hidden </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">files with the names: .hidden1.txt </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and .hidden2.txt </span></div><div aria-label="toggle video from Finally, we can also use" class="rc-Phrase css-ugczj4" data-cue="147" data-cue-index="146" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, we can also use </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">ls -la to show the permissions for all files, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">including these hidden files. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--7"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-i-thought-that-was-p"><div aria-label="toggle video from I thought that was pretty interesting. Did you?" class="rc-Phrase css-ugczj4" data-cue="150" data-cue-index="149" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I thought that was pretty interesting. Did you? </span></div><div aria-label="toggle video from You now know a little more about" class="rc-Phrase css-ugczj4" data-cue="151" data-cue-index="150" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You now know a little more about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">file permissions and ownership. </span></div><div aria-label="toggle video from This will be helpful when working in" class="rc-Phrase css-ugczj4" data-cue="153" data-cue-index="152" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This will be helpful when working in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">security because monitoring and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">setting correct permissions is </span></div><div aria-label="toggle video from essential for protecting information." class="rc-Phrase css-ugczj4" data-cue="156" data-cue-index="155" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">essential for protecting information. </span></div><div aria-label="toggle video from Take a small break and meet me in the next video." class="rc-Phrase css-ugczj4" data-cue="157" data-cue-index="156" role="button"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Take a small break and meet me in the next video. </span></div></div>

# Permission commands

Previously, you explored file permissions and the commands that you can use to display and change them. In this reading, you’ll review these concepts and also focus on an example of how these commands work together when putting the principle of least privilege into practice.

## Reading permissions

In Linux, permissions are represented with a 10-character string. Permissions include:

<div class="rc-CML" dir="auto" id="bkmrk-read%3A-for-files%2C-thi"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- **read**: for files, this is the ability to read the file contents; for directories, this is the ability to read all contents in the directory including both files and subdirectories
- **write**: for files, this is the ability to make modifications on the file contents; for directories, this is the ability to create new files in the directory
- **execute**: for files, this is the ability to execute the file if it’s a program; for directories, this is the ability to enter the directory and access its files

</div></div></div></div></div>These permissions are given to these types of owners:

<div class="rc-CML" dir="auto" id="bkmrk-user%3A-the-owner-of-t"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- **user**: the owner of the file
- **group**: a larger group that the owner is a part of
- **other**: all other users on the system

</div></div></div></div></div>Each character in the 10-character string conveys different information about these permissions. The following table describes the purpose of each character:

<div class="rc-CML" dir="auto" id="bkmrk-character-example-me"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div class="css-1yr0py9"><table><thead><tr><th scope="col">**Character**

</th><th scope="col">**Example**

</th><th scope="col">**Meaning**

</th></tr></thead><tbody><tr><td>1st

</td><td>**d**rwxrwxrwx

</td><td>file type

- <var>d</var> for directory
- <var>-</var> for a regular file

</td></tr><tr><td>2nd

</td><td>d**r**wxrwxrwx

</td><td>read permissions for the user

- <var>r</var> if the user has read permissions
- <var>-</var> if the user lacks read permissions

</td></tr><tr><td>3rd

</td><td>dr**w**xrwxrwx

</td><td>write permissions for the user

- <var>w</var> if the user has write permissions
- <var>-</var> if the user lacks write permissions

</td></tr><tr><td>4th

</td><td>drw**x**rwxrwx

</td><td>execute permissions for the user

- <var>x</var> if the user has execute permissions
- <var>-</var> if the user lacks execute permissions

</td></tr><tr><td>5th

</td><td>drwx**r**wxrwx

</td><td>read permissions for the group

- <var>r</var> if the group has read permissions
- <var>-</var> if the group lacks read permissions

</td></tr><tr><td>6th

</td><td>drwxr**w**xrwx

</td><td>write permissions for the group

- <var>w</var> if the group has write permissions
- <var>-</var> if the group lacks write permissions

</td></tr><tr><td>7th

</td><td>drwxrw**x**rwx

</td><td>execute permissions for the group

- <var>x</var> if the group has execute permissions
- <var>-</var> if the group lacks execute permissions

</td></tr><tr><td>8th

</td><td>drwxrwx**r**wx

</td><td>read permissions for other

- <var>r</var> if the other owner type has read permissions
- <var>-</var> if the other owner type lacks read permissions

</td></tr><tr><td>9th

</td><td>drwxrwxr**w**x

</td><td>write permissions for other

- <var>w</var> if the other owner type has write permissions
- <var>-</var> if the other owner type lacks write permissions

</td></tr><tr><td>10th

</td><td>drwxrwxrw**x**

</td><td>execute permissions for other

- <var>x</var> if the other owner type has execute permissions
- <var>-</var> if the other owner type lacks execute permissions

</td></tr></tbody></table>

</div></div></div></div></div></div>## Exploring existing permissions

You can use the <var>ls</var> command to investigate who has permissions on files and directories. Previously, you learned that <var>ls</var> displays the names of files in directories in the current working directory.

There are additional options you can add to the <var>ls</var> command to make your command more specific. Some of these options provide details about permissions. Here are a few important <var>ls</var> options for security analysts:

<div class="rc-CML" dir="auto" id="bkmrk-ls--a%3A-displays-hidd"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>ls -a</var>: Displays hidden files. Hidden files start with a period (<var>.</var>) at the beginning.
- <var>ls -l</var>: Displays permissions to files and directories. Also displays other additional information, including owner name, group, file size, and the time of last modification.
- <var>ls -la</var>: Displays permissions to files and directories, including hidden files. This is a combination of the other two options.

</div></div></div></div></div>## Changing permissions

The **principle of least privilege** is the concept of granting only the minimal access and authorization required to complete a task or function. In other words, users should not have privileges that are beyond what is necessary. Not following the principle of least privilege can create security risks.

The <var>chmod</var> command can help you manage this authorization. The <var>chmod</var> command changes permissions on files and directories.

### **Using chmod**

The <var>chmod</var> command requires two arguments. The first argument indicates how to change permissions, and the second argument indicates the file or directory that you want to change permissions for. For example, the following command would add all permissions to <var>login\_sessions.txt</var>:

<var>chmod u+rwx,g+rwx,o+rwx login\_sessions.txt</var>

If you wanted to take all the permissions away, you could use

<var>chmod u-rwx,g-rwx,o-rwx login\_sessions.txt</var>

Another way to assign these permissions is to use the equals sign (<var>=</var>) in this first argument. Using <var>=</var> with <var>chmod</var> sets, or assigns, the permissions exactly as specified. For example, the following command would set read permissions for <var>login\_sessions.txt</var> for user, group, and other:

<var>chmod u=r,g=r,o=r login\_sessions.txt</var>

This command overwrites existing permissions. For instance, if the user previously had write permissions, these write permissions are removed after you specify only read permissions with <var>=</var>.

The following table reviews how each character is used within the first argument of <var>chmod</var>:

<div class="rc-CML" dir="auto" id="bkmrk-character-descriptio"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div class="css-1yr0py9"><table><thead><tr><th scope="col">**Character**

</th><th scope="col">**Description**

</th></tr></thead><tbody><tr><td><var>u</var>

</td><td>indicates changes will be made to user permissions

</td></tr><tr><td><var>g</var>

</td><td>indicates changes will be made to group permissions

</td></tr><tr><td><var>o</var>

</td><td>indicates changes will be made to other permissions

</td></tr><tr><td><var>+</var>

</td><td>adds permissions to the user, group, or other

</td></tr><tr><td><var>-</var>

</td><td>removes permissions from the user, group, or other

</td></tr><tr><td><var>=</var>

</td><td>assigns permissions for the user, group, or other

</td></tr></tbody></table>

</div></div></div></div></div></div>**Note:** When there are permission changes to more than one owner type, commas are needed to separate changes for each owner type. You should not add spaces after those commas.

### **The principle of least privilege in action**

As a security analyst, you may encounter a situation like this one: There’s a file called <var>bonuses.txt</var> within a compensation directory. The owner of this file is a member of the Human Resources department with a username of <var>hrrep1</var>. It has been decided that <var>hrrep1</var> needs access to this file. But, since this file contains confidential information, no one else in the <var>hr</var> group needs access.

You run <var>ls -l</var> to check the permissions of files in the compensation directory and discover that the permissions for <var>bonuses.txt</var> are <var>-rw-rw----</var>. The group owner type has read and write permissions that do not align with the principle of least privilege.

To remedy the situation, you input <var>chmod g-rw bonuses.txt</var>. Now, only the user who needs to access this file to carry out their job responsibilities can access this file.

## Key takeaways

Managing directory and file permissions may be a part of your work as a security analyst. Using <var>ls</var> with the <var>-l</var> and <var>-la</var> options allows you to investigate directory and file permissions. Using <var>chmod</var> allows you to change user permissions and ensure they are aligned with the principle of least privilege.

# File permissions and ownership

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-hi-there.-it%27s-great"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Hi there. It's great to have you back!" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Hi there. It's great to have you back! </span></div><div aria-label="toggle video from Let's continue to learn more about how to" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's continue to learn more about how to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">work in Linux as a security analyst. </span></div><div aria-label="toggle video from In this video, we'll explore" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this video, we'll explore </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">file and directory permissions. </span></div><div aria-label="toggle video from We'll learn how Linux represents permissions" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll learn how Linux represents permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and how you can check for the permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">associated with files and directories. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-permissions-are-the-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Permissions are the type of" class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Permissions are the type of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access granted for a file or directory. </span></div><div aria-label="toggle video from Permissions are related to authorization." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Permissions are related to authorization. </span></div><div aria-label="toggle video from Permissions are related to authorization." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Authorization is the concept of granting </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access to specific resources in a system. </span></div><div aria-label="toggle video from Authorization allows you to limit" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Authorization allows you to limit </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access to specified files or directories. </span></div><div aria-label="toggle video from A good rule to follow is that" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A good rule to follow is that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">data access is on a need-to-know basis. </span></div><div aria-label="toggle video from You can imagine the security risk" class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You can imagine the security risk </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it would impose if anyone </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">could access or modify </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">anything they wanted to on a system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-there-are-three-type"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from There are three types of permissions in" class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There are three types of permissions in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Linux that an authorized user can have. </span></div><div aria-label="toggle video from The first type of permission is read." class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first type of permission is read. </span></div><div aria-label="toggle video from On a file, read permissions" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">On a file, read permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">means contents on the file can be read. </span></div><div aria-label="toggle video from On a directory," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">On a directory, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this permission means you can read </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all files in that directory. </span></div><div aria-label="toggle video from Next are write permissions." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next are write permissions. </span></div><div aria-label="toggle video from Write permissions on a file allow" class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Write permissions on a file allow </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">modifications of contents of the file. </span></div><div aria-label="toggle video from On a directory, write permissions indicate that" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">On a directory, write permissions indicate that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">new files can be created in that directory. </span></div><div aria-label="toggle video from Finally, there are also execute permissions." class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, there are also execute permissions. </span></div><div aria-label="toggle video from Execute permissions on files mean that" class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Execute permissions on files mean that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the file can be executed if it's an executable file. </span></div><div aria-label="toggle video from Execute permissions on directories allow users to" class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Execute permissions on directories allow users to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">enter into a directory and access its files. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-permissions-are-gran"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Permissions are granted for" class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Permissions are granted for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">three different types of owners. </span></div><div aria-label="toggle video from The first type is the user." class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first type is the user. </span></div><div aria-label="toggle video from The user is the owner of the file." class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The user is the owner of the file. </span></div><div aria-label="toggle video from When you create a file," class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When you create a file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you become the owner of the file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but the ownership can be changed. </span></div><div aria-label="toggle video from Group is the next type." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Group is the next type. </span></div><div aria-label="toggle video from Every user is a part of a certain group." class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Every user is a part of a certain group. </span></div><div aria-label="toggle video from A group consists of several users," class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A group consists of several users, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and this is one way to manage a multi-user environment. </span></div><div aria-label="toggle video from Finally, there is other." class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, there is other. </span></div><div aria-label="toggle video from Other can be considered all other users on the system." class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Other can be considered all other users on the system. </span></div><div aria-label="toggle video from Basically, anyone else with access" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Basically, anyone else with access </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to the system belongs to this group. </span></div><div aria-label="toggle video from In Linux, file permissions are" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In Linux, file permissions are </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">represented with a 10-character string. </span></div><div aria-label="toggle video from For a directory with full permissions for the user group," class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For a directory with full permissions for the user group, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this string would be: drwxrwxrwx. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-examine-what-t"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's examine what this means more closely." class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's examine what this means more closely. </span></div><div aria-label="toggle video from The first character indicates the file type." class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first character indicates the file type. </span></div><div aria-label="toggle video from As shown in this example," class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As shown in this example, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">d is used to indicate it is a directory. </span></div><div aria-label="toggle video from If this character contains a hyphen instead," class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If this character contains a hyphen instead, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it would be a regular file. </span></div><div aria-label="toggle video from The second, third, and" class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The second, third, and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">fourth characters indicate the permissions for the user. </span></div><div aria-label="toggle video from In this example, r" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this example, r </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicates the user has read permissions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">w indicates the user has write permissions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and x indicates the user has execute permissions. </span></div><div aria-label="toggle video from In this example, r" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If one of these permissions was missing, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there would be a hyphen instead of the letter. </span></div><div aria-label="toggle video from In the same way, the fifth, sixth," class="rc-Phrase css-ugczj4" data-cue="73" data-cue-index="72" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the same way, the fifth, sixth, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and seventh characters indicate </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">permissions for the next owner type group. </span></div><div aria-label="toggle video from As it shows here," class="rc-Phrase css-ugczj4" data-cue="76" data-cue-index="75" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As it shows here, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the type group also has read, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">write, and execute permissions. </span></div><div aria-label="toggle video from There are no hyphens to indicate that" class="rc-Phrase css-ugczj4" data-cue="79" data-cue-index="78" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There are no hyphens to indicate that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">any of these permissions haven't been granted. </span></div><div aria-label="toggle video from Finally, the eighth through tenth characters" class="rc-Phrase css-ugczj4" data-cue="81" data-cue-index="80" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, the eighth through tenth characters </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicate permissions for the last owner type: other. </span></div><div aria-label="toggle video from They also have read, write," class="rc-Phrase css-ugczj4" data-cue="83" data-cue-index="82" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">They also have read, write, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and execute permissions in this example. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-ensuring-files-and-d"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Ensuring files and directories are set" class="rc-Phrase css-ugczj4" data-cue="85" data-cue-index="84" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Ensuring files and directories are set </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">with their appropriate access permissions is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">critical to protecting sensitive files and </span></div><div aria-label="toggle video from maintaining the overall security of a system." class="rc-Phrase css-ugczj4" data-cue="88" data-cue-index="87" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">maintaining the overall security of a system. </span></div><div aria-label="toggle video from For example, payroll departments" class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, payroll departments </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">handle sensitive information. </span></div><div aria-label="toggle video from If someone outside of" class="rc-Phrase css-ugczj4" data-cue="91" data-cue-index="90" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If someone outside of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the payroll group could read this file, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this would be a privacy concern. </span></div><div aria-label="toggle video from Another example is when the user," class="rc-Phrase css-ugczj4" data-cue="94" data-cue-index="93" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Another example is when the user, </span></div><div aria-label="toggle video from the group, and other can all write to a file." class="rc-Phrase css-ugczj4" data-cue="95" data-cue-index="94" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the group, and other can all write to a file. </span></div><div aria-label="toggle video from This type of file is considered a world-writable file." class="rc-Phrase css-ugczj4" data-cue="96" data-cue-index="95" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This type of file is considered a world-writable file. </span></div><div aria-label="toggle video from World-writable files can pose significant security risks." class="rc-Phrase css-ugczj4" data-cue="97" data-cue-index="96" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">World-writable files can pose significant security risks. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-so-how-do-we-check-p"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from So how do we check permissions?" class="rc-Phrase css-ugczj4" data-cue="98" data-cue-index="97" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So how do we check permissions? </span></div><div aria-label="toggle video from First, we need to understand what options are." class="rc-Phrase css-ugczj4" data-cue="99" data-cue-index="98" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we need to understand what options are. </span></div><div aria-label="toggle video from Options modify the behavior of the command." class="rc-Phrase css-ugczj4" data-cue="100" data-cue-index="99" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Options modify the behavior of the command. </span></div><div aria-label="toggle video from The options for a command" class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The options for a command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">can be a single letter or a full word. </span></div><div aria-label="toggle video from Checking permissions involves adding" class="rc-Phrase css-ugczj4" data-cue="103" data-cue-index="102" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Checking permissions involves adding </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">options to the ls command. </span></div><div aria-label="toggle video from First, ls -l displays" class="rc-Phrase css-ugczj4" data-cue="105" data-cue-index="104" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, ls -l displays </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">permissions to files and directories. </span></div><div aria-label="toggle video from You might also want to display" class="rc-Phrase css-ugczj4" data-cue="107" data-cue-index="106" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You might also want to display </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">hidden files and identify their permissions. </span></div><div aria-label="toggle video from Hidden files, which begin with" class="rc-Phrase css-ugczj4" data-cue="109" data-cue-index="108" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Hidden files, which begin with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a period before their name, don't </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">normally appear when you use ls to display file contents. </span></div><div aria-label="toggle video from Entering ls -a displays hidden files." class="rc-Phrase css-ugczj4" data-cue="112" data-cue-index="111" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Entering ls -a displays hidden files. </span></div><div aria-label="toggle video from Then you can combine these two options to do both." class="rc-Phrase css-ugczj4" data-cue="113" data-cue-index="112" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then you can combine these two options to do both. </span></div><div aria-label="toggle video from Entering ls -la displays permissions" class="rc-Phrase css-ugczj4" data-cue="114" data-cue-index="113" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Entering ls -la displays permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to files and directories, including hidden files. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-get-into-bash-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's get into Bash and try out these options." class="rc-Phrase css-ugczj4" data-cue="116" data-cue-index="115" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's get into Bash and try out these options. </span></div><div aria-label="toggle video from Right now, we're in the project subdirectory." class="rc-Phrase css-ugczj4" data-cue="117" data-cue-index="116" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Right now, we're in the project subdirectory. </span></div><div aria-label="toggle video from First, let's use the ls command to display its contents." class="rc-Phrase css-ugczj4" data-cue="118" data-cue-index="117" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, let's use the ls command to display its contents. </span></div><div aria-label="toggle video from The output displays the files in this directory," class="rc-Phrase css-ugczj4" data-cue="119" data-cue-index="118" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The output displays the files in this directory, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but we don't know anything about their permissions. </span></div><div aria-label="toggle video from By using ls -l instead," class="rc-Phrase css-ugczj4" data-cue="121" data-cue-index="120" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">By using ls -l instead, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we get expanded information on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">these files. Let's do this. </span></div><div aria-label="toggle video from The file names are now on the right side of each row." class="rc-Phrase css-ugczj4" data-cue="124" data-cue-index="123" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The file names are now on the right side of each row. </span></div><div aria-label="toggle video from The first piece of information in each row" class="rc-Phrase css-ugczj4" data-cue="125" data-cue-index="124" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first piece of information in each row </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">shows the permissions in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the format that we discussed earlier. </span></div><div aria-label="toggle video from Since these are all files and not directories," class="rc-Phrase css-ugczj4" data-cue="128" data-cue-index="127" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since these are all files and not directories, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">notice how the first character is a hyphen. </span></div><div aria-label="toggle video from Let's focus on one specific file: project1.txt." class="rc-Phrase css-ugczj4" data-cue="130" data-cue-index="129" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's focus on one specific file: project1.txt. </span></div><div aria-label="toggle video from The second through fourth characters of its" class="rc-Phrase css-ugczj4" data-cue="131" data-cue-index="130" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The second through fourth characters of its </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">permissions show us the user </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">has both read and write permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but lacks execute permissions. </span></div><div aria-label="toggle video from In both the fifth through" class="rc-Phrase css-ugczj4" data-cue="135" data-cue-index="134" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In both the fifth through </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">seventh characters and eighth through tenth characters, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the sequence is r--. </span></div><div aria-label="toggle video from This means group and other have only read privileges." class="rc-Phrase css-ugczj4" data-cue="138" data-cue-index="137" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This means group and other have only read privileges. </span></div><div aria-label="toggle video from After the permissions, ls -l first displays the username." class="rc-Phrase css-ugczj4" data-cue="139" data-cue-index="138" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">After the permissions, ls -l first displays the username. </span></div><div aria-label="toggle video from Here, that's us, analyst." class="rc-Phrase css-ugczj4" data-cue="140" data-cue-index="139" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Here, that's us, analyst. </span></div><div aria-label="toggle video from Next comes the group name;" class="rc-Phrase css-ugczj4" data-cue="141" data-cue-index="140" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next comes the group name; </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in our case, the security group. </span></div><div aria-label="toggle video from Now let's use ls -a" class="rc-Phrase css-ugczj4" data-cue="143" data-cue-index="142" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now let's use ls -a </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The output includes two more files—hidden </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">files with the names: .hidden1.txt </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and .hidden2.txt </span></div><div aria-label="toggle video from Finally, we can also use" class="rc-Phrase css-ugczj4" data-cue="147" data-cue-index="146" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, we can also use </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">ls -la to show the permissions for all files, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">including these hidden files. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--7"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-arowdh cds-3 cds-grid-item cds-48 cds-73" id="bkmrk-i-thought-that-was-p"><div><div class="rc-TranscriptHighlighter css-79elbk"><div class="rc-Transcript css-9li235" data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="interactive_transcript" data-track-page="item_layout" role="presentation"><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from I thought that was pretty interesting. Did you?" class="rc-Phrase css-ugczj4" data-cue="150" data-cue-index="149" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I thought that was pretty interesting. Did you? </span></div><div aria-label="toggle video from You now know a little more about" class="rc-Phrase css-ugczj4" data-cue="151" data-cue-index="150" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You now know a little more about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">file permissions and ownership. </span></div><div aria-label="toggle video from This will be helpful when working in" class="rc-Phrase css-ugczj4" data-cue="153" data-cue-index="152" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This will be helpful when working in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">security because monitoring and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">setting correct permissions is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">essential for protecting information. </span></div><div aria-label="toggle video from Take a small break and meet me in the next video." class="rc-Phrase css-ugczj4" data-cue="157" data-cue-index="156" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Take a small break and meet me in the next video. </span></div></div></div></div></div></div></div></div><div class="cds-1 css-hcqebr cds-3 cds-grid-item cds-48 cds-66" id="bkmrk--8"><div class="cds-316 cds-formControl-root css-4p0j7c cds-319"></div></div>

# Change permissions

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-hi-there%21-in-the-pre"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Hi there! In the previous video," class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Hi there! In the previous video, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you learned how to check permissions for a user. </span></div><div aria-label="toggle video from In this video, we're going" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this video, we're going </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to learn about changing permissions. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-when-working-as-a-se"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from When working as a security analyst," class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When working as a security analyst, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there may be many reasons to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">change permissions for a user. </span></div><div aria-label="toggle video from A user may have changed departments" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A user may have changed departments </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">or been assigned to a different work group. </span></div><div aria-label="toggle video from A user might simply no longer be working on" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A user might simply no longer be working on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a project that requires certain permissions. </span></div><div aria-label="toggle video from These changes are necessary in order to protect" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">These changes are necessary in order to protect </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">system files from being </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">accidentally or deliberately altered or deleted. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-explore-a-rela"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's explore a related command" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's explore a related command </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that helps control this access. </span></div><div aria-label="toggle video from In this video, we'll learn about chmod." class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this video, we'll learn about chmod. </span></div><div aria-label="toggle video from chmod changes permissions on files and directories." class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">chmod changes permissions on files and directories. </span></div><div aria-label="toggle video from The command chmod stands for change mode." class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The command chmod stands for change mode. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-there-are-two-modes-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from There are two modes for changing permissions," class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There are two modes for changing permissions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but we'll focus on symbolic. The best way to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">learn about how chmod works is through an example. </span></div><div aria-label="toggle video from I know this has a lot of details," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I know this has a lot of details, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but we'll break this down. </span></div><div aria-label="toggle video from Also, please keep in mind that, like many Linux commands," class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Also, please keep in mind that, like many Linux commands, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you don't have to memorize </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the information and can always find a reference. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-with-chmod%2C-you-need"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from With chmod, you need to identify which" class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">With chmod, you need to identify which </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">file or directory you want to adjust permissions for. </span></div><div aria-label="toggle video from This is the final argument," class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is the final argument, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in this case, a file named: access.txt. </span></div><div aria-label="toggle video from The first argument, added directly after" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first argument, added directly after </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the chmod command, indicates how to change permissions. </span></div><div aria-label="toggle video from Right now, this might seem hard to interpret," class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Right now, this might seem hard to interpret, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but soon we'll understand why </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this is called symbolic mode. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-previously%2C-we-learn"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Previously, we learned about the three types" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Previously, we learned about the three types </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of owners: user, group, and other. </span></div><div aria-label="toggle video from To identify these with chmod," class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To identify these with chmod, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we use u to represent the user, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">g to represent the group, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and o to represent other. </span></div><div aria-label="toggle video from In this particular example," class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this particular example, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">g indicates we will make </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">some changes to group permissions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and o to permissions for other. </span></div><div aria-label="toggle video from These owner types are separated" class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">These owner types are separated </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">by a comma in this argument. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-but-do-we-want-to-ad"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from But do we want to add or take away permissions?" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But do we want to add or take away permissions? </span></div><div aria-label="toggle video from Well, for this, we use mathematical operators." class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Well, for this, we use mathematical operators. </span></div><div aria-label="toggle video from So, the plus sign after g" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So, the plus sign after g </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">means we want to add permissions for group. </span></div><div aria-label="toggle video from The minus sign after o" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The minus sign after o </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">means we want to take them away from other. </span></div><div aria-label="toggle video from The minus sign after o" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And the last question is: what kind of changes? </span></div><div aria-label="toggle video from We've already learned that r represents read permissions," class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We've already learned that r represents read permissions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">w represents write permissions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and x represents execute permissions. </span></div><div aria-label="toggle video from So in this case, the w indicates" class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So in this case, the w indicates </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that we're adding write permissions to the group, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and r indicates that we are taking </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">away read permissions from other. </span></div><div aria-label="toggle video from This is still very complex." class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is still very complex. </span></div><div aria-label="toggle video from But now that we've broken it down," class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But now that we've broken it down, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">perhaps it doesn't seem quite </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">so much like a foreign language. </span></div><div aria-label="toggle video from And remember, you don't have to memorize this all." class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And remember, you don't have to memorize this all. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-give-this-new-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's give this new command a try." class="rc-Phrase css-ugczj4" data-cue="68" data-cue-index="67" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's give this new command a try. </span></div><div aria-label="toggle video from We'll start out in the logs sub-directory." class="rc-Phrase css-ugczj4" data-cue="69" data-cue-index="68" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll start out in the logs sub-directory. </span></div><div aria-label="toggle video from If we use the ls -l command," class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we use the ls -l command, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">it will output the permissions for the file. </span></div><div aria-label="toggle video from It shows the permissions for the only file" class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It shows the permissions for the only file </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in this directory: access.txt. </span></div><div aria-label="toggle video from Previously, we learned how to read these permissions." class="rc-Phrase css-ugczj4" data-cue="74" data-cue-index="73" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Previously, we learned how to read these permissions. </span></div><div aria-label="toggle video from Previously, we learned how to read these permissions." class="rc-Phrase css-ugczj4" data-cue="74" data-cue-index="73" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The second through fourth characters </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicate that the user has read and write permissions. </span></div><div aria-label="toggle video from The fifth through seventh characters" class="rc-Phrase css-ugczj4" data-cue="77" data-cue-index="76" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The fifth through seventh characters </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">show the group only has read permissions. </span></div><div aria-label="toggle video from And the eighth to tenth characters show" class="rc-Phrase css-ugczj4" data-cue="79" data-cue-index="78" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And the eighth to tenth characters show </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that other only has read permissions. </span></div><div aria-label="toggle video from We need to adjust these permissions." class="rc-Phrase css-ugczj4" data-cue="81" data-cue-index="80" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We need to adjust these permissions. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--7"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-we-want-to-ensure-an"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We want to ensure analysts in" class="rc-Phrase css-ugczj4" data-cue="82" data-cue-index="81" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We want to ensure analysts in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the security group have write permission, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but takeaway read permissions from the owner-type other, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">so we add write permissions for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">group and remove read permissions for other. </span></div><div aria-label="toggle video from Let's run ls -l again." class="rc-Phrase css-ugczj4" data-cue="87" data-cue-index="86" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's run ls -l again. </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This shows a change in the permissions for access.txt. </span></div><div aria-label="toggle video from Notice how in the middle segment" class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Notice how in the middle segment </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of permissions for the group, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">w has been added to give write permissions. </span></div><div aria-label="toggle video from And another change is that" class="rc-Phrase css-ugczj4" data-cue="92" data-cue-index="91" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And another change is that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the r has been removed in the last segment, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicating that read permissions </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">for other have been removed. </span></div><div aria-label="toggle video from As mentioned earlier, these hyphens" class="rc-Phrase css-ugczj4" data-cue="96" data-cue-index="95" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As mentioned earlier, these hyphens </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicate a lack of permissions. </span></div><div aria-label="toggle video from Now, other is lacking all permissions." class="rc-Phrase css-ugczj4" data-cue="98" data-cue-index="97" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, other is lacking all permissions. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--8"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-arowdh cds-3 cds-grid-item cds-48 cds-73" id="bkmrk-though-it-requires-p"><div><div class="rc-TranscriptHighlighter css-79elbk"><div class="rc-Transcript css-9li235" data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="interactive_transcript" data-track-page="item_layout" role="presentation"><div class="cds-1 css-xl5mb3 cds-2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Though it requires practice," class="rc-Phrase css-ugczj4" data-cue="99" data-cue-index="98" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Though it requires practice, </span></div><div aria-label="toggle video from working in Linux becomes more natural with time." class="rc-Phrase css-ugczj4" data-cue="100" data-cue-index="99" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">working in Linux becomes more natural with time. </span></div><div aria-label="toggle video from I'm glad you're learning a little" class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I'm glad you're learning a little </span></div><div aria-label="toggle video from more about how to use Linux." class="rc-Phrase css-ugczj4" data-cue="102" data-cue-index="101" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">more about how to use Linux. </span></div></div></div></div></div></div></div></div><div class="cds-1 css-hcqebr cds-3 cds-grid-item cds-48 cds-66" id="bkmrk--9"><div class="cds-412 cds-formControl-root css-4p0j7c cds-415"></div></div>

# Permission commands

Previously, you explored file permissions and the commands that you can use to display and change them. In this reading, you’ll review these concepts and also focus on an example of how these commands work together when putting the principle of least privilege into practice.

## Reading permissions

In Linux, permissions are represented with a 10-character string. Permissions include:

<div class="rc-CML" dir="auto" id="bkmrk-read%3A-for-files%2C-thi"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- **read**: for files, this is the ability to read the file contents; for directories, this is the ability to read all contents in the directory including both files and subdirectories
- **write**: for files, this is the ability to make modifications on the file contents; for directories, this is the ability to create new files in the directory
- **execute**: for files, this is the ability to execute the file if it’s a program; for directories, this is the ability to enter the directory and access its files

</div></div></div></div></div>These permissions are given to these types of owners:

<div class="rc-CML" dir="auto" id="bkmrk-user%3A-the-owner-of-t"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- **user**: the owner of the file
- **group**: a larger group that the owner is a part of
- **other**: all other users on the system

</div></div></div></div></div>Each character in the 10-character string conveys different information about these permissions. The following table describes the purpose of each character:

<div class="rc-CML" dir="auto" id="bkmrk-character-example-me"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div class="css-1yr0py9"><table><thead><tr><th scope="col">**Character**

</th><th scope="col">**Example**

</th><th scope="col">**Meaning**

</th></tr></thead><tbody><tr><td>1st

</td><td>**d**rwxrwxrwx

</td><td>file type

- <var>d</var> for directory
- <var>-</var> for a regular file

</td></tr><tr><td>2nd

</td><td>d**r**wxrwxrwx

</td><td>read permissions for the user

- <var>r</var> if the user has read permissions
- <var>-</var> if the user lacks read permissions

</td></tr><tr><td>3rd

</td><td>dr**w**xrwxrwx

</td><td>write permissions for the user

- <var>w</var> if the user has write permissions
- <var>-</var> if the user lacks write permissions

</td></tr><tr><td>4th

</td><td>drw**x**rwxrwx

</td><td>execute permissions for the user

- <var>x</var> if the user has execute permissions
- <var>-</var> if the user lacks execute permissions

</td></tr><tr><td>5th

</td><td>drwx**r**wxrwx

</td><td>read permissions for the group

- <var>r</var> if the group has read permissions
- <var>-</var> if the group lacks read permissions

</td></tr><tr><td>6th

</td><td>drwxr**w**xrwx

</td><td>write permissions for the group

- <var>w</var> if the group has write permissions
- <var>-</var> if the group lacks write permissions

</td></tr><tr><td>7th

</td><td>drwxrw**x**rwx

</td><td>execute permissions for the group

- <var>x</var> if the group has execute permissions
- <var>-</var> if the group lacks execute permissions

</td></tr><tr><td>8th

</td><td>drwxrwx**r**wx

</td><td>read permissions for other

- <var>r</var> if the other owner type has read permissions
- <var>-</var> if the other owner type lacks read permissions

</td></tr><tr><td>9th

</td><td>drwxrwxr**w**x

</td><td>write permissions for other

- <var>w</var> if the other owner type has write permissions
- <var>-</var> if the other owner type lacks write permissions

</td></tr><tr><td>10th

</td><td>drwxrwxrw**x**

</td><td>execute permissions for other

- <var>x</var> if the other owner type has execute permissions
- <var>-</var> if the other owner type lacks execute permissions

</td></tr></tbody></table>

</div></div></div></div></div></div>## Exploring existing permissions

You can use the <var>ls</var> command to investigate who has permissions on files and directories. Previously, you learned that <var>ls</var> displays the names of files in directories in the current working directory.

There are additional options you can add to the <var>ls</var> command to make your command more specific. Some of these options provide details about permissions. Here are a few important <var>ls</var> options for security analysts:

<div class="rc-CML" dir="auto" id="bkmrk-ls--a%3A-displays-hidd"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>ls -a</var>: Displays hidden files. Hidden files start with a period (<var>.</var>) at the beginning.
- <var>ls -l</var>: Displays permissions to files and directories. Also displays other additional information, including owner name, group, file size, and the time of last modification.
- <var>ls -la</var>: Displays permissions to files and directories, including hidden files. This is a combination of the other two options.

</div></div></div></div></div>## Changing permissions

The **principle of least privilege** is the concept of granting only the minimal access and authorization required to complete a task or function. In other words, users should not have privileges that are beyond what is necessary. Not following the principle of least privilege can create security risks.

The <var>chmod</var> command can help you manage this authorization. The <var>chmod</var> command changes permissions on files and directories.

### **Using chmod**

The <var>chmod</var> command requires two arguments. The first argument indicates how to change permissions, and the second argument indicates the file or directory that you want to change permissions for. For example, the following command would add all permissions to <var>login\_sessions.txt</var>:

<var>chmod u+rwx,g+rwx,o+rwx login\_sessions.txt</var>

If you wanted to take all the permissions away, you could use

<var>chmod u-rwx,g-rwx,o-rwx login\_sessions.txt</var>

Another way to assign these permissions is to use the equals sign (<var>=</var>) in this first argument. Using <var>=</var> with <var>chmod</var> sets, or assigns, the permissions exactly as specified. For example, the following command would set read permissions for <var>login\_sessions.txt</var> for user, group, and other:

<var>chmod u=r,g=r,o=r login\_sessions.txt</var>

This command overwrites existing permissions. For instance, if the user previously had write permissions, these write permissions are removed after you specify only read permissions with <var>=</var>.

The following table reviews how each character is used within the first argument of <var>chmod</var>:

<div class="rc-CML" dir="auto" id="bkmrk-character-descriptio"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div class="css-1yr0py9"><table><thead><tr><th scope="col">**Character**

</th><th scope="col">**Description**

</th></tr></thead><tbody><tr><td><var>u</var>

</td><td>indicates changes will be made to user permissions

</td></tr><tr><td><var>g</var>

</td><td>indicates changes will be made to group permissions

</td></tr><tr><td><var>o</var>

</td><td>indicates changes will be made to other permissions

</td></tr><tr><td><var>+</var>

</td><td>adds permissions to the user, group, or other

</td></tr><tr><td><var>-</var>

</td><td>removes permissions from the user, group, or other

</td></tr><tr><td><var>=</var>

</td><td>assigns permissions for the user, group, or other

</td></tr></tbody></table>

</div></div></div></div></div></div>**Note:** When there are permission changes to more than one owner type, commas are needed to separate changes for each owner type. You should not add spaces after those commas.

### **The principle of least privilege in action**

As a security analyst, you may encounter a situation like this one: There’s a file called <var>bonuses.txt</var> within a compensation directory. The owner of this file is a member of the Human Resources department with a username of <var>hrrep1</var>. It has been decided that <var>hrrep1</var> needs access to this file. But, since this file contains confidential information, no one else in the <var>hr</var> group needs access.

You run <var>ls -l</var> to check the permissions of files in the compensation directory and discover that the permissions for <var>bonuses.txt</var> are <var>-rw-rw----</var>. The group owner type has read and write permissions that do not align with the principle of least privilege.

To remedy the situation, you input <var>chmod g-rw bonuses.txt</var>. Now, only the user who needs to access this file to carry out their job responsibilities can access this file.

## Key takeaways

Managing directory and file permissions may be a part of your work as a security analyst. Using <var>ls</var> with the <var>-l</var> and <var>-la</var> options allows you to investigate directory and file permissions. Using <var>chmod</var> allows you to change user permissions and ensure they are aligned with the principle of least privilege.

# Add and delete users

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-welcome-back%21-in-thi"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Welcome back! In this video, we are" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Welcome back! In this video, we are </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">going to discuss adding and deleting users. </span></div><div aria-label="toggle video from current lecture segment: This is related to the concept of authentication." class="rc-Phrase active css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is related to the concept of authentication. </span></div><div aria-label="toggle video from Authentication is the process of a user" class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Authentication is the process of a user </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">proving that they are who they say </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">they are in the system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-just-like-in-a-physi"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Just like in a physical building," class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Just like in a physical building, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">not all users should be allowed in. </span></div><div aria-label="toggle video from Not all users should get access to the system." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Not all users should get access to the system. </span></div><div aria-label="toggle video from But we also want to make sure everyone" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But we also want to make sure everyone </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">who should have access to the system has it. </span></div><div aria-label="toggle video from That's why we need to add users." class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That's why we need to add users. </span></div><div aria-label="toggle video from New users can be new to" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">New users can be new to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the organization or new to a group. </span></div><div aria-label="toggle video from This could be related to a change in" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This could be related to a change in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">organizational structure or simply a directive </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">from management to move someone. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-and-also%2C-when-users"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from And also, when users leave the organization," class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And also, when users leave the organization, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">they need to be deleted. </span></div><div aria-label="toggle video from They should no longer have" class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">They should no longer have </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access to any part of the system. </span></div><div aria-label="toggle video from Or if they simply changed groups," class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Or if they simply changed groups, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">they should be deleted from groups </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that they are no longer a part of. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now-that-we%27ve-sorte"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now that we've sorted out why it's" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now that we've sorted out why it's </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">important to add and delete users, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's discuss a different type of user, the root user. </span></div><div aria-label="toggle video from A root user, or superuser," class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">A root user, or superuser, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">is a user with elevated privileges to modify the system. </span></div><div aria-label="toggle video from Regular users have limitations," class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Regular users have limitations, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">where the root does not. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-individuals-who-need"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Individuals who need to perform" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Individuals who need to perform </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">specific tasks can be temporarily added as root users. </span></div><div aria-label="toggle video from Root users can create, modify," class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Root users can create, modify, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">or delete any file and run any program. </span></div><div aria-label="toggle video from Only root users or accounts with" class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Only root users or accounts with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">root privileges can add new users. </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So you may be wondering how you become a superuser. </span></div><div aria-label="toggle video from Well, one way is logging in as the root user," class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Well, one way is logging in as the root user, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but running commands as the root user is </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">considered to be bad practice when using Linux. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-why-is-running-comma"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Why is running commands as" class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Why is running commands as </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a root user potentially problematic? </span></div><div aria-label="toggle video from The first problem with logging in" class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The first problem with logging in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">as root is the security risks. </span></div><div aria-label="toggle video from Malicious actors will try to breach the root account." class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Malicious actors will try to breach the root account. </span></div><div aria-label="toggle video from Since it's the most powerful account, to stay safe," class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since it's the most powerful account, to stay safe, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the root account should have logins disabled. </span></div><div aria-label="toggle video from Another problem is that it's very" class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Another problem is that it's very </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">easy to make irreversible mistakes. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-it%27s-very-easy-to-ty"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from It's very easy to type the wrong command in the CLI," class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">It's very easy to type the wrong command in the CLI, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and if you're running as the root user, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you run a higher risk of making an irreversible mistake, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">such as permanently deleting a directory. </span></div><div aria-label="toggle video from Finally, there's the concern of accountability." class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, there's the concern of accountability. </span></div><div aria-label="toggle video from In a multi-user environment like Linux," class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In a multi-user environment like Linux, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there are many users. </span></div><div aria-label="toggle video from If a user is running as root," class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If a user is running as root, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there is no way to track who exactly ran a command. </span></div><div aria-label="toggle video from One solution to help solve this problem is sudo." class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">One solution to help solve this problem is sudo. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-sudo-is-a-command-th"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from sudo is a command that temporarily grants" class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">sudo is a command that temporarily grants </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">elevated permissions to specific users. </span></div><div aria-label="toggle video from This provides more of" class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This provides more of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a controlled approach compared to root, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">which runs every command with root privileges. </span></div><div aria-label="toggle video from sudo solves lots of" class="rc-Phrase css-ugczj4" data-cue="66" data-cue-index="65" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">sudo solves lots of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">problems associated with running as root. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--7"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-sudo-comes-from-supe"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from sudo comes from super-user-do" class="rc-Phrase css-ugczj4" data-cue="68" data-cue-index="67" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">sudo comes from super-user-do </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and lets you execute commands as </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">an elevated user without having </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to sign in and out of another account. </span></div><div aria-label="toggle video from Running sudo will prompt you to enter" class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Running sudo will prompt you to enter </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the password for the user you're currently logged in as. </span></div><div aria-label="toggle video from Not all users on a system can become a superuser." class="rc-Phrase css-ugczj4" data-cue="74" data-cue-index="73" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Not all users on a system can become a superuser. </span></div><div aria-label="toggle video from Users must be granted sudo access through" class="rc-Phrase css-ugczj4" data-cue="75" data-cue-index="74" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Users must be granted sudo access through </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a configuration file called the sudoers file. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--8"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now-that-we%27ve-learn"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now that we've learned about sudo," class="rc-Phrase css-ugczj4" data-cue="77" data-cue-index="76" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now that we've learned about sudo, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's learn how we can use it with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">another command to add users. </span></div><div aria-label="toggle video from This command is useradd." class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This command is useradd. </span></div><div aria-label="toggle video from This command is useradd." class="rc-Phrase css-ugczj4" data-cue="80" data-cue-index="79" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">useradd adds a user to the system. </span></div><div aria-label="toggle video from Only root or users with" class="rc-Phrase css-ugczj4" data-cue="82" data-cue-index="81" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Only root or users with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">sudo privileges can use a useradd command. </span></div><div aria-label="toggle video from Let's look at a specific example" class="rc-Phrase css-ugczj4" data-cue="84" data-cue-index="83" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's look at a specific example </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in which we need to add a user. </span></div><div aria-label="toggle video from We'll imagine a new representative is joining" class="rc-Phrase css-ugczj4" data-cue="86" data-cue-index="85" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll imagine a new representative is joining </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the sales department and will be given </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the username of salesrep7. </span></div><div aria-label="toggle video from We're tasked with adding them to the system." class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We're tasked with adding them to the system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--9"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-try-adding-the"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's try adding the new user." class="rc-Phrase css-ugczj4" data-cue="90" data-cue-index="89" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's try adding the new user. </span></div><div aria-label="toggle video from First, we need to use the sudo command," class="rc-Phrase css-ugczj4" data-cue="91" data-cue-index="90" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we need to use the sudo command, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">followed by the useradd command, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and then last, the username we want to add, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in this case, salesrep7. </span></div><div aria-label="toggle video from This command doesn't display anything on the screen." class="rc-Phrase css-ugczj4" data-cue="95" data-cue-index="94" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This command doesn't display anything on the screen. </span></div><div aria-label="toggle video from But since we get a new Bash cursor" class="rc-Phrase css-ugczj4" data-cue="96" data-cue-index="95" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But since we get a new Bash cursor </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and not an error message, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we can feel confident that </span></div><div aria-label="toggle video from the command worked successfully." class="rc-Phrase css-ugczj4" data-cue="99" data-cue-index="98" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the command worked successfully. </span></div><div aria-label="toggle video from If it didn't, an error message would have appeared." class="rc-Phrase css-ugczj4" data-cue="100" data-cue-index="99" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If it didn't, an error message would have appeared. </span></div><div aria-label="toggle video from Sometimes an error has to do with" class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Sometimes an error has to do with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">something simple like misspelling useradd. </span></div><div aria-label="toggle video from Or, it might be because we didn't have sudo privileges." class="rc-Phrase css-ugczj4" data-cue="103" data-cue-index="102" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Or, it might be because we didn't have sudo privileges. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--10"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-now-let%27s-learn-how-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now let's learn how to do the opposite." class="rc-Phrase css-ugczj4" data-cue="104" data-cue-index="103" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now let's learn how to do the opposite. </span></div><div aria-label="toggle video from Let's learn how to delete a user with userdel." class="rc-Phrase css-ugczj4" data-cue="105" data-cue-index="104" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's learn how to delete a user with userdel. </span></div><div aria-label="toggle video from userdel deletes a user from the system." class="rc-Phrase css-ugczj4" data-cue="106" data-cue-index="105" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">userdel deletes a user from the system. </span></div><div aria-label="toggle video from Similarly, we need root permissions that we'll" class="rc-Phrase css-ugczj4" data-cue="107" data-cue-index="106" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Similarly, we need root permissions that we'll </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">access through sudo to use userdel. </span></div><div aria-label="toggle video from Let's go back to our example of the user we added." class="rc-Phrase css-ugczj4" data-cue="109" data-cue-index="108" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's go back to our example of the user we added. </span></div><div aria-label="toggle video from Let's imagine two months later," class="rc-Phrase css-ugczj4" data-cue="110" data-cue-index="109" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's imagine two months later, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the sales representative that we just </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">added to the system leaves the company. </span></div><div aria-label="toggle video from That user should no longer have access to the system." class="rc-Phrase css-ugczj4" data-cue="113" data-cue-index="112" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That user should no longer have access to the system. </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's delete that user from the system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--11"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-again%2C-the-sudo-comm"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Again, the sudo command is used first," class="rc-Phrase css-ugczj4" data-cue="115" data-cue-index="114" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Again, the sudo command is used first, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">then we add the userdel command. </span></div><div aria-label="toggle video from Last, we add the name of the user we want to delete." class="rc-Phrase css-ugczj4" data-cue="117" data-cue-index="116" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Last, we add the name of the user we want to delete. </span></div><div aria-label="toggle video from Again, we know it ran successfully because" class="rc-Phrase css-ugczj4" data-cue="118" data-cue-index="117" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Again, we know it ran successfully because </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">there is a new Bash cursor and not an error message. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--12"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-now%2C-we%27ve-covered-h"><div aria-label="toggle video from Now, we've covered how to add and delete" class="rc-Phrase css-ugczj4" data-cue="120" data-cue-index="119" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, we've covered how to add and delete </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">users and how these actions require sudo. </span></div><div aria-label="toggle video from When using sudo, we have to use our best judgment." class="rc-Phrase css-ugczj4" data-cue="122" data-cue-index="121" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When using sudo, we have to use our best judgment. </span></div><div aria-label="toggle video from These special privileges must be used" class="rc-Phrase css-ugczj4" data-cue="123" data-cue-index="122" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">These special privileges must be used </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">responsibly to ensure a secure system. </span></div></div>

# Responsible use of sudo

Previously, you explored authorization, authentication, and Linux commands with <var>sudo</var>, <var>useradd</var>, and <var>userdel</var>. The <var>sudo</var> command is important for security analysts because it allows users to have elevated permissions without risking the system by running commands as the root user. You’ll continue exploring authorization, authentication, and Linux commands in this reading and learn two more commands that can be used with <var>sudo</var>: <var>usermod</var> and <var>chown</var>.

## Responsible use of sudo

To manage authorization and authentication, you need to be a **root user,** or a user with elevated privileges to modify the system. The root user can also be called the “super user.” You become a root user by logging in as the root user. However, running commands as the root user is not recommended in Linux because it can create security risks if malicious actors compromise that account. It’s also easy to make irreversible mistakes, and the system can’t track who ran a command. For these reasons, rather than logging in as the root user, it’s recommended you use <var>sudo</var> in Linux when you need elevated privileges.

The <var>sudo</var> command temporarily grants elevated permissions to specific users. The name of this command comes from “super user do.” Users must be given access in a configuration file to use <var>sudo</var>. This file is called the “sudoers file.” Although using <var>sudo</var> is preferable to logging in as the root user, it's important to be aware that users with the elevated permissions to use <var>sudo</var> might be more at risk in the event of an attack.

You can compare this to a hotel with a master key. The master key can be used to access any room in the hotel. There are some workers at the hotel who need this key to perform their work. For example, to clean all the rooms, the janitor would scan their ID badge and then use this master key. However, if someone outside the hotel’s network gained access to the janitor’s ID badge and master key, they could access any room in the hotel. In this example, the janitor with the master key represents a user using <var>sudo</var> for elevated privileges. Because of the dangers of <var>sudo</var>, only users who really need to use it should have these permissions.

Additionally, even if you need access to <var>sudo</var>, you should be careful about using it with only the commands you need and nothing more. Running commands with <var>sudo</var> allows users to bypass the typical security controls that are in place to prevent elevated access to an attacker.

**Note**: Be aware of <var>sudo</var> if copying commands from an online source. It’s important you don’t use <var>sudo</var> accidentally.

## Authentication and authorization with sudo

You can use <var>sudo</var> with many authentication and authorization management tasks. As a reminder, **authentication** is the process of verifying who someone is, and **authorization** is the concept of granting access to specific resources in a system. Some of the key commands used for these tasks include the following:

### **useradd**

The <var>useradd</var> command adds a user to the system. To add a user with the username of <var>fgarcia</var> with <var>sudo</var>, enter <var>sudo useradd fgarcia</var>. There are additional options you can use with <var>useradd</var>:

<div class="rc-CML" dir="auto" id="bkmrk--g%3A-sets-the-user%E2%80%99s-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>-g</var>: Sets the user’s default group, also called their primary group
- <var>-G</var>: Adds the user to additional groups, also called supplemental or secondary groups

</div></div></div></div></div>To use the <var>-g</var> option, the primary group must be specified after <var>-g</var>. For example, entering <var>sudo useradd -g security fgarcia</var> adds <var>fgarcia</var> as a new user and assigns their primary group to be <var>security</var>.

To use the <var>-G</var> option, the supplemental group must be passed into the command after <var>-G</var>. You can add more than one supplemental group at a time with the <var>-G</var> option. Entering <var>sudo useradd -G finance,admin fgarcia</var> adds <var>fgarcia</var> as a new user and adds them to the existing <var>finance</var> and <var>admin</var> groups.

### **usermod**

The <var>usermod</var> command modifies existing user accounts. The same <var>-g</var> and <var>-G</var> options from the <var>useradd</var> command can be used with <var>usermod</var> if a user already exists.

To change the primary group of an existing user, you need the <var>-g</var> option. For example, entering <var>sudo usermod -g executive fgarcia</var> would change <var>fgarcia</var>’s primary group to the <var>executive</var> group.

To add a supplemental group for an existing user, you need the <var>-G</var> option. You also need a <var>-a</var> option, which appends the user to an existing group and is only used with the <var>-G</var> option. For example, entering <var>sudo usermod -a -G marketing fgarcia</var> would add the existing <var>fgarcia</var> user to the supplemental <var>marketing</var> group.

**Note:** When changing the supplemental group of an existing user, if you don't include the <var>-a</var> option, <var>-G</var> will replace any existing supplemental groups with the groups specified after <var>usermod</var>. Using <var>-a</var> with <var>-G</var> ensures that the new groups are added but existing groups are not replaced.

There are other options you can use with <var>usermod</var> to specify how you want to modify the user, including:

<div class="rc-CML" dir="auto" id="bkmrk--d%3A-changes-the-user"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>-d</var>: Changes the user’s home directory.
- <var>-l</var>: Changes the user’s login name.
- <var>-L</var>: Locks the account so the user can’t log in.

</div></div></div></div></div>The option always goes after the <var>usermod</var> command. For example, to change <var>fgarcia</var>’s home directory to <var>/home/garcia\_f</var>, enter <var>sudo usermod -d /home/garcia\_f fgarcia</var>. The option <var>-d</var> directly follows the command <var>usermod</var> before the other two needed arguments.

### **userdel**

The <var>userdel</var> command deletes a user from the system. For example, entering <var>sudo userdel fgarcia</var> deletes <var>fgarcia</var> as a user. Be careful before you delete a user using this command.

The <var>userdel</var> command doesn’t delete the files in the user’s home directory unless you use the <var>-r</var> option. Entering <var>sudo userdel -r fgarcia</var> would delete <var>fgarcia</var> as a user and delete all files in their home directory. Before deleting any user files, you should ensure you have backups in case you need them later.

**Note**: Instead of deleting the user, you could consider deactivating their account with <var>usermod -L</var>. This prevents the user from logging in while still giving you access to their account and associated permissions. For example, if a user left an organization, this option would allow you to identify which files they have ownership over, so you could move this ownership to other users.

### **chown**

The <var>chown</var> command changes ownership of a file or directory. You can use <var>chown</var> to change user or group ownership. To change the user owner of the <var>access.txt</var> file to <var>fgarcia</var>, enter <var>sudo chown fgarcia access.txt</var>. To change the group owner of <var>access.txt</var> to <var>security</var>, enter <var>sudo chown :security access.txt</var>. You must enter a colon (<var>:</var>) before <var>security</var> to designate it as a group name.

Similar to <var>useradd</var>, <var>usermod</var>, and <var>userdel</var>, there are additional options that can be used with <var>chown</var>.

## Key takeaways

Authentication is the process of a user verifying their identity, and authorization is the process of determining what they have access to. You can use the <var>sudo</var> command to temporarily run commands with elevated privileges to complete authentication and authorization management tasks. Specifically, <var>useradd</var>, <var>userdel,</var> <var>usermod</var>, and <var>chown</var> can be used to manage users and file ownership.

# The Linux community

<div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-there-are-so-many-ot"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from current lecture segment: There are so many others just like you" class="rc-Phrase active css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">There are so many others just like you </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">who will be using the command line. </span></div><div aria-label="toggle video from Linux's popularity and ease of use" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Linux's popularity and ease of use </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">has created a large online community </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">that constantly publishes information to </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">help users learn how to operate Linux. </span></div><div aria-label="toggle video from Since Linux is open-source," class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Since Linux is open-source, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">it has become a global community of </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">users that contribute frequently. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-this-global-communit"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from This global community is a huge resource for" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">This global community is a huge resource for </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">all Linux users because users </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">can find answers for everyday tasks. </span></div><div aria-label="toggle video from Just searching on the internet will provide many answers." class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Just searching on the internet will provide many answers. </span></div><div aria-label="toggle video from The easiest way to troubleshoot a task is to search and" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The easiest way to troubleshoot a task is to search and </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">read about how someone else has done it. </span></div><div aria-label="toggle video from Looking for resources on how to execute" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Looking for resources on how to execute </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">a task is a good way for beginners to continue learning. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--1"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-so-far%2C-you%27ve-learn"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from So far, you've learned how to add users," class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">So far, you've learned how to add users, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">but imagine if later you want to add a new group. </span></div><div aria-label="toggle video from One way to learn how to do this is to search online." class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">One way to learn how to do this is to search online. </span></div><div aria-label="toggle video from Let's give this a try through a Google search." class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Let's give this a try through a Google search. </span></div><div aria-label="toggle video from The search results give us" class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The search results give us </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">many options for adding a group in Linux. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--2"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-another-reputable-so"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Another reputable source is a" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Another reputable source is a </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Unix &amp; Linux Stack Exchange. </span></div><div aria-label="toggle video from Their answers are ranked with" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Their answers are ranked with </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">points to display high-quality answers. </span></div><div aria-label="toggle video from Many questions relate to" class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Many questions relate to </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">more advanced users and </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">are geared towards troubleshooting. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--3"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-well%2C-now-you-know-w"><div aria-label="toggle video from Well, now you know where to get some extra support" class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Well, now you know where to get some extra support </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">whenever in doubt about topics in Linux. </span></div><div aria-label="toggle video from There is a lot of support just a click away." class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">There is a lot of support just a click away. </span></div><div aria-label="toggle video from Coming up, we'll learn how to get support" class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Coming up, we'll learn how to get support </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">from within the command line itself. Join me. </span></div></div>

# Linux resources

Previously, you were introduced to the Linux community and some resources that exist to help Linux users. Linux has many options available to give users the information they need. This reading will review these resources. When you’re aware of the resources available to you, you can continue to learn Linux independently. You can also discover even more ways that Linux can support your work as a security analyst.

## Linux community

Linux has a large online community, and this is a huge resource for Linux users of all levels. You can likely find the answers to your questions with a simple online search. Troubleshooting issues by searching and reading online is an effective way to discover how others approached your issue. It’s also a great way for beginners to learn more about Linux.

The [UNIX and Linux Stack Exchange<svg aria-labelledby="cds-react-aria-254-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk-" role="img" viewbox="0 0 16 16" width="16"></svg>](https://unix.stackexchange.com/)

is a trusted resource for troubleshooting Linux issues. The Unix and Linux Stack Exchange is a question and answer website where community members can ask and answer questions about Linux. Community members vote on answers, so the higher quality answers are displayed at the top. Many of the questions are related to specific topics from advanced users, and the topics might help you troubleshoot issues as you continue using Linux.

## Integrated Linux support

Linux also has several commands that you can use for support.

### **man**

The <var>man</var> command displays information on other commands and how they work. It’s short for “manual.” To search for information on a command, enter the command after <var>man</var>. For example, entering <var>man chown</var> returns detailed information about <var>chown</var>, including the various options you can use with it. The output of the <var>man</var> command is also called a “man page.”

### **apropos**

The <var>apropos</var> command searches the man page descriptions for a specified string. aprops comes from the French phrase à *propos,* meaning *“to the purpose”.* Man pages can be lengthy and difficult to search through if you’re looking for a specific keyword. To use <var>apropos</var>, enter the keyword after <var>apropos</var>.

You can also include the <var>-a</var> option to search for multiple words. For example, entering <var>apropos -a graph editor</var> outputs man pages that contain both the words “graph" and "editor” in their descriptions.

### **whatis**

The <var>whatis</var> command displays a description of a command on a single line. For example, entering <var>whatis nano</var> outputs the description of <var>nano</var>. This command is useful when you don't need a detailed description, just a general idea of the command. This might be as a reminder. Or, it might be after you discover a new command through a colleague or online resource and want to know more.

## Key takeaways

There are many resources available for troubleshooting issues or getting support for Linux. Linux has a large global community of users who ask and answer questions on online resources, such as the Unix and Linux Stack Exchange. You can also use integrated support commands in Linux, such as <var>man</var>, <var>apropos</var>, and <var>whatis</var>.

## Resources for more information

There are many resources available online that can help you learn new Linux concepts, review topics, or ask and answer questions with the global Linux community. The [Unix and Linux Stack Exchange<svg aria-labelledby="cds-react-aria-255-title" class="css-1lzqdox" fill="none" focusable="false" height="16" id="bkmrk--1" role="img" viewbox="0 0 16 16" width="16"></svg>](https://unix.stackexchange.com/ "This resource is a great place to ask and answer questions about Linux with the online community.")is one example, and you can search online to find others.

# Wrap-up;  Glossary terms from week 3

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-congratulations%21-you"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Congratulations! You completed another section in this course." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Congratulations! You completed another section in this course. </span></div><div aria-label="toggle video from Take a minute to think about what you've achieved." class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Take a minute to think about what you've achieved. </span></div><div aria-label="toggle video from You learned a lot in this section. Let's recap what we covered." class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You learned a lot in this section. Let's recap what we covered. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-in-this-section%2C-you"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In this section, you utilized the command line to communicate with the OS." class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this section, you utilized the command line to communicate with the OS. </span></div><div aria-label="toggle video from current lecture segment: Part of this was using commands for navigating and managing the file system." class="rc-Phrase active css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Part of this was using commands for navigating and managing the file system. </span></div><div aria-label="toggle video from And you used other commands for authenticating and authorizing users." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And you used other commands for authenticating and authorizing users. </span></div><div aria-label="toggle video from These are all tasks that a security analyst is likely to encounter." class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">These are all tasks that a security analyst is likely to encounter. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-finally%2C-you-learned"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Finally, you learned about accessing resources that support" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Finally, you learned about accessing resources that support </span></div><div aria-label="toggle video from learning new Linux commands." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">learning new Linux commands. </span></div><div aria-label="toggle video from With this knowledge, you'll be able to continue learning more and" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">With this knowledge, you'll be able to continue learning more and </span></div><div aria-label="toggle video from more about using the command line." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">more about using the command line. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-we-did-it%21-we-learne"><div aria-label="toggle video from We did it! we learned how to communicate with Linux." class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We did it! we learned how to communicate with Linux. </span></div><div aria-label="toggle video from That's a great accomplishment, and" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That's a great accomplishment, and </span></div><div aria-label="toggle video from one that will be very useful to you in your career as a security analyst." class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">one that will be very useful to you in your career as a security analyst. </span></div><div aria-label="toggle video from You should be proud of the work that you've done so far." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You should be proud of the work that you've done so far. </span></div><div aria-label="toggle video from You should be proud of the work that you've done so far." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0">  
</div></div><div class="phrases" id="bkmrk--3"><div aria-label="toggle video from You should be proud of the work that you've done so far." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0">---

</div></div>### **Terms and definitions from Course 4, Week 3**

**Absolute file path:** The full file path, which starts from the root

**Argument (Linux):** Specific information needed by a command

**Authentication:** The process of verifying who someone is

**Authorization:** The concept of granting access to specific resources in a system

**Bash:** The default shell in most Linux distributions

**Command:** An instruction telling the computer to do something

**File path:** The location of a file or directory

**Filesystem Hierarchy Standard (FHS):** The component of the Linux OS that organizes data

**Filtering:** Selecting data that match a certain condition

**nano:** A command-line file editor that is available by default in many Linux distributions

**Options:** Input that modifies the behavior of a command

**Permissions:** The type of access granted for a file or directory

**Principle of least privilege:** The concept of granting only the minimal access and authorization required to complete a task or function

**Relative file path:** A file path that starts from the user's current directory

**Root directory:** The highest-level directory in Linux

**Root user (or superuser):** A user with elevated privileges to modify the system

**Standard input:** Information received by the OS via the command line

**Standard output:** Information returned by the OS through the shell

# Damar: My journey into Linux commands

<div class="rc-Phrase css-ugczj4" id="bkmrk-my-name-is-damar%2C-i%27"><span class="cds-321 css-80vnnb cds-323">My name is Damar, I'm a security engineer here at Google. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-i%27ve-always-wanted-t" tabindex="0"><span class="cds-321 css-80vnnb cds-323">I've always wanted to get into cybersecurity since I was a kid. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-a-lot-of-the-cartoon" tabindex="0"><span class="cds-321 css-80vnnb cds-323">A lot of the cartoons I watched, they had like floppy disks or flash drives, and </span><span class="cds-321 css-80vnnb cds-323">they would put that in the computer and kind of like cause havoc. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-%5Blaugh%5D-so-i-always-" tabindex="0"><span class="cds-321 css-80vnnb cds-323">\[LAUGH\] So I always thought that was really cool. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-i%27ve-had-quite-a-bit" tabindex="0"><span class="cds-321 css-80vnnb cds-323">I've had quite a bit of jobs before coming to Google. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-i-originally-started" tabindex="0"><span class="cds-321 css-80vnnb cds-323">I originally started out making smoothies at Jamba Juice. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-i-got-my-first-it-te" tabindex="0"><span class="cds-321 css-80vnnb cds-323">I got my first IT technological kind of job at Geek Squad and </span><span class="cds-321 css-80vnnb cds-323">then eventually came here and became a security engineer. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-my-advice-to-people-" tabindex="0"><span class="cds-321 css-80vnnb cds-323">My advice to people trying to get into cybersecurity is it may be a lot easier </span><span class="cds-321 css-80vnnb cds-323">than you think. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-%5Blaugh%5D-it-definitel" tabindex="0"><span class="cds-321 css-80vnnb cds-323">\[LAUGH\] It definitely was a lot easier than I thought. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-something-that-i-lea" tabindex="0"><span class="cds-321 css-80vnnb cds-323">Something that I learned jumping in myself is that you're not going to be able to </span><span class="cds-321 css-80vnnb cds-323">learn everything all at once, and </span><span class="cds-321 css-80vnnb cds-323">you're not going to need to know everything all at once. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-linux-is-very-import" tabindex="0"><span class="cds-321 css-80vnnb cds-323">Linux is very important because it's broadly </span><span class="cds-321 css-80vnnb cds-323">used across pretty much every company. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-you-may-use-linux-to" tabindex="0"><span class="cds-321 css-80vnnb cds-323">You may use Linux to curate logs. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-it%27s-a-very-common-p" tabindex="0"><span class="cds-321 css-80vnnb cds-323">It's a very common practice you may also use Linux to set up </span><span class="cds-321 css-80vnnb cds-323">bash jobs that will help with routine tasks within Linux. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-i-first-got-interest" tabindex="0"><span class="cds-321 css-80vnnb cds-323">I first got interested in learning Linux from the Jurassic Park movie. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-there%27s-a-scene-in-t" tabindex="0"><span class="cds-321 css-80vnnb cds-323">There's a scene in the movie where they need to reactivate the electrical doors, </span><span class="cds-321 css-80vnnb cds-323">and they have to use a UNIX operating system to do so. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-so-later-on%2C-i-learn" tabindex="0"><span class="cds-321 css-80vnnb cds-323">So later on, I learned what UNIX was and how Linux came from it, </span><span class="cds-321 css-80vnnb cds-323">and it inspired me to learn more about Linux. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-the-best-advice-i-ca" tabindex="0"><span class="cds-321 css-80vnnb cds-323">The best advice I can give someone that's trying to learn Linux and </span><span class="cds-321 css-80vnnb cds-323">Linux commands is, don't get discouraged by any small hiccups that come up. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-just-keep-with-it." tabindex="0"><span class="cds-321 css-80vnnb cds-323">Just keep with it. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-stick-with-it." tabindex="0"><span class="cds-321 css-80vnnb cds-323">Stick with it. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-think-of-it-as-when-" tabindex="0"><span class="cds-321 css-80vnnb cds-323">Think of it as when you first learned to swim, right, </span><span class="cds-321 css-80vnnb cds-323">you probably weren't that great at it. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-%5Blaugh%5D-it-was-frust" tabindex="0"><span class="cds-321 css-80vnnb cds-323">\[LAUGH\] It was frustrating, and you were probably a little scared, but </span><span class="cds-321 css-80vnnb cds-323">you're stuck with it and I hope that you're able to swim now. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-%5Blaugh%5D-there-are-a-" tabindex="0"><span class="cds-321 css-80vnnb cds-323">\[LAUGH\] There are a plethora of support resources when learning Linux. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-one-good-example-is-" tabindex="0"><span class="cds-321 css-80vnnb cds-323">One good example is the discussion forum in the certificate course. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-another-avenue-of-su" tabindex="0"><span class="cds-321 css-80vnnb cds-323">Another avenue of support for learning Linux is just googling answers using </span><span class="cds-321 css-80vnnb cds-323">Stack Overflow, maybe even making a Reddit post. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-i-love-working-in-cy" tabindex="0"><span class="cds-321 css-80vnnb cds-323">I love working in cybersecurity. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-it%27s-pretty-satisfyi" tabindex="0"><span class="cds-321 css-80vnnb cds-323">It's pretty satisfying to know that me and my team and </span><span class="cds-321 css-80vnnb cds-323">then like all the other security teams here at Google are helping protect people </span><span class="cds-321 css-80vnnb cds-323">online from things they may not even know about. </span></div><div class="rc-Phrase css-ugczj4" id="bkmrk-" tabindex="0"><span class="cds-321 css-80vnnb cds-323">  
</span></div>

# SQL and Databases

# Welcome to week 4; SQL and Databases

<div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-in-the-world-of-secu"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In the world of security, diversity is important." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In the world of security, diversity is important. </span></div><div aria-label="toggle video from Diverse perspectives are often" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Diverse perspectives are often </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">needed to find effective solutions. </span></div><div aria-label="toggle video from This is also true of the tools we use." class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">This is also true of the tools we use. </span></div><div aria-label="toggle video from Your job will often require" class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Your job will often require </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">you to use a lot of diverse tools. </span></div><div aria-label="toggle video from In the last section," class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In the last section, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we studied the Linux command line and learned how </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">this tool can help you search and filter through data, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">navigate through the Linux file system, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">and authenticate users. </span></div><div aria-label="toggle video from Now, we'll learn about another tool." class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Now, we'll learn about another tool. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-in-this-section%2C-we%27"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In this section, we'll explore SQL and how it allows" class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In this section, we'll explore SQL and how it allows </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">you to analyze data in a way </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">needed for your role as a security analyst. </span></div><div aria-label="toggle video from We're going to start off by learning about" class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We're going to start off by learning about </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">relational databases and how they're structured. </span></div><div aria-label="toggle video from From there, we're going to introduce" class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">From there, we're going to introduce </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">SQL queries and how to use </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">them to access data from databases. </span></div><div aria-label="toggle video from We then move on to SQL filters," class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We then move on to SQL filters, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">which help us refine our queries </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">to get the exact information we need. </span></div><div aria-label="toggle video from Lastly, we'll explore SQL joins," class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Lastly, we'll explore SQL joins, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">which allow you to combine tables together. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--1"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-when-i%27m-presented-w"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from When I'm presented with a problem or a project at work," class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">When I'm presented with a problem or a project at work, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I often have to sift through a large amount of data. </span></div><div aria-label="toggle video from When I use SQL," class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">When I use SQL, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I'm able to review data quickly and provide results with </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">confidence since the queries are </span></div><div aria-label="toggle video from consistent and easily executed." class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">consistent and easily executed. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--2"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-sql-is-a-very-powerf"><div aria-label="toggle video from SQL is a very powerful and flexible tool." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">SQL is a very powerful and flexible tool. </span></div><div aria-label="toggle video from Throughout this section, you'll" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Throughout this section, you'll </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">learn how to use the parts of it you </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">need as a security analyst and gain hands-on experience. </span></div><div aria-label="toggle video from Good luck, and I'll join you for the rest of the course!" class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Good luck, and I'll join you for the rest of the course! </span></div><div aria-label="toggle video from Good luck, and I'll join you for the rest of the course!" class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0">---

</div></div>

# New Page



# Introduction to databases

<div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-our-modern-world-is-"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Our modern world is filled with data and" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Our modern world is filled with data and </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">that data almost always guides us in making important decisions. </span></div><div aria-label="toggle video from When working with large amounts of data, we need to know how to store it, so" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">When working with large amounts of data, we need to know how to store it, so </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">it's organized and quick to access and process. </span></div><div aria-label="toggle video from The solution to this is through databases, and" class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The solution to this is through databases, and </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">that's what we're exploring in this video! </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-to-start-us-off%2C%C2%A0we-"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from To start us off," class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">To start us off, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we can define a database as an organized collection of information or data. </span></div><div aria-label="toggle video from Databases are often compared to spreadsheets." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Databases are often compared to spreadsheets. </span></div><div aria-label="toggle video from Some of you may have used Google Sheets or" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Some of you may have used Google Sheets or </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">another common spreadsheet program in the past. </span></div><div aria-label="toggle video from While these programs are convenient ways to store data, spreadsheets" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">While these programs are convenient ways to store data, spreadsheets </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">are often designed for a single user or a small team to store less data. </span></div><div aria-label="toggle video from In contrast, databases can be accessed by multiple people simultaneously and" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In contrast, databases can be accessed by multiple people simultaneously and </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">can store massive amounts of data. </span></div><div aria-label="toggle video from Databases can also perform complex tasks while accessing data." class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Databases can also perform complex tasks while accessing data. </span></div><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">As a security analyst, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">you'll often need to access databases containing useful information. </span></div><div aria-label="toggle video from current lecture segment: For example, these could be databases containing information on login attempts," class="rc-Phrase active css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">For example, these could be databases containing information on login attempts, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">software and updates, or machines and their owners. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--1"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-now-that-we-know-how"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Now that we know how important databases are for us," class="rc-Phrase css-ugczj4" data-cue="21" data-cue-index="20" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Now that we know how important databases are for us, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">let's talk about how they're organized and how we can interact with them. </span></div><div aria-label="toggle video from Using databases allow us to store large amounts of data while keeping it quick and" class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Using databases allow us to store large amounts of data while keeping it quick and </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">easy to access. </span></div><div aria-label="toggle video from There are lots of different ways we can structure a database, but in this course," class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">There are lots of different ways we can structure a database, but in this course, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we'll be working with relational databases. </span></div><div aria-label="toggle video from A relational database is a structured database containing tables that" class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">A relational database is a structured database containing tables that </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">are related to each other. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--2"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-let%27s-learn-more-abo"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's learn more about what makes a relational database." class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Let's learn more about what makes a relational database. </span></div><div aria-label="toggle video from We'll start by examining an individual table in" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We'll start by examining an individual table in </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">a larger database of organizational information. </span></div><div aria-label="toggle video from Each table contains fields of information." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Each table contains fields of information. </span></div><div aria-label="toggle video from For example, in this table on employees," class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">For example, in this table on employees, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">these would include fields like employee\_id, device\_id, and username. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--3"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-these-are-the-column"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from These are the columns of the tables." class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">These are the columns of the tables. </span></div><div aria-label="toggle video from In addition, tables contain rows also called records." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In addition, tables contain rows also called records. </span></div><div aria-label="toggle video from Rows are filled with specific data related to the columns in the table." class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Rows are filled with specific data related to the columns in the table. </span></div><div aria-label="toggle video from For example, our first row is a record for an employee whose id is 1,000 and" class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">For example, our first row is a record for an employee whose id is 1,000 and </span></div><div aria-label="toggle video from who works in the marketing department." class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">who works in the marketing department. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--4"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-relational-databases"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Relational databases often have multiple tables." class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Relational databases often have multiple tables. </span></div><div aria-label="toggle video from Consider an example where we have two tables from a larger database, one with" class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Consider an example where we have two tables from a larger database, one with </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">employees of the company and another with machines given to those employees. </span></div><div aria-label="toggle video from We can connect two tables if they share a common column." class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We can connect two tables if they share a common column. </span></div><div aria-label="toggle video from In this example," class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In this example, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we establish a relationship between them with a common employee\_id column. </span></div><div aria-label="toggle video from The columns that relate two tables to each other are called keys." class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The columns that relate two tables to each other are called keys. </span></div><div aria-label="toggle video from There are two types of keys." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">There are two types of keys. </span></div><div aria-label="toggle video from There are two types of keys." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The first is called a primary key. </span></div><div aria-label="toggle video from The primary key refers to a column where every row has a unique entry." class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The primary key refers to a column where every row has a unique entry. </span></div><div aria-label="toggle video from The primary key must not have any duplicate values, or any null or" class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The primary key must not have any duplicate values, or any null or </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">empty values. </span></div><div aria-label="toggle video from The primary key allows us to uniquely identify every row in our table." class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The primary key allows us to uniquely identify every row in our table. </span></div><div aria-label="toggle video from For the table of employees, employee_id is a primary key." class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">For the table of employees, employee\_id is a primary key. </span></div><div aria-label="toggle video from Every employee_id is unique and there are no employee_ids that are duplicate or" class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Every employee\_id is unique and there are no employee\_ids that are duplicate or </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">empty. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--5"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-the-second-type-of-k"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The second type of key is a foreign key." class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The second type of key is a foreign key. </span></div><div aria-label="toggle video from The foreign key is a column in a table that is a primary key in another table." class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The foreign key is a column in a table that is a primary key in another table. </span></div><div aria-label="toggle video from Foreign keys, unlike primary keys, can have empty values and duplicates." class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Foreign keys, unlike primary keys, can have empty values and duplicates. </span></div><div aria-label="toggle video from The foreign key allows us to connect two tables together." class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The foreign key allows us to connect two tables together. </span></div><div aria-label="toggle video from In our example, we can look at the employee_id column in the machines table." class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In our example, we can look at the employee\_id column in the machines table. </span></div><div aria-label="toggle video from We previously identified this as a primary key in the employees table, so" class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We previously identified this as a primary key in the employees table, so </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we can use this to connect every machine to their corresponding employee. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--6"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-it%27s-also-important-"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from It's also important to know that a table can only have one primary key, but" class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">It's also important to know that a table can only have one primary key, but </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">multiple foreign keys. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--7"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-with-this-informatio"><div aria-label="toggle video from With this information, we're ready to move on to the basics of SQL," class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">With this information, we're ready to move on to the basics of SQL, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">the language that lets us work with databases. </span></div><div aria-label="toggle video from Throughout this section," class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Throughout this section, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we'll gain hands-on experience working with the concepts we just covered! </span></div></div>

# SQL filtering versus Linux filtering

Previously, you explored the Linux commands that allow you to filter for specific information contained within files or directories. And, more recently, you examined how SQL helps you efficiently filter for the information you need. In this reading, you'll explore differences between the two tools as they relate to filtering. You'll also learn that one way to access SQL is through the Linux command line.

## Accessing SQL

There are many interfaces for accessing SQL and many different versions of SQL. One way to access SQL is through the Linux command line.

To access SQL from Linux, you need to type in a command for the version of SQL that you want to use. For example, if you want to access SQLite, you can enter the command <var>sqlite3</var> in the command line.

After this, any commands typed in the command line will be directed to SQL instead of Linux commands.

## Differences between Linux and SQL filtering 

Although both Linux and SQL allow you to filter through data, there are some differences that affect which one you should choose.

### **Structure**

SQL offers a lot more structure than Linux, which is more free-form and not as tidy.

For example, if you wanted to access a log of employee log-in attempts, SQL would have each record separated into columns. Linux would print the data as a line of text without this organization. As a result, selecting a specific column to analyze would be easier and more efficient in SQL.

In terms of structure, SQL provides results that are more easily readable and that can be adjusted more quickly than when using Linux.

### **Joining tables**

Some security-related decisions require information from different tables. SQL allows the analyst to join multiple tables together when returning data. Linux doesn’t have that same functionality; it doesn’t allow data to be connected to other information on your computer. This is more restrictive for an analyst going through security logs.

### **Best uses**

As a security analyst, it’s important to understand when you can use which tool. Although SQL has a more organized structure and allows you to join tables, this doesn’t mean that there aren’t situations that would require you to filter data in Linux.

A lot of data used in cybersecurity will be stored in a database format that works with SQL. However, other logs might be in a format that is not compatible with SQL. For instance, if the data is stored in a text file, you cannot search through it with SQL. In those cases, it is useful to know how to filter in Linux.

## Key takeaways

To work with SQL, you can access it from multiple different interfaces, such as the Linux command line. Both SQL and Linux allow you to filter for specific data, but SQL offers the advantages of structuring the data and allowing you to join data from multiple tables.

# Adedayo: SQL in cybersecurity

<div class="phrases" id="bkmrk-my-name-is-adedayo%2C%C2%A0"><div aria-label="toggle video from My name is Adedayo," class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">My name is Adedayo, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">and I'm a Security Engineer at Google. </span></div><div aria-label="toggle video from A lot of people think you need to have a degree in" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">A lot of people think you need to have a degree in </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">computer science, right to be able to get </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">into cybersecurity. I don't think that's true. </span></div><div aria-label="toggle video from Take me for an example," class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Take me for an example, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I started learning IT from Lagos, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Nigeria where I was born and raised, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">and then I'm all the way here now </span></div><div aria-label="toggle video from in Silicon Valley, working for Google." class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">in Silicon Valley, working for Google. </span></div><div aria-label="toggle video from I think that's just amazing and a dream come true." class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I think that's just amazing and a dream come true. </span></div><div aria-label="toggle video from You taking this certificate is a first step to you" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">You taking this certificate is a first step to you </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">making a commitment to switching </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">your career to cybersecurity. Kudos to you on that. </span></div><div aria-label="toggle video from SQL is one of" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">SQL is one of </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">the skillset you need to have in your toolbox as a </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">cybersecurity professional because you can </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">very quickly make decisions, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">not just off the bat, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">but make decisions with data backing you, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">and be able to communicate with your team, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">with stakeholders about why you made </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">a decision because it's one thing to be able to say, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we need to do this, it's </span></div><div aria-label="toggle video from another thing to say we need to do this" class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">another thing to say we need to do this </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">and here's the data that I wrote my SQL statements about. </span></div><div aria-label="toggle video from I learned SQL by, first," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I learned SQL by, first, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">as a coursework in school, that was really great, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">but I think I forgot everything about that after school. </span></div><div aria-label="toggle video from The next step that I took was taking online courses," class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The next step that I took was taking online courses, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">such as the one you're taking right now to learn </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">SQL and the fundamentals </span></div><div aria-label="toggle video from about it and how to really use it." class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">about it and how to really use it. </span></div><div aria-label="toggle video from Then the first time I used SQL practically was at Google." class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Then the first time I used SQL practically was at Google. </span></div><div aria-label="toggle video from You really need to practice." class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">You really need to practice. </span></div><div aria-label="toggle video from I think with anything else, practice makes perfect." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I think with anything else, practice makes perfect. </span></div><div aria-label="toggle video from Being able to, even if it's just a few hours a week," class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Being able to, even if it's just a few hours a week, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">put aside time to practice writing SQL statement. </span></div><div aria-label="toggle video from Having that skill is something that will" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Having that skill is something that will </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">be very applicable to your first job, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">and you can use that to make data-driven decisions. </span></div><div aria-label="toggle video from I feel very fulfilled working in cybersecurity." class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I feel very fulfilled working in cybersecurity. </span></div><div aria-label="toggle video from I feel very energized," class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">I feel very energized, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">come into work every day. </span></div><div aria-label="toggle video from Not only because I get to work on" class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Not only because I get to work on </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">really complex problems and </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">try to figure out solutions for them, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">but I also have great teammates that we </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">all come together and tackle the problem. </span></div><div aria-label="toggle video from Being able to go to bed at night," class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Being able to go to bed at night, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">knowing that the work that I do is for the better of </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Google users and Google employees </span></div><div aria-label="toggle video from is a very rewarding feeling for me." class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">is a very rewarding feeling for me. </span></div></div>

# Basic queries

<div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-in-this-video%2C-we%27re"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In this video, we're going to be" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In this video, we're going to be </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">running our very first SQL query! </span></div><div aria-label="toggle video from This query will be based on" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">This query will be based on </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">a common work task that you might </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">encounter as a security analyst. </span></div><div aria-label="toggle video from We're going to determine" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We're going to determine </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">which computer has been assigned to a certain employee. </span></div><div aria-label="toggle video from Let's say we have access to the employees table." class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Let's say we have access to the employees table. </span></div><div aria-label="toggle video from The employees table has five columns." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The employees table has five columns. </span></div><div aria-label="toggle video from Two of them, employee_id and device_id," class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Two of them, employee\_id and device\_id, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">contain the information that we need. </span></div><div aria-label="toggle video from We'll write a query to this table that" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We'll write a query to this table that </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">returns only those two columns from the table. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-the-two-sql-keywords"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The two SQL keywords we need for" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The two SQL keywords we need for </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">basic SQL queries are SELECT and FROM. </span></div><div aria-label="toggle video from SELECT indicates which columns to return." class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">SELECT indicates which columns to return. </span></div><div aria-label="toggle video from FROM indicates which table to query." class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">FROM indicates which table to query. </span></div><div aria-label="toggle video from The use of these keywords in SQL is very similar" class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The use of these keywords in SQL is very similar </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">to how we would use these words in everyday language. </span></div><div aria-label="toggle video from For example, we can ask a friend to select" class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">For example, we can ask a friend to select </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">apples and bananas from </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">the big box when going out to buy fruit. </span></div><div aria-label="toggle video from This is already very similar to SQL." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">This is already very similar to SQL. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--1"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-so-let%27s-go-ahead-an"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from So let's go ahead and use SELECT and FROM in SQL to" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">So let's go ahead and use SELECT and FROM in SQL to </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">return the information we need on </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">employees and the computers they use. </span></div><div aria-label="toggle video from We start off by typing in the SQL statement." class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We start off by typing in the SQL statement. </span></div><div aria-label="toggle video from After FROM, we've identified" class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">After FROM, we've identified </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">that the information will be </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">pulled from the employees table. </span></div><div aria-label="toggle video from And after SELECT, employee_id and device_id" class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">And after SELECT, employee\_id and device\_id </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">indicate the two columns we </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">want to return from this table. </span></div><div aria-label="toggle video from Notice how a comma separates" class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Notice how a comma separates </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">the two columns that we want to return. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--2"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-it%27s-also-worth-ment"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from It's also worth mentioning a couple of" class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">It's also worth mentioning a couple of </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">key aspects related to the syntax of SQL here. </span></div><div aria-label="toggle video from Syntax refers to the rules that determine" class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Syntax refers to the rules that determine </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">what is correctly structured in a computing language. </span></div><div aria-label="toggle video from In SQL, keywords are not case-sensitive, so" class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In SQL, keywords are not case-sensitive, so </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">you could also write select and from in lowercase, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">but we're placing them in capital letters because </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">it makes the query easier to understand. </span></div><div aria-label="toggle video from Another aspect of this syntax" class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Another aspect of this syntax </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">is that semicolons are </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">placed at the end of the statement. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--3"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-and-now%2C-we%27ll-run-t"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from And now, we'll run the query by pressing Enter." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">And now, we'll run the query by pressing Enter. </span></div><div aria-label="toggle video from The output gives us the information we" class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">The output gives us the information we </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">need to match employees to their computers. </span></div><div aria-label="toggle video from We just ran our very first SQL query!" class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We just ran our very first SQL query! </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--4"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk-suppose-you-wanted-t"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Suppose you wanted to know" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Suppose you wanted to know </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">what department the employee using </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">the computer is from, or their </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">username, or the office they work in. </span></div><div aria-label="toggle video from To do that, we can use SQL to make" class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">To do that, we can use SQL to make </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">another statement that prints out </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">all of the columns from the table. </span></div><div aria-label="toggle video from We can do this by placing an asterisk after SELECT." class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">We can do this by placing an asterisk after SELECT. </span></div><div aria-label="toggle video from This is commonly referred to as select all." class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">This is commonly referred to as select all. </span></div><div aria-label="toggle video from Now, let's run this query to the employees table in SQL." class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">Now, let's run this query to the employees table in SQL. </span></div><div aria-label="toggle video from And now we have the full table in the output." class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">And now we have the full table in the output. </span></div></div></div></div><div class="cds-185 css-xl5mb3 cds-186" id="bkmrk--5"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item">  
</div></div><div class="cds-185 css-arowdh cds-187 cds-grid-item cds-232 cds-257" id="bkmrk-you-just-made-it-thr"><div><div class="rc-TranscriptHighlighter css-79elbk"><div class="rc-Transcript css-9li235" data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="interactive_transcript" data-track-page="item_layout" role="presentation"><div class="cds-185 css-xl5mb3 cds-186"><div class="cds-185 rc-Paragraph css-1lz62pp cds-187 cds-grid-item"><div class="phrases"><div aria-label="toggle video from You just made it through a basic query" class="rc-Phrase css-ugczj4" data-cue="62" data-cue-index="61" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">You just made it through a basic query </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">in SQL, congratulations! </span></div><div aria-label="toggle video from In the next video," class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">In the next video, </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">we'll learn how to add filters to </span><span aria-hidden="true" class="cds-321 css-80vnnb cds-323">our queries, so I'll meet you there! </span></div></div></div></div></div></div></div></div><div class="cds-185 css-hcqebr cds-187 cds-grid-item cds-232 cds-250" id="bkmrk--6"><div class="cds-819 cds-formControl-root css-4p0j7c cds-822"><div class="css-1whdyhf" data-testid="visually-hidden">  
</div><label class="cds-823 cds-formLabel-root cds-formLabel-onLight css-wamxw1 cds-828 cds-829" for="cds-react-aria-482" id="bkmrk--7"></label></div></div>

# Query a database

Previously, you explored how SQL is an important tool in the world of cybersecurity and is essential when querying databases. You examined a few basic SQL queries and keywords used to extract needed information from a database. In this reading, you’ll review those basic SQL queries and learn a new keyword that will help you organize your output. You'll also learn about the <var>Chinook</var> database, which this course uses for queries in readings and quizzes.

## Basic SQL query

There are two essential keywords in any SQL query: <var>SELECT</var> and <var>FROM</var>. You will use these keywords every time you want to query a SQL database. Using them together helps SQL identify what data you need from a database and the table you are returning it from.

The video demonstrated this SQL query:

<var>SELECT employee\_id, device\_id</var>

<var>FROM employees;</var>

In readings and quizzes, this course uses a sample database called the <var>Chinook</var> database to run queries. The <var>Chinook</var> database includes data that might be created at a digital media company. A security analyst employed by this company might need to query this data. For example, the database contains eleven tables, including an <var>employees</var> table, a <var>customers</var> table, and an <var>invoices</var> table. These tables include data such as names and addresses.

As an example, you can run this query to return data from the <var>customers</var> table of the <var>Chinook</var> database:

SELECT customerid, city, country  
FROM customers;

```
+------------+---------------------+----------------+
| CustomerId | City                | Country        |
+------------+---------------------+----------------+
|          1 | São José dos Campos | Brazil         |
|          2 | Stuttgart           | Germany        |
|          3 | Montréal            | Canada         |
|          4 | Oslo                | Norway         |
|          5 | Prague              | Czech Republic |
|          6 | Prague              | Czech Republic |
|          7 | Vienne              | Austria        |
|          8 | Brussels            | Belgium        |
|          9 | Copenhagen          | Denmark        |
|         10 | São Paulo           | Brazil         |
|         11 | São Paulo           | Brazil         |
|         12 | Rio de Janeiro      | Brazil         |
|         13 | Brasília            | Brazil         |
|         14 | Edmonton            | Canada         |
|         15 | Vancouver           | Canada         |
|         16 | Mountain View       | USA            |
|         17 | Redmond             | USA            |
|         18 | New York            | USA            |
|         19 | Cupertino           | USA            |
|         20 | Mountain View       | USA            |
|         21 | Reno                | USA            |
|         22 | Orlando             | USA            |
|         23 | Boston              | USA            |
|         24 | Chicago             | USA            |
|         25 | Madison             | USA            |
+------------+---------------------+----------------+
(Output limit exceeded, 25 of 59 total rows shown)
```

<div class="monaco-scrollable-element editor-scrollable vs" data-mprt="5" id="bkmrk--2" role="presentation" style="position: absolute; overflow: hidden; left: 83px; width: 705px; height: 114px;"><div aria-hidden="true" class="invisible scrollbar vertical" role="presentation" style="position: absolute; width: 14px; height: 114px; right: 0px; top: 0px;">  
</div></div><div aria-hidden="true" class="minimap slider-mouseover" data-mprt="8" id="bkmrk--5" role="presentation" style="position: absolute; left: 0px; width: 0px; height: 114px;"></div><div class="cml-code-evaluator" id="bkmrk--7"></div>The <var>SELECT</var> keyword indicates which columns to return. For example, you can return the <var>customerid</var> column from the <var>Chinook</var> database with

<var>SELECT customerid</var>

You can also select multiple columns by separating them with a comma. For example, if you want to return both the <var>customerid</var> and <var>city</var> columns, you should write <var>SELECT customerid, city</var>.

If you want to return all columns in a table, you can follow the <var>SELECT</var> keyword with an asterisk (<var>\*</var>). The first line in the query will be <var>SELECT \*</var>.

**Note:** Although the tables you're querying in this course are relatively small, using <var>SELECT \*</var> may not be advisable when working with large databases and tables; in those cases, the final output may be difficult to understand and might be slow to run.

### **FROM**

The <var>SELECT</var> keyword always comes with the <var>FROM</var> keyword. <var>FROM</var> indicates which table to query. To use the <var>FROM</var> keyword, you should write it after the <var>SELECT</var> keyword, often on a new line, and follow it with the name of the table you’re querying. If you want to return all columns from the <var>customers</var> table, you can write:

<var>SELECT \*</var>

<var>FROM customers;</var>

When you want to end the query here, you put a semicolon (<var>;</var>) at the end to tell SQL that this is the entire query.

**Note:** Line breaks are not necessary in SQL queries, but are often used to make the query easier to understand. If you prefer, you can also write the previous query on one line as

<var>SELECT \* FROM customers;  
and here would be the databases answer for  
SELECT \* FROM customers ORDER BY country, city;  
</var>

```
+------------+-----------+-------------+--------------------------------------------------+--------------------------------------+---------------------+-------+----------------+------------+---------------------+--------------------+-------------------------------+--------------+
| CustomerId | FirstName | LastName    |                                          Company | Address                              | City                | State | Country        | PostalCode | Phone               |                Fax | Email                         | SupportRepId |
+------------+-----------+-------------+--------------------------------------------------+--------------------------------------+---------------------+-------+----------------+------------+---------------------+--------------------+-------------------------------+--------------+
|         56 | Diego     | Gutiérrez   |                                             None | 307 Macacha Güemes                   | Buenos Aires        |  None | Argentina      | 1106       | +54 (0)11 4311 4333 |               None | diego.gutierrez@yahoo.ar      |            4 |
|         55 | Mark      | Taylor      |                                             None | 421 Bourke Street                    | Sidney              |   NSW | Australia      | 2010       | +61 (02) 9332 3633  |               None | mark.taylor@yahoo.au          |            4 |
|          7 | Astrid    | Gruber      |                                             None | Rotenturmstraße 4, 1010 Innere Stadt | Vienne              |  None | Austria        | 1010       | +43 01 5134505      |               None | astrid.gruber@apple.at        |            5 |
|          8 | Daan      | Peeters     |                                             None | Grétrystraat 63                      | Brussels            |  None | Belgium        | 1000       | +32 02 219 03 03    |               None | daan_peeters@apple.be         |            4 |
|         13 | Fernanda  | Ramos       |                                             None | Qe 7 Bloco G                         | Brasília            |    DF | Brazil         | 71020-677  | +55 (61) 3363-5547  | +55 (61) 3363-7855 | fernadaramos4@uol.com.br      |            4 |
|         12 | Roberto   | Almeida     |                                           Riotur | Praça Pio X, 119                     | Rio de Janeiro      |    RJ | Brazil         | 20040-020  | +55 (21) 2271-7000  | +55 (21) 2271-7070 | roberto.almeida@riotur.gov.br |            3 |
|          1 | Luís      | Gonçalves   | Embraer - Empresa Brasileira de Aeronáutica S.A. | Av. Brigadeiro Faria Lima, 2170      | São José dos Campos |    SP | Brazil         | 12227-000  | +55 (12) 3923-5555  | +55 (12) 3923-5566 | luisg@embraer.com.br          |            3 |
|         10 | Eduardo   | Martins     |                                 Woodstock Discos | Rua Dr. Falcão Filho, 155            | São Paulo           |    SP | Brazil         | 01007-010  | +55 (11) 3033-5446  | +55 (11) 3033-4564 | eduardo@woodstock.com.br      |            4 |
|         11 | Alexandre | Rocha       |                             Banco do Brasil S.A. | Av. Paulista, 2022                   | São Paulo           |    SP | Brazil         | 01310-200  | +55 (11) 3055-3278  | +55 (11) 3055-8131 | alero@uol.com.br              |            5 |
|         14 | Mark      | Philips     |                                            Telus | 8210 111 ST NW                       | Edmonton            |    AB | Canada         | T6G 2C7    | +1 (780) 434-4554   |  +1 (780) 434-5565 | mphilips12@shaw.ca            |            5 |
|         31 | Martha    | Silk        |                                             None | 194A Chain Lake Drive                | Halifax             |    NS | Canada         | B3S 1C5    | +1 (902) 450-0450   |               None | marthasilk@gmail.com          |            5 |
|          3 | François  | Tremblay    |                                             None | 1498 rue Bélanger                    | Montréal            |    QC | Canada         | H2G 1A7    | +1 (514) 721-4711   |               None | ftremblay@gmail.com           |            3 |
|         30 | Edward    | Francis     |                                             None | 230 Elgin Street                     | Ottawa              |    ON | Canada         | K2P 1L7    | +1 (613) 234-3322   |               None | edfrancis@yachoo.ca           |            3 |
|         29 | Robert    | Brown       |                                             None | 796 Dundas Street West               | Toronto             |    ON | Canada         | M6J 1V1    | +1 (416) 363-8888   |               None | robbrown@shaw.ca              |            3 |
|         15 | Jennifer  | Peterson    |                                    Rogers Canada | 700 W Pender Street                  | Vancouver           |    BC | Canada         | V6C 1G8    | +1 (604) 688-2255   |  +1 (604) 688-8756 | jenniferp@rogers.ca           |            3 |
|         32 | Aaron     | Mitchell    |                                             None | 696 Osborne Street                   | Winnipeg            |    MB | Canada         | R3L 2B9    | +1 (204) 452-6452   |               None | aaronmitchell@yahoo.ca        |            4 |
|         33 | Ellie     | Sullivan    |                                             None | 5112 48 Street                       | Yellowknife         |    NT | Canada         | X1A 1N6    | +1 (867) 920-2233   |               None | ellie.sullivan@shaw.ca        |            3 |
|         57 | Luis      | Rojas       |                                             None | Calle Lira, 198                      | Santiago            |  None | Chile          | None       | +56 (0)2 635 4444   |               None | luisrojas@yahoo.cl            |            5 |
|          5 | František | Wichterlová |                                 JetBrains s.r.o. | Klanova 9/506                        | Prague              |  None | Czech Republic | 14700      | +420 2 4172 5555    |   +420 2 4172 5555 | frantisekw@jetbrains.com      |            4 |
|          6 | Helena    | Holý        |                                             None | Rilská 3174/6                        | Prague              |  None | Czech Republic | 14300      | +420 2 4177 0449    |               None | hholy@gmail.com               |            5 |
|          9 | Kara      | Nielsen     |                                             None | Sønder Boulevard 51                  | Copenhagen          |  None | Denmark        | 1720       | +453 3331 9991      |               None | kara.nielsen@jubii.dk         |            4 |
|         44 | Terhi     | Hämäläinen  |                                             None | Porthaninkatu 9                      | Helsinki            |  None | Finland        | 00530      | +358 09 870 2000    |               None | terhi.hamalainen@apple.fi     |            3 |
|         42 | Wyatt     | Girard      |                                             None | 9, Place Louis Barthou               | Bordeaux            |  None | France         | 33000      | +33 05 56 96 96 96  |               None | wyatt.girard@yahoo.fr         |            3 |
|         43 | Isabelle  | Mercier     |                                             None | 68, Rue Jouvence                     | Dijon               |  None | France         | 21000      | +33 03 80 73 66 99  |               None | isabelle_mercier@apple.fr     |            3 |
|         41 | Marc      | Dubois      |                                             None | 11, Place Bellecour                  | Lyon                |  None | France         | 69002      | +33 04 78 30 30 30  |               None | marc.dubois@hotmail.com       |            5 |
+------------+-----------+-------------+--------------------------------------------------+--------------------------------------+---------------------+-------+----------------+------------+---------------------+--------------------+-------------------------------+--------------+
(Output limit exceeded, 25 of 59 total rows shown)
```

## ORDER BY

Database tables are often very complicated, and this is where other SQL keywords come in handy. <var>ORDER BY</var> is an important keyword for organizing the data you extract from a table.

<var>ORDER BY</var> sequences the records returned by a query based on a specified column or columns. This can be in either ascending or descending order.

### **Sorting in ascending order**

To use the <var>ORDER BY</var> keyword, write it at the end of the query and specify a column to base the sort on. In this example, SQL will return the <var>customerid</var>, <var>city</var>, and <var>country</var> columns from the <var>customers</var> table, and the records will be sequenced by the <var>city</var> column:

SELECT customerid, city, country  
FROM customers  
ORDER BY city;

```
+------------+--------------+----------------+
| CustomerId | City         | Country        |
+------------+--------------+----------------+
|         48 | Amsterdam    | Netherlands    |
|         59 | Bangalore    | India          |
|         36 | Berlin       | Germany        |
|         38 | Berlin       | Germany        |
|         42 | Bordeaux     | France         |
|         23 | Boston       | USA            |
|         13 | Brasília     | Brazil         |
|          8 | Brussels     | Belgium        |
|         45 | Budapest     | Hungary        |
|         56 | Buenos Aires | Argentina      |
|         24 | Chicago      | USA            |
|          9 | Copenhagen   | Denmark        |
|         19 | Cupertino    | USA            |
|         58 | Delhi        | India          |
|         43 | Dijon        | France         |
|         46 | Dublin       | Ireland        |
|         54 | Edinburgh    | United Kingdom |
|         14 | Edmonton     | Canada         |
|         26 | Fort Worth   | USA            |
|         37 | Frankfurt    | Germany        |
|         31 | Halifax      | Canada         |
|         44 | Helsinki     | Finland        |
|         34 | Lisbon       | Portugal       |
|         52 | London       | United Kingdom |
|         53 | London       | United Kingdom |
+------------+--------------+----------------+
(Output limit exceeded, 25 of 59 total rows shown)
```

The <var>ORDER BY</var> keyword sorts the records based on the column specified after this keyword. By default, as shown in this example, the sequence will be in ascending order. This means

- if you choose a column containing numeric data, it sorts the output from the smallest to largest. For example, if sorting on <var>customerid</var>, the ID numbers are sorted from smallest to largest.
- if the column contains alphabetic characters, such as in the example with the <var>city</var> column, it orders the records from the beginning of the alphabet to the end.

### **Sorting in descending order**

You can also use the <var>ORDER BY</var> with the <var>DESC</var> keyword to sort in descending order. The <var>DESC</var> keyword is short for "descending" and tells SQL to sort numbers from largest to smallest, or alphabetically from Z to A. This can be done by following <var>ORDER BY</var> with the <var>DESC</var> keyword. For example, you can run this query to examine how the results differ when <var>DESC</var> is applied:

SELECT customerid, city, country  
FROM customers  
ORDER BY city DESC;

```
+------------+---------------------+----------------+
| CustomerId | City                | Country        |
+------------+---------------------+----------------+
|         33 | Yellowknife         | Canada         |
|         32 | Winnipeg            | Canada         |
|         49 | Warsaw              | Poland         |
|          7 | Vienne              | Austria        |
|         15 | Vancouver           | Canada         |
|         27 | Tucson              | USA            |
|         29 | Toronto             | Canada         |
|         10 | São Paulo           | Brazil         |
|         11 | São Paulo           | Brazil         |
|          1 | São José dos Campos | Brazil         |
|          2 | Stuttgart           | Germany        |
|         51 | Stockholm           | Sweden         |
|         55 | Sidney              | Australia      |
|         57 | Santiago            | Chile          |
|         28 | Salt Lake City      | USA            |
|         47 | Rome                | Italy          |
|         12 | Rio de Janeiro      | Brazil         |
|         21 | Reno                | USA            |
|         17 | Redmond             | USA            |
|          5 | Prague              | Czech Republic |
|          6 | Prague              | Czech Republic |
|         35 | Porto               | Portugal       |
|         39 | Paris               | France         |
|         40 | Paris               | France         |
|         30 | Ottawa              | Canada         |
+------------+---------------------+----------------+
(Output limit exceeded, 25 of 59 total rows shown)
```

Now, cities at the end of the alphabet are listed first.

### **Sorting based on multiple columns**

You can also choose multiple columns to order by. For example, you might first choose the <var>country</var> and then the <var>city</var> column. SQL then sorts the output by <var>country</var>, and for rows with the same <var>country</var>, it sorts them based on <var>city</var>. You can run this to explore how SQL displays this:

SELECT customerid, city, country  
FROM customers  
ORDER BY country, city;

```
+------------+---------------------+----------------+
| CustomerId | City                | Country        |
+------------+---------------------+----------------+
|         56 | Buenos Aires        | Argentina      |
|         55 | Sidney              | Australia      |
|          7 | Vienne              | Austria        |
|          8 | Brussels            | Belgium        |
|         13 | Brasília            | Brazil         |
|         12 | Rio de Janeiro      | Brazil         |
|          1 | São José dos Campos | Brazil         |
|         10 | São Paulo           | Brazil         |
|         11 | São Paulo           | Brazil         |
|         14 | Edmonton            | Canada         |
|         31 | Halifax             | Canada         |
|          3 | Montréal            | Canada         |
|         30 | Ottawa              | Canada         |
|         29 | Toronto             | Canada         |
|         15 | Vancouver           | Canada         |
|         32 | Winnipeg            | Canada         |
|         33 | Yellowknife         | Canada         |
|         57 | Santiago            | Chile          |
|          5 | Prague              | Czech Republic |
|          6 | Prague              | Czech Republic |
|          9 | Copenhagen          | Denmark        |
|         44 | Helsinki            | Finland        |
|         42 | Bordeaux            | France         |
|         43 | Dijon               | France         |
|         41 | Lyon                | France         |
+------------+---------------------+----------------+
(Output limit exceeded, 25 of 59 total rows shown)
```

## Key takeaways

<var>SELECT</var> and <var>FROM</var> are important keywords in SQL queries. You use <var>SELECT</var> to indicate which columns to return and <var>FROM</var> to indicate which table to query. You can also include <var>ORDER BY</var> in your query to organize the output. These foundational SQL skills will support you as you move into more advanced queries.

# find table name and comumns definintion for SQL and variences

<div class="flex flex-grow flex-col gap-3" id="bkmrk-standard-sql%3A-for-da"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="empty:hidden">  
</div><div class="empty:hidden">**Standard SQL:**</div><div class="empty:hidden">For databases that support the ANSI SQL standard and have the `INFORMATION_SCHEMA` views available, you can use the following query:</div></div></div>```sql
SELECT table_name, column_name
FROM information_schema.columns;
```

<div class="flex flex-grow flex-col gap-3" id="bkmrk-you-can-append-if-yo"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="empty:hidden">you can append if you want to specify where  
</div></div></div>```sql
WHERE table_schema = 'your_database_name'; 
```

<div class="flex flex-grow flex-col gap-3" id="bkmrk-if-you-want-database"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="empty:hidden">if you want **Database-specific Queries:** If you are working with a specific database system and the standard SQL approach doesn't work, you can try the following methods:</div></div></div>**MySQL/MariaDB:**

```mysql
SELECT table_name, column_name
FROM information_schema.columns;
```

<div class="flex flex-grow flex-col gap-3" id="bkmrk-or"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="empty:hidden">**or**</div></div></div>```mysql
SHOW TABLES;
DESCRIBE table_name;
```

<div class="flex flex-grow flex-col gap-3" id="bkmrk-postgresql%3A"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="empty:hidden">**PostgreSQL:**</div></div></div>```sql
 SELECT table_name, column_name
FROM information_schema.columns;
```

<div class="flex flex-grow flex-col gap-3" id="bkmrk-sqlite%3A"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="empty:hidden">**SQLite:**</div><div class="empty:hidden"><div class="empty:hidden">  
</div><div class="empty:hidden">  
</div></div></div></div>```sqlite
SELECT name AS table_name, sql AS column_definition
FROM sqlite_master
WHERE type = 'table';
```

<div class="flex flex-grow flex-col gap-3" id="bkmrk-you-would-run-this-s"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="empty:hidden"><div class="empty:hidden">  
</div></div><div class="empty:hidden">  
</div><div class="empty:hidden">You would run this SQLite command when you want to list all the tables in your SQLite database along with their SQL schema.</div></div></div>SQLite keeps a system table, `sqlite_master`, where it stores metadata about the database. Each row of `sqlite_master` represents an object (table, index, etc.) in the database.

The columns are:

<div class="flex flex-grow flex-col gap-3" id="bkmrk-type%3A-the-type-of-th"><div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4"><div class="markdown prose w-full break-words dark:prose-invert light">- type: the type of the database object, such as 'table' or 'index'.
- name: the name of the object.
- tbl\_name: the name of the table to which the object is associated. For a table, it's the same as `name`.
- rootpage: the page number in the database file where the root B-tree page for the object is stored.
- sql: the SQL statement that created the object.

</div></div></div>This command specifies `type = 'table'` in the `WHERE` clause, so it only selects tables, not other types of objects like indices. For each table, it selects the name (renamed as `table_name` for clarity) and the SQL statement that created the table (as `column_definition`).

So this command is useful when you need to know the structure of all tables in your SQLite database, such as the table names and their corresponding column definitions. It's a handy tool for exploring a database when you don't have the schema in front of you or when you've inherited a database and need to understand its structure.

# Basic filters on SQL queries

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-one-of-the-most-powe"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from One of the most powerful features of SQL is its ability to filter." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">One of the most powerful features of SQL is its ability to filter. </span></div><div aria-label="toggle video from In this video, we're going to learn how this helps us make better queries and" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this video, we're going to learn how this helps us make better queries and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">select more specific pieces of data from a database. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-filtering-is-selecti"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Filtering is selecting data that match a certain condition." class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Filtering is selecting data that match a certain condition. </span></div><div aria-label="toggle video from Think of filtering as a way of only choosing the data we want." class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Think of filtering as a way of only choosing the data we want. </span></div><div aria-label="toggle video from Let's say we wanted to select apples from a fruit cart." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's say we wanted to select apples from a fruit cart. </span></div><div aria-label="toggle video from Filtering allows us to specify what kind of apples we want to choose." class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Filtering allows us to specify what kind of apples we want to choose. </span></div><div aria-label="toggle video from When we go buy apples, we might explicitly say, "Choose only apples that are fresh."" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we go buy apples, we might explicitly say, "Choose only apples that are fresh." </span></div><div aria-label="toggle video from This removes apples that aren't fresh from the selection." class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This removes apples that aren't fresh from the selection. </span></div><div aria-label="toggle video from This is a filter!" class="rc-Phrase css-ugczj4" data-cue="10" data-cue-index="9" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is a filter! </span></div><div aria-label="toggle video from As a security analyst, you might filter a log-in attempts table to find all attempts" class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As a security analyst, you might filter a log-in attempts table to find all attempts </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">from a specific country. </span></div><div aria-label="toggle video from This could be done by applying a filter on the country column." class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This could be done by applying a filter on the country column. </span></div><div aria-label="toggle video from current lecture segment: For example, you could filter to just return records containing Canada." class="rc-Phrase active css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, you could filter to just return records containing Canada. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-before-we-get-starte"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Before we get started, we need to focus on an important part of the syntax of SQL." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Before we get started, we need to focus on an important part of the syntax of SQL. </span></div><div aria-label="toggle video from Let's learn about operators." class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's learn about operators. </span></div><div aria-label="toggle video from An operator is a symbol or keyword that represents an operation." class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">An operator is a symbol or keyword that represents an operation. </span></div><div aria-label="toggle video from An example of an operator would be the equal to operator." class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">An example of an operator would be the equal to operator. </span></div><div aria-label="toggle video from For example, if we wanted to find all records that" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, if we wanted to find all records that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">have USA in the country column, we use country = 'USA' </span></div><div aria-label="toggle video from For example, if we wanted to find all records that" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To filter a query in SQL, we simply add an extra line to the SELECT and FROM </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">statement we used before. </span></div><div aria-label="toggle video from This extra line will use a WHERE clause." class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This extra line will use a WHERE clause. </span></div><div aria-label="toggle video from In SQL, WHERE indicates the condition for a filter." class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In SQL, WHERE indicates the condition for a filter. </span></div><div aria-label="toggle video from After the keyword WHERE, the specific condition is listed using operators." class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">After the keyword WHERE, the specific condition is listed using operators. </span></div><div aria-label="toggle video from So if we wanted to find all of the login attempts made in the United States," class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So if we wanted to find all of the login attempts made in the United States, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we would create this filter. </span></div><div aria-label="toggle video from In this particular condition, we're indicating to return all records that" class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this particular condition, we're indicating to return all records that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">have a value in the country column that is equal to USA. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-try-putting-it"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's try putting it all together in SQL." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's try putting it all together in SQL. </span></div><div aria-label="toggle video from We're going to start with selecting all the columns from the" class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We're going to start with selecting all the columns from the </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">log\_in\_attempts table. And then add the WHERE filter. </span></div><div aria-label="toggle video from Don't forget the semicolon!" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Don't forget the semicolon! </span></div><div aria-label="toggle video from This tells us we finished the SQL statement." class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This tells us we finished the SQL statement. </span></div><div aria-label="toggle video from Now, let's run this query! Because of our filter, only the rows" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, let's run this query! Because of our filter, only the rows </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">where the country of the log-in attempt was USA are returned. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-in-the-previous-exam"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In the previous example, the condition for our filter was based simply on returning" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the previous example, the condition for our filter was based simply on returning </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">records that are equal to a particular value. </span></div><div aria-label="toggle video from We can also make our conditions more complex by searching for" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We can also make our conditions more complex by searching for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a pattern instead of an exact word. </span></div><div aria-label="toggle video from For example, in the employees table, we have a column for office." class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, in the employees table, we have a column for office. </span></div><div aria-label="toggle video from We could search for records in this column that match a certain pattern." class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We could search for records in this column that match a certain pattern. </span></div><div aria-label="toggle video from Perhaps we might want all offices in the East building." class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Perhaps we might want all offices in the East building. </span></div><div aria-label="toggle video from To search for a pattern, we used the percentage sign to act as a wildcard for" class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To search for a pattern, we used the percentage sign to act as a wildcard for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">unspecified characters. </span></div><div aria-label="toggle video from If we ran a filter for 'East%', this would return all records that start with East --" class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If we ran a filter for 'East%', this would return all records that start with East -- </span></div><div aria-label="toggle video from for example, the offices East-120, East-290, and East-435." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">for example, the offices East-120, East-290, and East-435. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-when-searching-for-p"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from When searching for patterns with the percentage sign," class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When searching for patterns with the percentage sign, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we cannot use the equals operator. </span></div><div aria-label="toggle video from Instead, we use another operator, LIKE." class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Instead, we use another operator, LIKE. </span></div><div aria-label="toggle video from LIKE is an operator used with WHERE to search for a pattern in a column." class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">LIKE is an operator used with WHERE to search for a pattern in a column. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-since-like-is-an-ope"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Since LIKE is an operator, similar to the equal sign," class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since LIKE is an operator, similar to the equal sign, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we use it instead of the equal sign. </span></div><div aria-label="toggle video from So, when our goal is to return all values in the office column that start with the word" class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So, when our goal is to return all values in the office column that start with the word </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">East, LIKE would appear in a WHERE clause. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-go-back-to-the"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's go back to the example in which we wanted to filter for" class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's go back to the example in which we wanted to filter for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">log-in attempts made in the United States. </span></div><div aria-label="toggle video from Imagine that we realize that our database contains inconsistencies with how" class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Imagine that we realize that our database contains inconsistencies with how </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the United States is represented. </span></div><div aria-label="toggle video from Some entries use US while others use USA." class="rc-Phrase css-ugczj4" data-cue="60" data-cue-index="59" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Some entries use US while others use USA. </span></div><div aria-label="toggle video from Let's get into SQL and apply this new type of filter with LIKE." class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's get into SQL and apply this new type of filter with LIKE. </span></div><div aria-label="toggle video from We're going to start with the same first two lines of" class="rc-Phrase css-ugczj4" data-cue="62" data-cue-index="61" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We're going to start with the same first two lines of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">code because we want to select all columns from the log-in attempts table. </span></div><div aria-label="toggle video from And we're going to add a filter with LIKE so that records will be returned if" class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And we're going to add a filter with LIKE so that records will be returned if </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">they contain a value in the country column beginning with the characters US. </span></div><div aria-label="toggle video from This includes both US and USA." class="rc-Phrase css-ugczj4" data-cue="66" data-cue-index="65" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This includes both US and USA. </span></div><div aria-label="toggle video from Let's run this query to check if the output changes. This returns all" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's run this query to check if the output changes. This returns all </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the entries where the user location was in the United States. </span></div><div aria-label="toggle video from And now we can use the LIKE clause to filter columns based on a pattern!" class="rc-Phrase css-ugczj4" data-cue="69" data-cue-index="68" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And now we can use the LIKE clause to filter columns based on a pattern! </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--7"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-wow%2C-we%27ve-already-l"><div aria-label="toggle video from Wow, we've already learned how to get very precise with our database and" class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Wow, we've already learned how to get very precise with our database and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">get exactly the data we need with one single query. </span></div><div aria-label="toggle video from I'm excited for what's next!" class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I'm excited for what's next! </span></div></div>

# The WHERE clause and basic operators

Previously, you focused on how to refine your SQL queries by using the <var>WHERE</var> clause to filter results. In this reading, you’ll further explore how to use the <var>WHERE</var> clause, the <var>LIKE</var> operator and the percentage sign (<var>%</var>) wildcard. You’ll also be introduced to the underscore (<var>\_</var>), another wildcard that can help you filter queries.

## How filtering helps

As a security analyst, you'll often be responsible for working with very large and complicated security logs. To find the information you need, you'll often need to use SQL to filter the logs.

In a cybersecurity context, you might use filters to find the login attempts of a specific user or all login attempts made at the time of a security issue. As another example, you might filter to find the devices that are running a specific version of an application.

## WHERE 

To create a filter in SQL, you need to use the keyword <var>WHERE</var>. <var>WHERE</var> indicates the condition for a filter.

If you needed to email employees with a title of IT Staff, you might use a query like the one in the following example. You can run this example to examine what it returns:

---

```sql
SELECT firstname, lastname, title, email
FROM employees
WHERE title = 'IT Staff';
```

---

```
+-----------+----------+----------+------------------------+
| FirstName | LastName | Title    | Email                  |
+-----------+----------+----------+------------------------+
| Robert    | King     | IT Staff | robert@chinookcorp.com |
| Laura     | Callahan | IT Staff | laura@chinookcorp.com  |
+-----------+----------+----------+------------------------+
```

---

Rather than returning all records in the <var>employees</var> table, this <var>WHERE</var> clause instructs SQL to return only those that contain <var>'IT Staff'</var> in the <var>title</var> column. It uses the equals sign (<var>=</var>) operator to set this condition.

**Note:** You should place the semicolon (<var>;</var>) where the query ends. When you add a filter to a basic query, the semicolon is after the filter.

## Filtering for patterns

You can also filter based on a pattern. For example, you can identify entries that start or end with a certain character or characters. Filtering for a pattern requires incorporating two more elements into your <var>WHERE</var> clause:

- a wildcard
- the <var>LIKE</var> operator

### **Wildcards**

A **wildcard** is a special character that can be substituted with any other character. Two of the most useful wildcards are the percentage sign (<var>%</var>) and the underscore (<var>\_</var>):

- The percentage sign substitutes for any number of other characters.
- The underscore symbol only substitutes for one other character.

These wildcards can be placed after a string, before a string, or in both locations depending on the pattern you’re filtering for.

The following table includes these wildcards applied to the string <var>'a'</var> and examples of what each pattern would return.

<div class="css-1yr0py9" id="bkmrk-pattern-results-that"><table><thead><tr><th scope="col">**Pattern**

</th><th scope="col">**Results that could be returned**

</th></tr></thead><tbody><tr><td><var>'a%'</var>

</td><td><var>apple123, art, a</var>

</td></tr><tr><td><var>'a\_'</var>

</td><td><var>as, an, a7</var>

</td></tr><tr><td><var>'a\_\_' </var>

</td><td><var>ant, add, a1c</var>

</td></tr><tr><td><var>'%a'</var>

</td><td><var>pizza, Z6ra, a</var>

</td></tr><tr><td><var>'\_a'</var>

</td><td><var>ma, 1a, Ha</var>

</td></tr><tr><td><var>'%a%'</var>

</td><td><var>Again, back, a</var>

</td></tr><tr><td><var>'\_a\_'</var>

</td><td><var>Car, ban, ea7</var>

</td></tr></tbody></table>

</div>### **LIKE**

To apply wildcards to the filter, you need to use the <var>LIKE</var> operator instead of an equals sign (<var>=</var>). <var>LIKE</var> is used with <var>WHERE</var> to search for a pattern in a column.

For instance, if you want to email employees with a title of either <var>'IT Staff'</var> or <var>'IT Manager'</var>, you can use <var>LIKE</var> operator combined with the <var>%</var> wildcard:

---

```sql
SELECT lastname, firstname, title, email
FROM employees
WHERE title LIKE 'IT%';
```

---

```
+----------+-----------+------------+-------------------------+
| LastName | FirstName | Title      | Email                   |
+----------+-----------+------------+-------------------------+
| Mitchell | Michael   | IT Manager | michael@chinookcorp.com |
| King     | Robert    | IT Staff   | robert@chinookcorp.com  |
| Callahan | Laura     | IT Staff   | laura@chinookcorp.com   |
+----------+-----------+------------+-------------------------+
```

---

This query returns all records with values in the <var>title</var> column that start with the pattern of <var>'IT'</var>. This means both <var>'IT Staff'</var> and <var>'IT Manager'</var> are returned.

As another example, if you want to search through the invoices table to find all customers located in states with an abbreviation of <var>'NY'</var>, <var>'NV'</var>, <var>'NS'</var> or <var>'NT'</var>, you can use the <var>'N\_'</var> pattern on the <var>state</var> column:

---

```sql
SELECT firstname,lastname, state, country
FROM customers
WHERE state LIKE 'N_';
```

---

```
+-----------+----------+-------+---------+
| FirstName | LastName | State | Country |
+-----------+----------+-------+---------+
| Michelle  | Brooks   | NY    | USA     |
| Kathy     | Chase    | NV    | USA     |
| Martha    | Silk     | NS    | Canada  |
| Ellie     | Sullivan | NT    | Canada  |
+-----------+----------+-------+---------+
```

---

This returns all the records with state abbreviations that follow this pattern.

## Key takeaways

Filters are important when refining what your query returns. <var>WHERE</var> is an essential keyword for adding a filter to your query. You can also filter for patterns by combining the <var>LIKE</var> operator with the percentage sign (<var>%</var>) and the underscore (<var>\_</var>) wildcards.

# Filter dates and numbers

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-in-this-video%2C-we%27re"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from current lecture segment: In this video, we're going to continue using SQL queries and filters," class="rc-Phrase active css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this video, we're going to continue using SQL queries and filters, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but now we're going to apply them to new data types. </span></div><div aria-label="toggle video from First, let's explore the three common data types that you will find in databases:" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, let's explore the three common data types that you will find in databases: </span></div><div aria-label="toggle video from string, numeric, and date and time." class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">string, numeric, and date and time. </span></div><div aria-label="toggle video from String data is data consisting of an ordered sequence of characters." class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">String data is data consisting of an ordered sequence of characters. </span></div><div aria-label="toggle video from These characters could be numbers, letters, or symbols." class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">These characters could be numbers, letters, or symbols. </span></div><div aria-label="toggle video from For example, you'll encounter string data in user names," class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, you'll encounter string data in user names, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">such as a user name: analyst10. </span></div><div aria-label="toggle video from Numeric data is data consisting of numbers," class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Numeric data is data consisting of numbers, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">such as a count of log-in attempts. </span></div><div aria-label="toggle video from Unlike strings, mathematical operations can be used on numeric data," class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Unlike strings, mathematical operations can be used on numeric data, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">like multiplication or addition. </span></div><div aria-label="toggle video from Date and time data refers to data representing a date and/or time." class="rc-Phrase css-ugczj4" data-cue="13" data-cue-index="12" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Date and time data refers to data representing a date and/or time. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-previously%2C-we-appli"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Previously, we applied filters using string data, but" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Previously, we applied filters using string data, but </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">now let's work with numeric and date and time data. </span></div><div aria-label="toggle video from As a security analyst, you'll often need to query numbers and dates." class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As a security analyst, you'll often need to query numbers and dates. </span></div><div aria-label="toggle video from For example, we could filter patch dates to find machines that need an update," class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, we could filter patch dates to find machines that need an update, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">or we could filter log-in attempts to return only </span></div><div aria-label="toggle video from those made in a certain period of time." class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">those made in a certain period of time. </span></div><div aria-label="toggle video from We learned about operators in the last video, and" class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We learned about operators in the last video, and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we're going to use them again for numbers and dates. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-common-operators-for"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Common operators for working with numeric or date and" class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Common operators for working with numeric or date and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">time data types include: equals, greater than, less than, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">not equal to, greater than or equal to, and less than or equal to. </span></div><div aria-label="toggle video from Let's say you want to find the log-in attempts made after 6 pm." class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's say you want to find the log-in attempts made after 6 pm. </span></div><div aria-label="toggle video from Because this is past normal business hours," class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Because this is past normal business hours, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you want to look for suspicious patterns. </span></div><div aria-label="toggle video from You can identify these attempts by using the greater than operator in your filter." class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You can identify these attempts by using the greater than operator in your filter. </span></div><div aria-label="toggle video from We'll start writing our query in SQL." class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll start writing our query in SQL. </span></div><div aria-label="toggle video from We begin by indicating that we want to select all columns FROM the" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We begin by indicating that we want to select all columns FROM the </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">log\_in\_attempts table. </span></div><div aria-label="toggle video from Then we'll add our filter with WHERE." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then we'll add our filter with WHERE. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-our-condition-indica"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Our condition indicates that the value in the time column must be greater than, or" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Our condition indicates that the value in the time column must be greater than, or </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">for dates and times, later than '18:00', which is how 6 pm is written in SQL. </span></div><div aria-label="toggle video from Let's run this and examine the output." class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's run this and examine the output. </span></div><div aria-label="toggle video from Perfect! Now we have a list of log-in attempts made after 6 pm." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Perfect! Now we have a list of log-in attempts made after 6 pm. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-we-can-also-filter-f"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We can also filter for numbers and dates by using the BETWEEN operator." class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We can also filter for numbers and dates by using the BETWEEN operator. </span></div><div aria-label="toggle video from BETWEEN is an operator that filters for numbers or dates within a range." class="rc-Phrase css-ugczj4" data-cue="38" data-cue-index="37" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">BETWEEN is an operator that filters for numbers or dates within a range. </span></div><div aria-label="toggle video from An example of this would be when looking for" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">An example of this would be when looking for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all patches installed within a certain range. </span></div><div aria-label="toggle video from Let's do this! Let's find all the patches installed between March 1st," class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's do this! Let's find all the patches installed between March 1st, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">2021 and September 1st, 2021. </span></div><div aria-label="toggle video from In our query, we start with selecting all records FROM the machines table." class="rc-Phrase css-ugczj4" data-cue="43" data-cue-index="42" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In our query, we start with selecting all records FROM the machines table. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-and-we-add-the-betwe"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from And we add the BETWEEN operator in the WHERE statement." class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And we add the BETWEEN operator in the WHERE statement. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-break-down-the"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's break down the statement." class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's break down the statement. </span></div><div aria-label="toggle video from First, after WHERE, we indicate which column to filter," class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, after WHERE, we indicate which column to filter, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in our case, OS\_patch\_date. </span></div><div aria-label="toggle video from Next, comes our operator BETWEEN." class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next, comes our operator BETWEEN. </span></div><div aria-label="toggle video from We then add the beginning of our range, type AND," class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We then add the beginning of our range, type AND, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">then finish by adding the end of our range and a semicolon. </span></div><div aria-label="toggle video from Now, let's run this and explore the output." class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, let's run this and explore the output. </span></div><div aria-label="toggle video from And now we have a list of all machines patched between those two dates!" class="rc-Phrase css-ugczj4" data-cue="52" data-cue-index="51" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And now we have a list of all machines patched between those two dates! </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-before-we-wrap-up%2C-a"><div aria-label="toggle video from Before we wrap up, an important thing to note is that when we filter for strings," class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Before we wrap up, an important thing to note is that when we filter for strings, </span></div><div aria-label="toggle video from dates, and times, we use quotation marks to specify what we're looking for." class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">dates, and times, we use quotation marks to specify what we're looking for. </span></div><div aria-label="toggle video from However, for numbers, we don't use quotation marks." class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">However, for numbers, we don't use quotation marks. </span></div><div aria-label="toggle video from With this new knowledge," class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">With this new knowledge, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you're now ready to work on all sorts of interesting filters for numbers and dates. </span></div><div aria-label="toggle video from In the next video, we'll be able to expand our filtering even further by" class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the next video, we'll be able to expand our filtering even further by </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">using multiple conditions in one query. </span></div></div>

# Operators for filtering dates and numbers

Previously, you examined operators like less than (<var>&lt;</var>) or greater than (<var>&gt;</var>) and explored how they can be used in filtering numeric and date and time data types. This reading summarizes what you learned and provides new examples of using operators in filters.

## Numbers, dates, and times in cybersecurity

Security analysts work with more than just **string data**, or data consisting of an ordered sequence of characters.

They also frequently work with **numeric data**, or data consisting of numbers. A few examples of numeric data that you might encounter in your work as a security analyst include:

<div class="rc-CML" dir="auto" id="bkmrk-the-number-of-login-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- the number of login attempts
- the count of a specific type of log entry
- the volume of data being sent from a source
- the volume of data being sent to a destination

</div></div></div></div></div>You'll also encounter **date and time data**, or data representing a date and/or time. As a first example, logs will generally timestamp every record. Other time and date data might include:

<div class="rc-CML" dir="auto" id="bkmrk-login-dates-login-ti"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- login dates
- login times
- dates for patches
- the duration of a connection

</div></div></div></div></div>## Comparison operators

In SQL, filtering numeric and date and time data often involves operators. You can use the following operators in your filters to make sure you return only the rows you need:

<div class="rc-CML" dir="auto" id="bkmrk-operator-use-%3C-less-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div class="css-1yr0py9"><table><thead><tr><th scope="col">**operator**

</th><th scope="col">**use**

</th></tr></thead><tbody><tr><td><var>&lt;</var>

</td><td>less than

</td></tr><tr><td><var>&gt;</var>

</td><td>greater than

</td></tr><tr><td><var>=</var>

</td><td>equal to

</td></tr><tr><td><var>&lt;=</var>

</td><td>less than or equal to

</td></tr><tr><td><var>&gt;=</var>

</td><td>greater than or equal to

</td></tr><tr><td><var>&lt;&gt;</var>

</td><td>not equal to

</td></tr></tbody></table>

</div></div></div></div></div></div>**Note:** You can also use <var>!=</var> as an alternative operator for not equal to.

### Incorporating operators into filters

These comparison operators are used in the <var>WHERE</var> clause at the end of a query. The following query uses the <var>&gt;</var> operator to filter the <var>birthdate</var> column. You can run this query to explore its output:

---

```sqlite
SELECT firstname, lastname, birthdate
FROM employees
WHERE birthdate > '1970-01-01';
```

---

```
+-----------+----------+---------------------+
| FirstName | LastName | BirthDate           |
+-----------+----------+---------------------+
| Jane      | Peacock  | 1973-08-29 00:00:00 |
| Michael   | Mitchell | 1973-07-01 00:00:00 |
| Robert    | King     | 1970-05-29 00:00:00 |
+-----------+----------+---------------------+
```

---

This query returns the first and last names of employees born after, but not on, <var>'1970-01-01'</var> (or January 1, 1970). If you were to use the <var>&gt;=</var> operator instead, the results would also include results on exactly <var>'1970-01-01'</var>.

In other words, the <var>&gt;</var> operator is exclusive and the <var>&gt;=</var> operator is inclusive. An **exclusive operator** is an operator that does not include the value of comparison. An **inclusive operator** is an operator that includes the value of comparison.

### **BETWEEN**

Another operator used for numeric data as well as date and time data is the <var>BETWEEN</var> operator. <var>BETWEEN</var> filters for numbers or dates within a range. For example, if you want to find the first and last names of all employees hired between January 1, 2002 and January 1, 2003, you can use the <var>BETWEEN</var> operator as follows:

---

```
SELECT firstname, lastname, hiredate
FROM employees
WHERE hiredate BETWEEN '2002-01-01' AND '2003-01-01';
```

---

```
+-----------+----------+---------------------+
| FirstName | LastName | HireDate            |
+-----------+----------+---------------------+
| Andrew    | Adams    | 2002-08-14 00:00:00 |
| Nancy     | Edwards  | 2002-05-01 00:00:00 |
| Jane      | Peacock  | 2002-04-01 00:00:00 |
+-----------+----------+---------------------+
```

---

**Note:** The <var>BETWEEN</var> operator is inclusive. This means records with a <var>hiredate</var> of January 1, 2002 or January 1, 2003 are included in the results of the previous query.

## Key takeaways

Operators are important when filtering numeric and date and time data. These include exclusive operators such as <var>&lt;</var> and inclusive operators such as <var>&lt;=</var>. The <var>BETWEEN</var> operator, another inclusive operator, helps you return the data you need within a range.

# Filters with AND, OR, and NOT

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-in-the-previous-less"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from In the previous lesson," class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the previous lesson, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we learned about even more ways to filter queries in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">SQL to work with some typical security analyst tasks. </span></div><div aria-label="toggle video from However, when working with real security questions," class="rc-Phrase css-ugczj4" data-cue="4" data-cue-index="3" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">However, when working with real security questions, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we often have to filter for multiple conditions. </span></div><div aria-label="toggle video from current lecture segment: Vulnerabilities, for instance," class="rc-Phrase active css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Vulnerabilities, for instance, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">might depend on more than one factor. </span></div><div aria-label="toggle video from For example, a" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, a </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">security vulnerability might be related to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">machines using a specific email client </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">on a specific operating system. </span></div><div aria-label="toggle video from So, to find the possible vulnerabilities," class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So, to find the possible vulnerabilities, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we need to find machines using </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">both the email client and the operating system. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-to-make-a-query-with"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from To make a query with" class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To make a query with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">multiple conditions that must be met, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we use the AND operator between two separate conditions. </span></div><div aria-label="toggle video from AND is an operator that specifies that" class="rc-Phrase css-ugczj4" data-cue="18" data-cue-index="17" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">AND is an operator that specifies that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">both conditions must be met simultaneously. </span></div><div aria-label="toggle video from Bringing this back to our fruit and vegetable analogy," class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Bringing this back to our fruit and vegetable analogy, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this is the same as asking someone to select apples from </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the big box where the apples are large and fresh. </span></div><div aria-label="toggle video from This means our results won't include any small apples" class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This means our results won't include any small apples </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">even if they're fresh, or </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">any rotten apples even if they're large. </span></div><div aria-label="toggle video from They'll only include large fresh apples." class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">They'll only include large fresh apples. </span></div><div aria-label="toggle video from The apples must meet both conditions." class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The apples must meet both conditions. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-going-back-to-our-da"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Going back to our database," class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Going back to our database, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the machines table lists </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all operating systems and email clients. </span></div><div aria-label="toggle video from We want a list of machines running Operating System" class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We want a list of machines running Operating System </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">1 and a list of machines using Email Client 1. </span></div><div aria-label="toggle video from We'll use the left and right circles in" class="rc-Phrase css-ugczj4" data-cue="33" data-cue-index="32" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll use the left and right circles in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the Venn diagram to represent these groups. </span></div><div aria-label="toggle video from We need SQL to select the machines that" class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We need SQL to select the machines that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">have both OS 1 and Email Client 1. </span></div><div aria-label="toggle video from The filled-in area at the intersection of" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The filled-in area at the intersection of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">these circles represents this condition. </span></div><div aria-label="toggle video from Let's take this and implement it in SQL." class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's take this and implement it in SQL. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-first%2C-we%27re-going-t"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from First, we're going to start by" class="rc-Phrase css-ugczj4" data-cue="40" data-cue-index="39" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we're going to start by </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">building the first lines of the query, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">telling SQL to SELECT\* </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all columns FROM the machines table. </span></div><div aria-label="toggle video from Then, we'll add the WHERE clause." class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then, we'll add the WHERE clause.   
</span></div><div aria-label="toggle video from Then, we'll add the WHERE clause." class="rc-Phrase css-ugczj4" data-cue="44" data-cue-index="43" role="button" tabindex="0"></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-examine-this-m"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's examine this more closely." class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's examine this more closely. </span></div><div aria-label="toggle video from First, we indicate" class="rc-Phrase css-ugczj4" data-cue="46" data-cue-index="45" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, we indicate </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the first condition that it must meet, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that the operating system column has a value of '0S 1' </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-then%2C-we-use-and-to-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Then, we use AND to join this to another condition." class="rc-Phrase css-ugczj4" data-cue="49" data-cue-index="48" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then, we use AND to join this to another condition. </span></div><div aria-label="toggle video from And finally, we enter the other condition," class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And finally, we enter the other condition, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in this case that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the email client column should </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">have a value of 'Email Client 1' </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-and-this-is-how-you-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from And this is how you use the AND operator in SQL!" class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And this is how you use the AND operator in SQL! </span></div><div aria-label="toggle video from Let's run this to get the query results." class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's run this to get the query results. </span></div><div aria-label="toggle video from Perfect! All the results match both our conditions!" class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Perfect! All the results match both our conditions! </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-keep-going-and"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's keep going and explore more ways to combine" class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's keep going and explore more ways to combine </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">different conditions by working with the OR operator. </span></div><div aria-label="toggle video from The OR operator is an operator that" class="rc-Phrase css-ugczj4" data-cue="59" data-cue-index="58" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The OR operator is an operator that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">specifies that either condition can be met. </span></div><div aria-label="toggle video from In a Venn diagram," class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In a Venn diagram, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's say each circle represents a condition. </span></div><div aria-label="toggle video from When they are joined with OR," class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When they are joined with OR, </span></div><div aria-label="toggle video from SQL would select all rows that" class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">SQL would select all rows that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">satisfy one of the conditions. </span></div><div aria-label="toggle video from And it's also ok if it meets both conditions." class="rc-Phrase css-ugczj4" data-cue="66" data-cue-index="65" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">And it's also ok if it meets both conditions. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--5"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-run-another-qu"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's run another query and use the OR operator." class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's run another query and use the OR operator. </span></div><div aria-label="toggle video from Let's say that we wanted the" class="rc-Phrase css-ugczj4" data-cue="68" data-cue-index="67" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's say that we wanted the </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">filter to identify machines that have </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">either OS 1 or OS 3 because both types need a patch. </span></div><div aria-label="toggle video from We'll type in these conditions." class="rc-Phrase css-ugczj4" data-cue="71" data-cue-index="70" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll type in these conditions. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--6"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-examine-this-m-1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's examine this more closely." class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's examine this more closely. </span></div><div aria-label="toggle video from After WHERE, our first condition indicates we want to" class="rc-Phrase css-ugczj4" data-cue="73" data-cue-index="72" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">After WHERE, our first condition indicates we want to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">filter, so that the query selects machines with 'OS 1' </span></div><div aria-label="toggle video from We use the OR operator because we also want" class="rc-Phrase css-ugczj4" data-cue="75" data-cue-index="74" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We use the OR operator because we also want </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to find records that match another condition. </span></div><div aria-label="toggle video from This additional condition is placed after OR and" class="rc-Phrase css-ugczj4" data-cue="77" data-cue-index="76" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This additional condition is placed after OR and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicates to also select machines running 'OS 3' </span></div><div aria-label="toggle video from Executing the query," class="rc-Phrase css-ugczj4" data-cue="79" data-cue-index="78" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Executing the query, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">our results now include records that have a value of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">either OS 1 or OS 3 in the operating system column. </span></div><div aria-label="toggle video from Good job, we're running some complex queries." class="rc-Phrase css-ugczj4" data-cue="82" data-cue-index="81" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Good job, we're running some complex queries. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--7"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-the-last-operator-we"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from The last operator we're going to go" class="rc-Phrase css-ugczj4" data-cue="83" data-cue-index="82" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The last operator we're going to go </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">into is the NOT operator. </span></div><div aria-label="toggle video from NOT negates a condition." class="rc-Phrase css-ugczj4" data-cue="85" data-cue-index="84" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">NOT negates a condition. </span></div><div aria-label="toggle video from In a diagram," class="rc-Phrase css-ugczj4" data-cue="86" data-cue-index="85" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In a diagram, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we can show this by selecting </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">every entry that does not match our condition. </span></div><div aria-label="toggle video from The condition is represented by the circle." class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The condition is represented by the circle. </span></div><div aria-label="toggle video from The filled-in portion outside" class="rc-Phrase css-ugczj4" data-cue="90" data-cue-index="89" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The filled-in portion outside </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the circle represents what gets returned. </span></div><div aria-label="toggle video from This is all data that does not match the condition." class="rc-Phrase css-ugczj4" data-cue="92" data-cue-index="91" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is all data that does not match the condition. </span></div><div aria-label="toggle video from For example, when picking out fruit," class="rc-Phrase css-ugczj4" data-cue="93" data-cue-index="92" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, when picking out fruit, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you can be looking for any fruit that is not an apple. </span></div><div aria-label="toggle video from That is a lot more efficient" class="rc-Phrase css-ugczj4" data-cue="95" data-cue-index="94" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That is a lot more efficient </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">than telling your friend you want </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a banana or an orange or a lime, and so on. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--8"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-suppose-you-wanted-t"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Suppose you wanted to update" class="rc-Phrase css-ugczj4" data-cue="98" data-cue-index="97" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Suppose you wanted to update </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all of the devices in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">your company except for the ones using OS 3. </span></div><div aria-label="toggle video from Bringing this into SQL," class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Bringing this into SQL, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we can write this query. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--9"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-we-place-not-after%C2%A0w"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We place NOT after" class="rc-Phrase css-ugczj4" data-cue="103" data-cue-index="102" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We place NOT after </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">WHERE and before the condition of the filter. </span></div><div aria-label="toggle video from Executing these queries gives us the list" class="rc-Phrase css-ugczj4" data-cue="105" data-cue-index="104" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Executing these queries gives us the list </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of all the machines that aren't running OS 3, and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">now we know which machines to update. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--10"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-that-was-a-lot-of-ne"><div aria-label="toggle video from That was a lot of new content that we just looked into," class="rc-Phrase css-ugczj4" data-cue="108" data-cue-index="107" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That was a lot of new content that we just looked into, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but you're learning more and more SQL that you </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">can use on your journey to become an analyst! </span></div><div aria-label="toggle video from In the next video," class="rc-Phrase css-ugczj4" data-cue="111" data-cue-index="110" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the next video, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll be learning how to combine and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">join two tables together to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">expand the kinds of queries we can run. I'll meet you there! </span></div></div>

# More on filters with AND, OR, and NOT

Previously, you explored how to add filters containing the <var>AND</var>, <var>OR</var>, and <var>NOT</var> operators to your SQL queries. In this reading, you'll continue to explore how these operators can help you refine your queries.

## Logical operators

<var>AND</var>, <var>OR</var>, and <var>NOT</var> allow you to filter your queries to return the specific information that will help you in your work as a security analyst. They are all considered logical operators.

### AND

First, <var>AND</var> is used to filter on two conditions. <var>AND</var> specifies that both conditions must be met simultaneously.

As an example, a cybersecurity concern might affect only those customer accounts that meet both the condition of being handled by a support representative with an ID of 5 and the condition of being located in the USA. To find the names and emails of those specific customers, you should place the two conditions on either side of the <var>AND</var> operator in the <var>WHERE</var> clause:

---

```sqlite
SELECT firstname, lastname, email, country, supportrepid
FROM customers
WHERE supportrepid = 5 AND country = 'USA';
```

---

```
+-----------+----------+-------------------------+---------+--------------+
| FirstName | LastName | Email                   | Country | SupportRepId |
+-----------+----------+-------------------------+---------+--------------+
| Jack      | Smith    | jacksmith@microsoft.com | USA     |            5 |
| Kathy     | Chase    | kachase@hotmail.com     | USA     |            5 |
| Victor    | Stevens  | vstevens@yahoo.com      | USA     |            5 |
| Julia     | Barnett  | jubarnett@gmail.com     | USA     |            5 |
+-----------+----------+-------------------------+---------+--------------+
```

---

Running this query returns four rows of information about the customers. You can use this information to contact them about the security concern.

### OR

The <var>OR</var> operator also connects two conditions, but <var>OR</var> specifies that either condition can be met. It returns results where the first condition, the second condition, or both are met.

For example, if you are responsible for finding all customers who are either in the USA or Canada so that you can communicate information about a security update, you can use an <var>OR</var> operator to find all the needed records. As the following query demonstrates, you should place the two conditions on either side of the <var>OR</var> operator in the <var>WHERE</var> clause:

---

```mysql
SELECT firstname, lastname, email, country
FROM customers
WHERE country = 'Canada' OR country = 'USA';
```

---

```
+-----------+----------+-------------------------+---------+--------------+
| FirstName | LastName | Email                   | Country | SupportRepId |
+-----------+----------+-------------------------+---------+--------------+
| Jack      | Smith    | jacksmith@microsoft.com | USA     |            5 |
| Kathy     | Chase    | kachase@hotmail.com     | USA     |            5 |
| Victor    | Stevens  | vstevens@yahoo.com      | USA     |            5 |
| Julia     | Barnett  | jubarnett@gmail.com     | USA     |            5 |
+-----------+----------+-------------------------+---------+--------------+
```

---

The query returns all customers in either the US or Canada.

**Note:** Even if both conditions are based on the same column, you need to write out both full conditions. For instance, the query in the previous example contains the filter <var>WHERE country = 'Canada' OR country = 'USA'</var>.

### NOT

Unlike the previous two operators, the <var>NOT</var> operator only works on a single condition, and not on multiple ones. The <var>NOT</var> operator negates a condition. This means that SQL returns all records that don’t match the condition specified in the query.

For example, if a cybersecurity issue doesn't affect customers in the USA but might affect those in other countries, you can return all customers who are not in the USA. This would be more efficient than creating individual conditions for all of the other countries. To use the <var>NOT</var> operator for this task, write the following query and place <var>NOT</var> directly after <var>WHERE</var>:

---

```sqlite
SELECT firstname, lastname, email, country
FROM customers
WHERE NOT country = 'USA';
```

---

```
+-----------+-------------+-------------------------------+----------------+
| FirstName | LastName    | Email                         | Country        |
+-----------+-------------+-------------------------------+----------------+
| Luís      | Gonçalves   | luisg@embraer.com.br          | Brazil         |
| Leonie    | Köhler      | leonekohler@surfeu.de         | Germany        |
| François  | Tremblay    | ftremblay@gmail.com           | Canada         |
| Bjørn     | Hansen      | bjorn.hansen@yahoo.no         | Norway         |
| František | Wichterlová | frantisekw@jetbrains.com      | Czech Republic |
| Helena    | Holý        | hholy@gmail.com               | Czech Republic |
| Astrid    | Gruber      | astrid.gruber@apple.at        | Austria        |
| Daan      | Peeters     | daan_peeters@apple.be         | Belgium        |
| Kara      | Nielsen     | kara.nielsen@jubii.dk         | Denmark        |
| Eduardo   | Martins     | eduardo@woodstock.com.br      | Brazil         |
| Alexandre | Rocha       | alero@uol.com.br              | Brazil         |
| Roberto   | Almeida     | roberto.almeida@riotur.gov.br | Brazil         |
| Fernanda  | Ramos       | fernadaramos4@uol.com.br      | Brazil         |
| Mark      | Philips     | mphilips12@shaw.ca            | Canada         |
| Jennifer  | Peterson    | jenniferp@rogers.ca           | Canada         |
| Robert    | Brown       | robbrown@shaw.ca              | Canada         |
| Edward    | Francis     | edfrancis@yachoo.ca           | Canada         |
| Martha    | Silk        | marthasilk@gmail.com          | Canada         |
| Aaron     | Mitchell    | aaronmitchell@yahoo.ca        | Canada         |
| Ellie     | Sullivan    | ellie.sullivan@shaw.ca        | Canada         |
| João      | Fernandes   | jfernandes@yahoo.pt           | Portugal       |
| Madalena  | Sampaio     | masampaio@sapo.pt             | Portugal       |
| Hannah    | Schneider   | hannah.schneider@yahoo.de     | Germany        |
| Fynn      | Zimmermann  | fzimmermann@yahoo.de          | Germany        |
| Niklas    | Schröder    | nschroder@surfeu.de           | Germany        |
+-----------+-------------+-------------------------------+----------------+
(Output limit exceeded, 25 of 46 total rows shown)
```

---

SQL returns every entry where the customers are not from the USA.

**Pro tip:** Another way of finding values that are not equal to a certain value is by using the <var>&lt;&gt;</var> operator or the <var>!=</var> operator. For example, <var>WHERE country &lt;&gt; 'USA'</var> and <var>WHERE country != 'USA'</var> are the same filters as <var>WHERE NOT country = 'USA'</var>.

## Combining logical operators

Logical operators can be combined in filters. For example, if you know that both the USA and Canada are not affected by a cybersecurity issue, you can combine operators to return customers in all countries besides these two. In the following query, <var>NOT</var> is placed before the first condition, it's joined to a second condition with <var>AND</var>, and then <var>NOT</var> is also placed before that second condition. You can run it to explore what it returns:

---

```sqlite
SELECT firstname, lastname, email, country
FROM customers
WHERE NOT country = 'Canada' AND NOT country = 'USA';
```

---

```
+-----------+-------------+-------------------------------+----------------+
| FirstName | LastName    | Email                         | Country        |
+-----------+-------------+-------------------------------+----------------+
| Luís      | Gonçalves   | luisg@embraer.com.br          | Brazil         |
| Leonie    | Köhler      | leonekohler@surfeu.de         | Germany        |
| Bjørn     | Hansen      | bjorn.hansen@yahoo.no         | Norway         |
| František | Wichterlová | frantisekw@jetbrains.com      | Czech Republic |
| Helena    | Holý        | hholy@gmail.com               | Czech Republic |
| Astrid    | Gruber      | astrid.gruber@apple.at        | Austria        |
| Daan      | Peeters     | daan_peeters@apple.be         | Belgium        |
| Kara      | Nielsen     | kara.nielsen@jubii.dk         | Denmark        |
| Eduardo   | Martins     | eduardo@woodstock.com.br      | Brazil         |
| Alexandre | Rocha       | alero@uol.com.br              | Brazil         |
| Roberto   | Almeida     | roberto.almeida@riotur.gov.br | Brazil         |
| Fernanda  | Ramos       | fernadaramos4@uol.com.br      | Brazil         |
| João      | Fernandes   | jfernandes@yahoo.pt           | Portugal       |
| Madalena  | Sampaio     | masampaio@sapo.pt             | Portugal       |
| Hannah    | Schneider   | hannah.schneider@yahoo.de     | Germany        |
| Fynn      | Zimmermann  | fzimmermann@yahoo.de          | Germany        |
| Niklas    | Schröder    | nschroder@surfeu.de           | Germany        |
| Camille   | Bernard     | camille.bernard@yahoo.fr      | France         |
| Dominique | Lefebvre    | dominiquelefebvre@gmail.com   | France         |
| Marc      | Dubois      | marc.dubois@hotmail.com       | France         |
| Wyatt     | Girard      | wyatt.girard@yahoo.fr         | France         |
| Isabelle  | Mercier     | isabelle_mercier@apple.fr     | France         |
| Terhi     | Hämäläinen  | terhi.hamalainen@apple.fi     | Finland        |
| Ladislav  | Kovács      | ladislav_kovacs@apple.hu      | Hungary        |
| Hugh      | O'Reilly    | hughoreilly@apple.ie          | Ireland        |
+-----------+-------------+-------------------------------+----------------+
(Output limit exceeded, 25 of 38 total rows shown)
```

---

## Key takeaways

Logical operators allow you to create more specific filters that target the security-related information you need. The <var>AND</var> operator requires two conditions to be true simultaneously, the <var>OR</var> operator requires either one or both conditions to be true, and the <var>NOT</var> operator negates a condition. Logical operators can be combined together to create even more specific queries.

# Join tables in SQL

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-you%27ve-already-learn"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from You've already learned a lot about" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You've already learned a lot about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">SQL queries and filters. Nice work! </span></div><div aria-label="toggle video from The last concept we're introducing in" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The last concept we're introducing in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this section is joining tables when querying a database. </span></div><div aria-label="toggle video from This is helpful when you need" class="rc-Phrase css-ugczj4" data-cue="5" data-cue-index="4" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is helpful when you need </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">information from two different tables in a database. </span></div><div aria-label="toggle video from Let's say we have two tables:" class="rc-Phrase css-ugczj4" data-cue="7" data-cue-index="6" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's say we have two tables: </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">one that tells us about security vulnerabilities of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">different operating systems, and one </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">about different machines in our company, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">including their operating systems. </span></div><div aria-label="toggle video from Having the ability to combine them" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Having the ability to combine them </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">gives us a list of vulnerable machines. </span></div><div aria-label="toggle video from That's pretty cool, right?" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">That's pretty cool, right? </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-first%2C-let%27s-start-t"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from First, let's start talking about the syntax of joins." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, let's start talking about the syntax of joins. </span></div><div aria-label="toggle video from Since we're working with two tables now," class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since we're working with two tables now, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we need a way to tell SQL </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">what table we're picking columns from. </span></div><div aria-label="toggle video from Since we're working with two tables now," class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In our example database, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we have an employee\_id column </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in both the employees table and the machines table. </span></div><div aria-label="toggle video from In SQL statements that contain two columns," class="rc-Phrase css-ugczj4" data-cue="22" data-cue-index="21" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In SQL statements that contain two columns, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">SQL needs to know which column we're referring to. </span></div><div aria-label="toggle video from The way to resolve this is by" class="rc-Phrase css-ugczj4" data-cue="24" data-cue-index="23" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The way to resolve this is by </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">writing the name of the table first, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">then a period, and then the name of a column. </span></div><div aria-label="toggle video from So, we would have employees followed by a period," class="rc-Phrase css-ugczj4" data-cue="27" data-cue-index="26" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So, we would have employees followed by a period, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">followed by the column name. </span></div><div aria-label="toggle video from This is the employee_id column for the employees table." class="rc-Phrase css-ugczj4" data-cue="29" data-cue-index="28" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is the employee\_id column for the employees table. </span></div><div aria-label="toggle video from Similarly, this is the employee_id column" class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Similarly, this is the employee\_id column </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">for the machines table. </span></div><div aria-label="toggle video from Now that we understand this syntax," class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now that we understand this syntax, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's apply it to a join! </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-imagine-that-we-want"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Imagine that we want to get" class="rc-Phrase css-ugczj4" data-cue="34" data-cue-index="33" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Imagine that we want to get </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a deeper understanding of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the employees accessing the machines in our company. </span></div><div aria-label="toggle video from By joining the employees and" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">By joining the employees and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the machines tables, we can do this! </span></div><div aria-label="toggle video from We first need to identify" class="rc-Phrase css-ugczj4" data-cue="39" data-cue-index="38" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We first need to identify </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the shared column that we'll </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">use to connect the two tables. </span></div><div aria-label="toggle video from In this case, we'll use a primary key and" class="rc-Phrase css-ugczj4" data-cue="42" data-cue-index="41" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this case, we'll use a primary key and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">one table to connect to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">another table where it's a foreign key. </span></div><div aria-label="toggle video from The primary key of the employees table is employee_id," class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The primary key of the employees table is employee\_id, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">which is a foreign key in the machines table. </span></div><div aria-label="toggle video from employee_id is a primary key" class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">employee\_id is a primary key </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in the employees table because it has </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a unique value for every row in </span></div><div aria-label="toggle video from the employees table, and no empty values." class="rc-Phrase css-ugczj4" data-cue="50" data-cue-index="49" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the employees table, and no empty values. </span></div><div aria-label="toggle video from We don't have a guarantee that the employee_id column in" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We don't have a guarantee that the employee\_id column in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the machines table follows </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the same criteria since it's </span></div><div aria-label="toggle video from a foreign key and not a primary key." class="rc-Phrase css-ugczj4" data-cue="54" data-cue-index="53" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a foreign key and not a primary key. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--2"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-next%2C-we%27ll-use-a-ty"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Next, we'll use a type of join called an INNER JOIN." class="rc-Phrase css-ugczj4" data-cue="55" data-cue-index="54" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next, we'll use a type of join called an INNER JOIN. </span></div><div aria-label="toggle video from An INNER JOIN returns rows matching on" class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">An INNER JOIN returns rows matching on </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a specified column that exists in more than one table. </span></div><div aria-label="toggle video from Tables usually contain many more rows," class="rc-Phrase css-ugczj4" data-cue="58" data-cue-index="57" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Tables usually contain many more rows, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but to further explain what we mean by INNER JOIN, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">let's focus on just four rows from </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the employees table and four rows from the machines table. </span></div><div aria-label="toggle video from We'll also look at" class="rc-Phrase css-ugczj4" data-cue="62" data-cue-index="61" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We'll also look at </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">just a few columns of each table for this example. </span></div><div aria-label="toggle video from Let's say we choose" class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's say we choose </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">employee\_id in both tables to perform an INNER JOIN. </span></div><div aria-label="toggle video from Let's look at the two rows where there is a match." class="rc-Phrase css-ugczj4" data-cue="66" data-cue-index="65" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's look at the two rows where there is a match. </span></div><div aria-label="toggle video from Both tables have 1188 and" class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Both tables have 1188 and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">1189 in their respective employee\_id columns, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">so they are considered a match. </span></div><div aria-label="toggle video from The results of the join is the two rows that have 1188" class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The results of the join is the two rows that have 1188 </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and 1189 and all columns from both tables. </span></div><div aria-label="toggle video from The results of the join is the two rows that have 1188" class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-before-we-move-on-to"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Before we move on to the queries," class="rc-Phrase css-ugczj4" data-cue="72" data-cue-index="71" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Before we move on to the queries, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we have to talk about the NULL values in the tables. </span></div><div aria-label="toggle video from In SQL, NULL represents a missing value due to any reason." class="rc-Phrase css-ugczj4" data-cue="74" data-cue-index="73" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In SQL, NULL represents a missing value due to any reason. </span></div><div aria-label="toggle video from In this case, this might be" class="rc-Phrase css-ugczj4" data-cue="75" data-cue-index="74" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this case, this might be </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">machines that are not assigned to any employee. </span></div><div aria-label="toggle video from Now, let's bring this into SQL" class="rc-Phrase css-ugczj4" data-cue="77" data-cue-index="76" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, let's bring this into SQL </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and do an INNER JOIN on the full tables. </span></div><div aria-label="toggle video from Let's imagine we want to join" class="rc-Phrase css-ugczj4" data-cue="79" data-cue-index="78" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's imagine we want to join </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">these tables in order to get a list of users and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">their office location that also shows </span></div><div aria-label="toggle video from what operating system they use on their machines." class="rc-Phrase css-ugczj4" data-cue="82" data-cue-index="81" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">what operating system they use on their machines. </span></div><div aria-label="toggle video from employee_id is a common column between these tables, and" class="rc-Phrase css-ugczj4" data-cue="83" data-cue-index="82" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">employee\_id is a common column between these tables, and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we can use this to join them. </span></div><div aria-label="toggle video from But we won't need to show this column in the results." class="rc-Phrase css-ugczj4" data-cue="85" data-cue-index="84" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">But we won't need to show this column in the results. </span></div><div aria-label="toggle video from First, let's start with a basic query" class="rc-Phrase css-ugczj4" data-cue="86" data-cue-index="85" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">First, let's start with a basic query </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that indicates we want to select the username, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">office, and operating\_system columns. </span></div><div aria-label="toggle video from We want employees to be our first or left table, so" class="rc-Phrase css-ugczj4" data-cue="89" data-cue-index="88" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We want employees to be our first or left table, so </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we'll use that in our FROM statement. </span></div><div aria-label="toggle video from Now, we write the part of the query that tells SQL" class="rc-Phrase css-ugczj4" data-cue="91" data-cue-index="90" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Now, we write the part of the query that tells SQL </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">to join the machines table with the employees table. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--3"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-break-down-thi"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Let's break down this query." class="rc-Phrase css-ugczj4" data-cue="93" data-cue-index="92" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's break down this query. </span></div><div aria-label="toggle video from INNER JOIN tells SQL to perform the INNER JOIN." class="rc-Phrase css-ugczj4" data-cue="94" data-cue-index="93" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">INNER JOIN tells SQL to perform the INNER JOIN. </span></div><div aria-label="toggle video from Then, we name the second table" class="rc-Phrase css-ugczj4" data-cue="95" data-cue-index="94" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Then, we name the second table </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we want to combine with the first. </span></div><div aria-label="toggle video from This is called the right table." class="rc-Phrase css-ugczj4" data-cue="97" data-cue-index="96" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is called the right table. </span></div><div aria-label="toggle video from In this case, we want to join machines with" class="rc-Phrase css-ugczj4" data-cue="98" data-cue-index="97" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In this case, we want to join machines with </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the employees table that was </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">already identified after FROM. </span></div><div aria-label="toggle video from Lastly, we tell SQL what column to base the join on." class="rc-Phrase css-ugczj4" data-cue="101" data-cue-index="100" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Lastly, we tell SQL what column to base the join on. </span></div><div aria-label="toggle video from In our case, we're using the employee_id column." class="rc-Phrase css-ugczj4" data-cue="102" data-cue-index="101" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In our case, we're using the employee\_id column. </span></div><div aria-label="toggle video from Since we're using two tables," class="rc-Phrase css-ugczj4" data-cue="103" data-cue-index="102" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Since we're using two tables, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we have to identify the table </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and follow that with the column name. </span></div><div aria-label="toggle video from So, we have employees.employee_id. And machines.employee_id." class="rc-Phrase css-ugczj4" data-cue="106" data-cue-index="105" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">So, we have employees.employee\_id. And machines.employee\_id. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--4"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-let%27s-review-the-out"><div aria-label="toggle video from Let's review the output." class="rc-Phrase css-ugczj4" data-cue="107" data-cue-index="106" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's review the output. </span></div><div aria-label="toggle video from Perfect! We have now joined two tables." class="rc-Phrase css-ugczj4" data-cue="108" data-cue-index="107" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Perfect! We have now joined two tables. </span></div><div aria-label="toggle video from The results of our query displays" class="rc-Phrase css-ugczj4" data-cue="109" data-cue-index="108" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">The results of our query displays </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the records that match on the employee\_id column. </span></div><div aria-label="toggle video from Notice that these records" class="rc-Phrase css-ugczj4" data-cue="111" data-cue-index="110" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Notice that these records </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">contain columns from both tables, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but only the ones we've </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">indicated through our SELECT statement. </span></div><div aria-label="toggle video from There are other types of joins that don't" class="rc-Phrase css-ugczj4" data-cue="115" data-cue-index="114" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There are other types of joins that don't </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">require a match to join two tables, and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we're going to discuss those in </span></div><div aria-label="toggle video from the next video. I'll meet you there!" class="rc-Phrase css-ugczj4" data-cue="118" data-cue-index="117" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the next video. I'll meet you there! </span></div></div>

# Types of joins

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-welcome-back.-i-hope"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Welcome back. I hope you enjoyed working on inner joins." class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Welcome back. I hope you enjoyed working on inner joins. </span></div><div aria-label="toggle video from In the previous video and" class="rc-Phrase css-ugczj4" data-cue="2" data-cue-index="1" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">In the previous video and </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">exercises, we saw how inner joins can be </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">useful by only returning records </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">that share a value in specify columns. </span></div><div aria-label="toggle video from However, in some situations, we might need" class="rc-Phrase css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">However, in some situations, we might need </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all of the entries from one or both of our tables. </span></div><div aria-label="toggle video from This is where we need to use outer joins." class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">This is where we need to use outer joins. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-there-are-three-type"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from There are three types of outer joins: LEFT JOIN," class="rc-Phrase css-ugczj4" data-cue="9" data-cue-index="8" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There are three types of outer joins: LEFT JOIN, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">RIGHT JOIN, and FULL OUTER JOIN. </span></div><div aria-label="toggle video from Similar to inner joins," class="rc-Phrase css-ugczj4" data-cue="11" data-cue-index="10" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Similar to inner joins, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">outer joins combine two tables together; </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">however, they don't necessarily need </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a match between columns to return a row. </span></div><div aria-label="toggle video from Which rows are returned depends on the type of join." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Which rows are returned depends on the type of join. </span></div><div aria-label="toggle video from Which rows are returned depends on the type of join." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"></div><div aria-label="toggle video from Which rows are returned depends on the type of join." class="rc-Phrase css-ugczj4" data-cue="15" data-cue-index="14" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">LEFT JOIN returns all of the records of the first table, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but only returns rows of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the second table that match on a specified column. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-like-we-did-in-the-p"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Like we did in the previous video, let's" class="rc-Phrase css-ugczj4" data-cue="19" data-cue-index="18" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Like we did in the previous video, let's </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">examine this type of join by </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">looking at just four rows of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">two tables with a small number of columns. </span></div><div aria-label="toggle video from Employees is the left table, or the first table," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Employees is the left table, or the first table, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and machines is the right table, or the second table. </span></div><div aria-label="toggle video from Let's join on employee_id." class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's join on employee\_id. </span></div><div aria-label="toggle video from Let's join on employee_id." class="rc-Phrase css-ugczj4" data-cue="25" data-cue-index="24" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">There's a matching value in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">this column for two of the four records. </span></div><div aria-label="toggle video from When we execute the join," class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">When we execute the join, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">SQL returns these rows with the matching value, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all other rows from </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the left table, and all columns from both tables. </span></div><div aria-label="toggle video from Records from the employees table that" class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Records from the employees table that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">didn't match but were returned through the LEFT </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">JOIN contain NULL values </span></div><div aria-label="toggle video from in columns that came from the machines table." class="rc-Phrase css-ugczj4" data-cue="35" data-cue-index="34" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">in columns that came from the machines table. </span></div><div aria-label="toggle video from Next, let's talk about right joins." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Next, let's talk about right joins. </span></div><div aria-label="toggle video from Next, let's talk about right joins." class="rc-Phrase css-ugczj4" data-cue="36" data-cue-index="35" role="button" tabindex="0"></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-right-join-returns-a"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from RIGHT JOIN returns all" class="rc-Phrase css-ugczj4" data-cue="37" data-cue-index="36" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">RIGHT JOIN returns all </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of the records of the second table </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but only returns rows from </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the first table that match on a specified column. </span></div><div aria-label="toggle video from With a RIGHT JOIN on the previous example," class="rc-Phrase css-ugczj4" data-cue="41" data-cue-index="40" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">With a RIGHT JOIN on the previous example, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the full result returns matching rows from both, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all the rows from </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the second table, and all the columns in both tables. </span></div><div aria-label="toggle video from For the values that don't exist in either table," class="rc-Phrase css-ugczj4" data-cue="45" data-cue-index="44" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For the values that don't exist in either table, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we are left with a NULL value. </span></div><div aria-label="toggle video from Last, we'll discuss full outer joins." class="rc-Phrase css-ugczj4" data-cue="47" data-cue-index="46" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Last, we'll discuss full outer joins. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-full-outer-join-retu"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from FULL OUTER JOIN returns all records" class="rc-Phrase css-ugczj4" data-cue="48" data-cue-index="47" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">FULL OUTER JOIN returns all records </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">from both tables. Using our same example, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a FULL OUTER JOIN returns all columns from all tables. </span></div><div aria-label="toggle video from If a row doesn't have a value for" class="rc-Phrase css-ugczj4" data-cue="51" data-cue-index="50" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">If a row doesn't have a value for </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a particular column, it returns NULL. </span></div><div aria-label="toggle video from For example, the machines table" class="rc-Phrase css-ugczj4" data-cue="53" data-cue-index="52" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">For example, the machines table </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">do not have any rows with employee\_id </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">1190, so the values for that row and the </span></div><div aria-label="toggle video from columns that came from the machines table is NULL." class="rc-Phrase css-ugczj4" data-cue="56" data-cue-index="55" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">columns that came from the machines table is NULL. </span></div><div aria-label="toggle video from To implement left joins, right joins," class="rc-Phrase css-ugczj4" data-cue="57" data-cue-index="56" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">To implement left joins, right joins, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and full outer joins in SQL, you use </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the same syntax structure as the INNER JOIN </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">but use these keywords: </span></div><div aria-label="toggle video from LEFT JOIN, RIGHT JOIN," class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">LEFT JOIN, RIGHT JOIN, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and FULL OUTER JOIN. </span></div><div aria-label="toggle video from LEFT JOIN, RIGHT JOIN," class="rc-Phrase css-ugczj4" data-cue="61" data-cue-index="60" role="button" tabindex="0"></div></div></div></div><div class="phrases" id="bkmrk-as-a-security-analys"><div aria-label="toggle video from As a security analyst," class="rc-Phrase css-ugczj4" data-cue="63" data-cue-index="62" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">As a security analyst, </span></div><div aria-label="toggle video from you're not required to know all of these from memory." class="rc-Phrase css-ugczj4" data-cue="64" data-cue-index="63" role="button"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you're not required to know all of these from memory. </span></div><div aria-label="toggle video from Once you understand the type of join you need," class="rc-Phrase css-ugczj4" data-cue="65" data-cue-index="64" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Once you understand the type of join you need, </span></div><div aria-label="toggle video from you can quickly search and find" class="rc-Phrase css-ugczj4" data-cue="66" data-cue-index="65" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you can quickly search and find </span></div><div aria-label="toggle video from all the information you need to execute these queries." class="rc-Phrase css-ugczj4" data-cue="67" data-cue-index="66" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">all the information you need to execute these queries. </span></div><div aria-label="toggle video from With this information on joins," class="rc-Phrase css-ugczj4" data-cue="68" data-cue-index="67" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">With this information on joins, </span></div><div aria-label="toggle video from we've now covered some very important information" class="rc-Phrase css-ugczj4" data-cue="69" data-cue-index="68" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">we've now covered some very important information </span></div><div aria-label="toggle video from you'll need as a security analyst using SQL." class="rc-Phrase css-ugczj4" data-cue="70" data-cue-index="69" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you'll need as a security analyst using SQL. </span></div><div aria-label="toggle video from Thank you for joining me in this video." class="rc-Phrase css-ugczj4" data-cue="71" data-cue-index="70" role="button"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Thank you for joining me in this video. </span></div></div>

# Compare types of joins

Previously, you explored SQL joins and how to use them to join data from multiple tables when these tables share a common column. You also examined how there are different types of joins, and each of them returns different rows from the tables being joined. In this reading, you'll review these concepts and more closely analyze the syntax needed for each type of join.

## Inner joins

The first type of join that you might perform is an inner join. <var>INNER JOIN</var> returns rows matching on a specified column that exists in more than one table.

<div class="rc-CML" dir="auto" id="bkmrk-"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Venn diagram with two circles labeled "left table" and "right table". The intersection is highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/9y5ZKSySQTuS5RQ-MJLXrA_6b756cb30b9442c8ae576607a6ab3ff1_CS_R-080_Inner-joins.png?expiry=1689120000000&hmac=ztPJ29SOfpwVlt4cKmV6BcvIflzMNjIGbHMDxy37yOg)</figure></div></div></div></div></div></div>It only returns the rows where there is a match, but like other types of joins, it returns all specified columns from all joined tables. For example, if the query joins two tables with <var>SELECT \*</var>, all columns in both of the tables are returned.

**Note:** If a column exists in both of the tables, it is returned twice when <var>SELECT \*</var> is used.

### The syntax of an inner join

To write a query using <var>INNER JOIN</var>, you can use the following syntax:

<var>SELECT \*</var>

<var>FROM employees</var>

<var>INNER JOIN machines ON employees.device\_id = machines.device\_id;  
  
SELECT thing1, thing2, thingX FROM table1 inner join table2 ON table1.commun\_colomn = table2.common\_colomn;  
</var>

You must specify the two tables to join by including the first or left table after <var>FROM</var> and the second or right table after <var>INNER JOIN</var>.

After the name of the right table, use the <var>ON</var> keyword and the <var>=</var> operator to indicate the column you are joining the tables on. It's important that you specify both the table and column names in this portion of the join by placing a period (<var>.</var>) between the table and the column.

In addition to selecting all columns, you can select only certain columns. For example, if you only want the join to return the <var>username</var>, <var>operating\_system</var> and <var>device\_id</var> columns, you can write this query:

<var>SELECT username, operating\_system, employees.device\_id</var>

<var>FROM employees</var>

<var>INNER JOIN machines ON employees.device\_id = machines.device\_id;  
</var>

<var>it makes more sense for it to be all in one row for me so heres an explanation of each part how it works  
</var><var>SELECT thing\_1, thing\_2, thing\_X FROM table1 INNER JOIN table2 ON table1.common\_column = table2.common\_column;  
</var>

**Note**: In the example query, <var>username</var> and <var>operating\_system</var> only appear in one of the two tables, so they are written with just the column name. On the other hand, because <var>device\_id</var> appears in both tables, it's necessary to indicate which one to return by specifying both the table and column name (<var>employees.device\_id</var>).

## Outer joins

Outer joins expand what is returned from a join. Each type of outer join returns all rows from either one table or both tables.

### Left joins

When joining two tables, <var>LEFT JOIN</var> returns all the records of the first table, but only returns rows of the second table that match on a specified column.

<div class="rc-CML" dir="auto" id="bkmrk--1"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Venn diagram with two circles labeled "left table" and "right table". The left circle and the intersection are highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/GsYCwSiOSMmymUqPUAQJ5w_5beed7e470c546fca088a83dfd9465f1_CS_R-080_Left-joins.png?expiry=1689120000000&hmac=HHSM7i9uwK-2Oq05zEf06ori3MPZ8G-R5W8fyug1QZU)</figure></div></div></div></div></div></div>The syntax for using <var>LEFT JOIN</var> is demonstrated in the following query:

<var>SELECT \*</var>

<var>FROM employees</var>

<var>LEFT JOIN machines ON employees.device\_id = machines.device\_id;</var>

As with all joins, you should specify the first or left table as the table that comes after <var>FROM</var> and the second or right table as the table that comes after <var>LEFT JOIN</var>. In the example query, because <var>employees</var> is the left table, all of its records are returned. Only records that match on the <var>device\_id</var> column are returned from the right table, <var>machines</var>.

### Right joins

When joining two tables, <var>RIGHT JOIN</var> returns all of the records of the second table, but only returns rows from the first table that match on a specified column.

<div class="rc-CML" dir="auto" id="bkmrk--2"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Venn diagram with two circles labeled "left table" and "right table". The right circle and the intersection are highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/YHXRMOLiQheppUjthmM5yQ_cfb18a8315e34357bd1299f7eefafcf1_CS_R-080_Right-joins.png?expiry=1689120000000&hmac=vl4SnuhTha_RePhUQ-sb5pfEVYjfYrnCmJpUc14hKDY)</figure></div></div></div></div></div></div>The following query demonstrates the syntax for <var>RIGHT JOIN</var>:

<var>SELECT \*</var>

<var>FROM employees</var>

<var>RIGHT JOIN machines ON employees.device\_id = machines.device\_id;</var>

<var>RIGHT JOIN</var> has the same syntax as <var>LEFT JOIN</var>, with the only difference being the keyword <var>RIGHT JOIN</var> instructs SQL to produce different output. The query returns all records from <var>machines</var>, which is the second or right table. Only matching records are returned from <var>employees</var>, which is the first or left table.

**Note:** You can use <var>LEFT JOIN</var> and <var>RIGHT JOIN</var> and return the exact same results if you use the tables in reverse order. The following <var>RIGHT JOIN</var> query returns the exact same result as the <var>LEFT JOIN</var> query demonstrated in the previous section:

<var>SELECT \*</var>

<var>FROM machines</var>

<var>RIGHT JOIN employees ON employees.device\_id = machines.device\_id;</var>

All that you have to do is switch the order of the tables that appear before and after the keyword used for the join, and you will have swapped the left and right tables.

### Full outer joins 

<var>FULL OUTER JOIN</var> returns all records from both tables. You can think of it as a way of completely merging two tables.

<div class="rc-CML" dir="auto" id="bkmrk--3"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer"><div><figure contenteditable="false" role="figure">![Venn diagram with two circles labeled "left table" and "right table". Both circles are highlighted.](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/oRzF__GaTqSGMmUqXKbSrQ_92db9841a00244c2aa214e60bb07f1f1_CS_R-080_FULL-OUTER-JOIN.png?expiry=1689120000000&hmac=_mQrCfMdNvPXplXuBFDsTIGUpqmxB-HicarJwCeLsUw)</figure></div></div></div></div></div></div>You can review the syntax for using <var>FULL OUTER JOIN</var> in the following query:

<var>SELECT \*</var>

<var>FROM employees</var>

<var>FULL OUTER JOIN machines ON employees.device\_id = machines.device\_id;</var>

The results of a <var>FULL OUTER JOIN</var> query include all records from both tables. Similar to <var>INNER JOIN</var>, the order of tables does not change the results of the query.

## Key takeaways

When working in SQL, there are multiple ways to join tables. All joins return the records that match on a specified column. <var>INNER JOIN</var> will return only these records. Outer joins also return all other records from one or both of the tables. <var>LEFT JOIN</var> returns all records from the first or left table, <var>RIGHT JOIN</var> returns all records from the second or right table, and <var>FULL OUTER JOIN</var> returns all records from both tables.

# Continuous learning in SQL

You've explored a lot about SQL, including applying filters to SQL queries and joining multiple tables together in a query. There's still more that you can do with SQL. This reading will explore an example of something new you can add to your SQL toolbox: aggregate functions. You'll then focus on how you can continue learning about this and other SQL topics on your own.

## Aggregate functions

In SQL, **aggregate functions** are functions that perform a calculation over multiple data points and return the result of the calculation. The actual data is not returned.

There are various aggregate functions that perform different calculations:

<div class="rc-CML" dir="auto" id="bkmrk-count-returns-a-sing"><div><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml" data-track-page="item_layout" role="presentation"><div data-track="true" data-track-action="click" data-track-app="open_course_home" data-track-component="cml_link" data-track-page="item_layout"><div class="css-1k5v0wb" data-testid="cml-viewer">- <var>COUNT</var> returns a single number that represents the number of rows returned from your query.
- <var>AVG</var> returns a single number that represents the average of the numerical data in a column.
- <var>SUM</var> returns a single number that represents the sum of the numerical data in a column.

</div></div></div></div></div>### **Aggregate function syntax**

To use an aggregate function, place the keyword for it after the <var>SELECT</var> keyword, and then in parentheses, indicate the column you want to perform the calculation on.

For example, when working with the <var>customers</var> table, you can use aggregate functions to summarize important information about the table. If you want to find out how many customers there are in total, you can use the <var>COUNT</var> function on any column, and SQL will return the total number of records, excluding <var>NULL</var> values. You can run this query and explore its output:

---

```
SELECT COUNT(firstname)
FROM customers;
```

---

```
+------------------+
| COUNT(firstname) |
+------------------+
|               59 |
+------------------+
```

---

The result is a table with one column titled <var>COUNT(firstname)</var> and one row that indicates the count.

If you want to find the number of customers from a specific country, you can add a filter to your query:

---

```
SELECT COUNT(firstname)
FROM customers
WHERE country = 'USA';
```

---

```
+------------------+
| COUNT(firstname) |
+------------------+
|               13 |
+------------------+
```

---

With this filter, the count is lower because it only includes the records where the <var>country</var> column contains a value of <var>'USA'</var>.

There are a lot of other aggregate functions in SQL. The syntax of placing them after <var>SELECT</var> is exactly the same as the <var>COUNT</var> function.

## Continuing to learn SQL

SQL is a widely used querying language, with many more keywords and applications. You can continue to learn more about aggregate functions and other aspects of using SQL on your own.

Most importantly, approach new tasks with curiosity and a willingness to find new ways to apply SQL to your work as a security analyst. Identify the data results that you need and try to use SQL to obtain these results.

Fortunately, SQL is one of the most important tools for working with databases and analyzing data, so you'll find a lot of support in trying to learn SQL online. First, try searching for the concepts you've already learned and practiced to find resources that have accurate easy-to-follow explanations. When you identify these resources, you can use them to extend your knowledge.

Continuing your practical experience with SQL is also important. You can also search for new databases that allow you to perform SQL queries using what you've learned.

## Key takeaways

Aggregate functions like <var>COUNT</var>, <var>SUM</var>, and <var>AVG</var> allow you to work with SQL in new ways. There are many other additional aspects of SQL that could be useful to you as an analyst. By continuing to explore SQL on your own, you can expand the ways you can apply SQL in a cybersecurity context.

# Wrap-up; Glossary terms from week 4

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-congratulations%21-we%27"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from Congratulations! We've made it" class="rc-Phrase css-ugczj4" data-cue="1" data-cue-index="0" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Congratulations! We've made it </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">together through the end of our focus on SQL. </span></div><div aria-label="toggle video from You've put in a lot of" class="rc-Phrase css-ugczj4" data-cue="3" data-cue-index="2" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You've put in a lot of </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">work and learned an important tool that </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">will help you on your journey as a security analyst. </span></div><div aria-label="toggle video from current lecture segment: Let's take a moment to go through all" class="rc-Phrase active css-ugczj4" data-cue="6" data-cue-index="5" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Let's take a moment to go through all </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">of the topics you learned in this section. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-we-started-by-learni"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div aria-label="toggle video from We started by learning about" class="rc-Phrase css-ugczj4" data-cue="8" data-cue-index="7" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We started by learning about </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">the structure of relational databases </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and how we can access them by </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">using the query language SQL. </span></div><div aria-label="toggle video from We then got hands-on practice" class="rc-Phrase css-ugczj4" data-cue="12" data-cue-index="11" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We then got hands-on practice </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">with writing our own SQL queries. </span></div><div aria-label="toggle video from We used SQL to bring up information you might" class="rc-Phrase css-ugczj4" data-cue="14" data-cue-index="13" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We used SQL to bring up information you might </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">need on the job when working as an analyst. </span></div><div aria-label="toggle video from We then focused on SQL filters." class="rc-Phrase css-ugczj4" data-cue="16" data-cue-index="15" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We then focused on SQL filters. </span></div><div aria-label="toggle video from We started with simple conditions with strings," class="rc-Phrase css-ugczj4" data-cue="17" data-cue-index="16" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We started with simple conditions with strings, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">and by the end, we learned how to use </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">multiple filters in one query. </span></div><div aria-label="toggle video from We concluded the unit with SQL" class="rc-Phrase css-ugczj4" data-cue="20" data-cue-index="19" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">We concluded the unit with SQL </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">joins and learned how to join multiple tables, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">giving us even more information at once. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-by-completing-this-c"><div aria-label="toggle video from By completing this course," class="rc-Phrase css-ugczj4" data-cue="23" data-cue-index="22" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">By completing this course, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">you just took a very big step in </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">your future career as a security analyst. </span></div><div aria-label="toggle video from You have been introduced to" class="rc-Phrase css-ugczj4" data-cue="26" data-cue-index="25" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">You have been introduced to </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">a powerful tool that can help you in your work. </span></div><div aria-label="toggle video from Whenever you need to," class="rc-Phrase css-ugczj4" data-cue="28" data-cue-index="27" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Whenever you need to, </span><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I encourage you to revisit the materials in this course. </span></div><div aria-label="toggle video from Learning a querying language like SQL takes time." class="rc-Phrase css-ugczj4" data-cue="30" data-cue-index="29" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Learning a querying language like SQL takes time. </span></div><div aria-label="toggle video from Thank you again for joining me in this journey." class="rc-Phrase css-ugczj4" data-cue="31" data-cue-index="30" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">Thank you again for joining me in this journey. </span></div><div aria-label="toggle video from I hope you'll enjoy using SQL as much as I do." class="rc-Phrase css-ugczj4" data-cue="32" data-cue-index="31" role="button" tabindex="0"><span aria-hidden="true" class="cds-137 css-80vnnb cds-139">I hope you'll enjoy using SQL as much as I do. </span></div></div>### **Terms and definitions from Course 4, Week 4**

**Database**: An organized collection of information or data

**Date and time data:** Data representing a date and/or time

**Exclusive operator**: An operator that does not include the value of comparison

**Filtering:** Selecting data that match a certain condition

**Foreign key:** A column in a table that is a primary key in another table

**Inclusive operator:** An operator that includes the value of comparison

**Log:** A record of events that occur within an organization's systems

**Numeric data:** Data consisting of numbers

**Operator:** A symbol or keyword that represents an operation

**Primary key:** A column where every row has a unique entry

**Query:** A request for data from a database table or a combination of tables

**Relational database:** A structured database containing tables that are related to each other

**String data**: Data consisting of an ordered sequence of characters

**SQL (Structured Query Language):** A programming language used to create, interact with, and request information from a database

**Syntax:** The rules that determine what is correctly structured in a computing language

**Wildcard**: A special character that can be substituted with any other character

# Course wrap-up

<div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-you-made-it-to-the-e"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div class="rc-Phrase active css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">You made it to the end of this course! </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Congratulations—you did it! </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">I hope you are proud of all you learned. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">The focus of this course was computing basics. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Understanding the basics of </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">computing is a valuable skill as </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">you transition into your career as a security analyst. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk-let%27s-recap-what-you"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item"><div class="phrases"><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Let's recap what you learned in this course. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">We first focused on operating systems </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">and how they relate to applications and hardware. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Understanding how the system you're protecting </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">works is essential for doing your job effectively. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">That brings us to the Linux operating system. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">When working in the security profession, </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">familiarity with Linux is important. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">We first discussed this architecture </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">and various distributions. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Then, we used a Linux command line to carry </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">out tasks you might encounter as a security analyst. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Finally, we looked at </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">another useful tool and used SQL to query databases. </span></div></div></div></div><div class="cds-1 css-xl5mb3 cds-2" id="bkmrk--1"><div class="cds-1 rc-Paragraph css-1lz62pp cds-3 cds-grid-item">  
</div></div><div class="phrases" id="bkmrk-after-this-course%2C-i"><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">After this course, I </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">hope you have a better understanding of </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">how these foundations of computing support </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">a security analyst in their daily work. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">I also hope you continue your path with this program. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">There are a lot of other useful </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">and exciting topics ahead. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Once again, congratulations. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">You've finished another course. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Building skills is something you should be proud of. </span></div><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">Keep it up as you progress through this program.   
  
</span></div></div>## <span style="font-size:16pt;font-family:Arial, sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Terms and definitions from Course 4</span>

<div class="phrases" id="bkmrk--2"><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">  
</span></div></div><span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Absolute file path: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The full file path, which starts from the root</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Application:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A program that performs a specific task</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Argument (Linux):</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> Specific information needed by a command</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Authentication:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The process of verifying who someone is</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Authorization:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The concept of granting access to specific resources in a system</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">B</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Bash:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The default shell in most Linux distributions</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Basic Input/Output System (BIOS):</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A microchip that contains loading instructions for the computer and is prevalent in older systems </span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Bootloader: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A software program that boots the operating system</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">C</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">CentOS:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> An open-source distribution that is closely related to Red Hat</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Central Processing Unit (CPU): </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A computer’s main processor, which is used to perform general computing tasks on a computer</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Command:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> An instruction telling the computer to do something</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Command-line interface (CLI):</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A text-based user interface that uses commands to interact with the computer</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">D</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Database</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">: An organized collection of information or data</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Date and time data:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> Data representing a date and/or time</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Digital forensics:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The practice of collecting and analyzing data to determine what has happened after an attack</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Directory: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A file that organizes where other files are stored</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Distributions: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The different versions of Linux</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">E</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Exclusive operator</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">: An operator that does not include the value of comparison</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">F</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">File path: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The location of a file or directory</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Filesystem Hierarchy Standard (FHS):</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The component of the Linux OS that organizes data</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Filtering:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> Selecting data that match a certain condition</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Foreign key: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A column in a table that is a primary key in another table </span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">G</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Graphical user interface (GUI):</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#fefefe;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A user interface that uses icons on the screen to manage different tasks on the computer</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">H</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Hard drive: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#3c4043;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A hardware component used for long-term memory</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Hardware: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The physical components of a computer</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">I</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Inclusive operator: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">An operator that includes the value of comparison</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Internal hardware: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The components required to run the computer</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">K</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Kali Linux ™</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">: An open-source distribution of Linux that is widely used in the security industry</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Kernel:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The component of the Linux OS that manages processes and memory</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">L</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#fefefe;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Legacy operating system: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">An operating system that is outdated but still being used</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Linux:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> An open-source operating system</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#fefefe;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Log: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A record of events that occur within an organization's systems</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">N</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">nano: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A command-line file editor that is available by default in many Linux distributions</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Numeric data:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> Data consisting of numbers</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">O</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#fefefe;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Operating system (OS)</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#fefefe;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">:</span><span style="font-size:12pt;font-family:'Open Sans', sans-serif;color:#434343;background-color:#fefefe;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The interface between computer hardware and the user</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Operator:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A symbol or keyword that represents an operation</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Options: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Input that modifies the behavior of a command</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">P</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Package: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A piece of software that can be combined with other packages to form an application</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Package manager: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A tool that helps users install, manage, and remove packages or applications</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Parrot: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">An open-source distribution that is commonly used for security</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Penetration test (pen test):</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A simulated attack that helps identify vulnerabilities in systems, networks, websites, applications, and processes</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Peripheral devices: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Hardware components that are attached and controlled by the computer system</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Permissions:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The type of access granted for a file or directory</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Primary key:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A column where every row has a unique entry</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Principle of least privilege: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The concept of granting only the minimal access and authorization required to complete a task or function</span>

<div class="phrases" id="bkmrk--3"><div class="rc-Phrase css-ugczj4" tabindex="0"><span class="cds-137 css-80vnnb cds-139">  
</span></div></div><span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Q</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Query: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A request for data from a database table or a combination of tables</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">R</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Random Access Memory (RAM): </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#3c4043;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A hardware component used for short-term memory</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Red Hat® Enterprise Linux® </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">(also referred to simply as Red Hat in this course)</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A subscription-based distribution of Linux built for enterprise use</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Relational database: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A structured database containing tables that are related to each other</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Relative file path: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A file path that starts from the user's current directory</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Root directory: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The highest-level directory in Linux</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Root user (or superuser): </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A user with elevated privileges to modify the system</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">S</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Shell:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The command-line interpreter </span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">SQL (Structured Query Language): </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A programming language used to create, interact with, and request information from a database</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Standard error:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> An error message returned by the OS through the shell</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Standard input:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> Information received by the OS via the command line</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Standard output: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Information returned by the OS through the shell</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">String data:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> Data consisting of an ordered sequence of characters</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Syntax: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">The rules that determine what is correctly structured in a computing language</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">U</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Ubuntu: </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">An open-source, user-friendly distribution that is widely used in security and other industries</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Unified Extensible Firmware Interface (UEFI): </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A microchip that contains loading instructions for the computer and replaces BIOS on more modern systems</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">User:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> The person interacting with a computer </span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">User interface:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> A program that allows the user to control the functions of the operating system</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">V</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Virtual machine (VM)</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">:</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"> </span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">A virtual version of a physical computer</span>

<span style="font-size:24pt;font-family:'Google Sans', sans-serif;color:#4285f4;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">W</span>

<span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">Wildcard</span><span style="font-size:12pt;font-family:'Google Sans', sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">: A special character that can be substituted with any other character</span>

<div class="phrases" id="bkmrk--4"><div class="rc-Phrase css-ugczj4" tabindex="0">---

</div></div><div class="phrases" id="bkmrk--5"><div class="rc-Phrase css-ugczj4" tabindex="0">  
</div></div>