Skip to content

Commit

Permalink
Merge pull request linkedin#16 from codophobia/linux_basics
Browse files Browse the repository at this point in the history
Added conclusion page, modified subtitles and links
  • Loading branch information
kalyanceg committed Nov 23, 2020
2 parents 13263f6 + 5488005 commit 18857dc
Show file tree
Hide file tree
Showing 94 changed files with 53 additions and 72 deletions.
26 changes: 6 additions & 20 deletions courses/linux_basics/command_line_basics.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Command Line Basics

## What is a command ?
## Lab Environment Setup

One can use an online bash interpreter to run all the commands that are provided as examples in this course. This will also help you in getting a hands-on experience of various linux commands.

[REPL](https://repl.it/languages/bash) is one of the popular online bash interpreters for running linux commands. We will be using it for running all the commands mentioned in this course.

## What is a Command

A command is a program that tells the operating system to perform
specific work. Programs are stored as files in linux. Therefore, a
Expand Down Expand Up @@ -438,22 +443,3 @@ prints the unique numbers from the input.

I/O redirection -
[https://tldp.org/LDP/abs/html/io-redirection.html](https://tldp.org/LDP/abs/html/io-redirection.html)

## Applications in SRE Role

- As a SRE, you will be required to perform some general tasks on these linux servers. You will also be using the command line when you are troubleshooting issues.

- Moving from one location to another in the filesystem will require the help of ls, pwd and cd commands

- You may need to search some specific information in the log files. Grep command would be very useful here. I/O redirection will become handy if you want to store the output in a file or pass it as an input to another command.

- Tail command is very useful to view the latest data in the log file.

## Useful courses and tutorials


- [Edx linuxcourse](https://courses.edx.org/courses/course-v1:LinuxFoundationX+LFS101x+1T2020/course/) -
This video course can be very helpful in developing the basics of linux command line. This course is provided
in both free and paidmodes by edX. If you take the free course, you will not be able to access the assignments.

- [https://linuxcommand.org/lc3_learning_the_shell.php](https://linuxcommand.org/lc3_learning_the_shell.php)
25 changes: 25 additions & 0 deletions courses/linux_basics/conclusion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Conclusion

With this we have covered the basics of linux operating systems along with basic commands
which are used in linux. We have also covered the linux server administration commands.

We hope that this course will make it easier for you to operate on the command line.

## Applications in SRE Role

1. As a SRE, you will be required to perform some general tasks on these linux servers. You will also be using the command line when you are troubleshooting issues.
2. Moving from one location to another in the filesystem will require the help of ls, pwd and cd commands
3. You may need to search some specific information in the log files. Grep command would be very useful here. I/O redirection will become handy if you want to store the output in a file or pass it as an input to another command.
4. Tail command is very useful to view the latest data in the log file.
5. Different users will have different permissions depending on their roles. We will also not want everyone in the company to access our servers for security reasons. Users permissions can be restricted with chown, chmod and chgrp commands.
6. SSH is one of the most frequently used commands for a SRE. Logging into servers and troubleshooting along with performing basic administration tasks will only be possible if we are able to login into the server.
7. What if we want to run an apache server or nginx on a server ? We will first install it using the package manager. Package management commands become important here.
8. Managing services on servers is another critical responsibility of a SRE. Systemd related commands can help in troubleshooting issues. If a service goes down, we can start it using systemctl start command. We can also stop a service in case it is not needed.
9. Monitoring is another core responsibility of a SRE. Memory and CPU are two important system level metrics which should be monitored. Commands like top and free are quite helpful here.
10. If a service is throwing an error, how do we find out the root cause of the error ? We will certainly need to check logs to find out the whole stack trace of the error. The log file will also tell us the number of times the error has occurred along with time when it started.

## Useful Courses and tutorials

* [Edx basic linux commands course](https://courses.edx.org/courses/course-v1:LinuxFoundationX+LFS101x+1T2020/course/)
* [Edx Red Hat Enterprise Linux Course](https://courses.edx.org/courses/course-v1:RedHat+RH066x+2T2017/course/)
* [https://linuxcommand.org/lc3_learning_the_shell.php](https://linuxcommand.org/lc3_learning_the_shell.php)
Binary file modified courses/linux_basics/images/linux/admin/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image31.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified courses/linux_basics/images/linux/admin/image32.png
Binary file modified courses/linux_basics/images/linux/admin/image33.png
Binary file modified courses/linux_basics/images/linux/admin/image34.png
Binary file modified courses/linux_basics/images/linux/admin/image35.png
Binary file modified courses/linux_basics/images/linux/admin/image36.png
Binary file modified courses/linux_basics/images/linux/admin/image37.png
Binary file modified courses/linux_basics/images/linux/admin/image38.png
Binary file modified courses/linux_basics/images/linux/admin/image39.png
Binary file modified courses/linux_basics/images/linux/admin/image4.png
Binary file modified courses/linux_basics/images/linux/admin/image40.png
Binary file modified courses/linux_basics/images/linux/admin/image41.png
Binary file modified courses/linux_basics/images/linux/admin/image42.png
Binary file modified courses/linux_basics/images/linux/admin/image43.png
Binary file modified courses/linux_basics/images/linux/admin/image44.png
Binary file modified courses/linux_basics/images/linux/admin/image45.png
Binary file modified courses/linux_basics/images/linux/admin/image46.png
Binary file modified courses/linux_basics/images/linux/admin/image47.png
Binary file modified courses/linux_basics/images/linux/admin/image48.png
Binary file modified courses/linux_basics/images/linux/admin/image49.png
Binary file modified courses/linux_basics/images/linux/admin/image5.png
Binary file modified courses/linux_basics/images/linux/admin/image50.png
Binary file modified courses/linux_basics/images/linux/admin/image51.png
Binary file modified courses/linux_basics/images/linux/admin/image52.png
Binary file modified courses/linux_basics/images/linux/admin/image53.png
Binary file modified courses/linux_basics/images/linux/admin/image54.png
Binary file modified courses/linux_basics/images/linux/admin/image55.png
Binary file modified courses/linux_basics/images/linux/admin/image56.png
Binary file modified courses/linux_basics/images/linux/admin/image57.png
Binary file modified courses/linux_basics/images/linux/admin/image58.png
Binary file modified courses/linux_basics/images/linux/admin/image6.png
Binary file modified courses/linux_basics/images/linux/admin/image7.png
Binary file modified courses/linux_basics/images/linux/admin/image8.png
Binary file modified courses/linux_basics/images/linux/admin/image9.png
Binary file modified courses/linux_basics/images/linux/commands/image1.png
Binary file modified courses/linux_basics/images/linux/commands/image10.png
Binary file modified courses/linux_basics/images/linux/commands/image11.png
Binary file modified courses/linux_basics/images/linux/commands/image12.png
Binary file modified courses/linux_basics/images/linux/commands/image13.png
Binary file modified courses/linux_basics/images/linux/commands/image14.png
Binary file modified courses/linux_basics/images/linux/commands/image15.png
Binary file modified courses/linux_basics/images/linux/commands/image16.png
Binary file modified courses/linux_basics/images/linux/commands/image17.png
Binary file modified courses/linux_basics/images/linux/commands/image18.png
Binary file modified courses/linux_basics/images/linux/commands/image19.png
Binary file modified courses/linux_basics/images/linux/commands/image2.png
Binary file modified courses/linux_basics/images/linux/commands/image20.png
Binary file modified courses/linux_basics/images/linux/commands/image21.png
Binary file modified courses/linux_basics/images/linux/commands/image22.png
Binary file modified courses/linux_basics/images/linux/commands/image23.png
Binary file modified courses/linux_basics/images/linux/commands/image24.png
Binary file modified courses/linux_basics/images/linux/commands/image25.png
Binary file modified courses/linux_basics/images/linux/commands/image26.png
Binary file modified courses/linux_basics/images/linux/commands/image27.png
Binary file modified courses/linux_basics/images/linux/commands/image28.png
Binary file modified courses/linux_basics/images/linux/commands/image29.png
Binary file modified courses/linux_basics/images/linux/commands/image3.png
Binary file modified courses/linux_basics/images/linux/commands/image30.png
Binary file modified courses/linux_basics/images/linux/commands/image31.png
Binary file modified courses/linux_basics/images/linux/commands/image32.png
Binary file modified courses/linux_basics/images/linux/commands/image4.png
Binary file modified courses/linux_basics/images/linux/commands/image5.png
Binary file modified courses/linux_basics/images/linux/commands/image6.png
Binary file modified courses/linux_basics/images/linux/commands/image7.png
Binary file modified courses/linux_basics/images/linux/commands/image8.png
Binary file modified courses/linux_basics/images/linux/commands/image9.png
23 changes: 14 additions & 9 deletions courses/linux_basics/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,38 @@ course. We will also not be covering linux internals.

## Course Content

### Table of Contents

The following topics has been covered in this course:

- Introduction to Linux
- [Introduction to Linux](https://linkedin.github.io/school-of-sre/linux_basics/intro/)
- [What are Linux Operating Systems](https://linkedin.github.io/school-of-sre/linux_basics/intro/#what-are-linux-operating-systems)
- [Linux Distributions](https://linkedin.github.io/school-of-sre/linux_basics/intro/#what-are-popular-linux-distributions)
- [What are popular Linux distributions](https://linkedin.github.io/school-of-sre/linux_basics/intro/#what-are-popular-linux-distributions)
- [Uses of Linux Operating Systems](https://linkedin.github.io/school-of-sre/linux_basics/intro/#uses-of-linux-operating-systems)
- [Linux Architecture](https://linkedin.github.io/school-of-sre/linux_basics/intro/#linux-architecture)
- [GUI vs CLI](https://linkedin.github.io/school-of-sre/linux_basics/intro/#graphical-user-interface-gui-vs-command-line-interface-cli)
- [Graphical user interface (GUI) vs Command line interface (CLI)](https://linkedin.github.io/school-of-sre/linux_basics/intro/#graphical-user-interface-gui-vs-command-line-interface-cli)
- [Command Line Basics](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/)
- [Lab Environment Setup](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/lab-environment-setup)
- [What is a Command](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#what-is-a-command)
- [File System Organization](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#file-system-organization)
- [Navigating File System](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#commands-for-navigating-the-file-system)
- [Manipulating Files](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#commands-for-manipulating-files)
- [Viewing Files](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#commands-for-viewing-files)
- [Echo Command](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#echo-command)
- [Text Processing Commands](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#text-processing-commands)
- [I/O Redirection](https://linkedin.github.io/school-of-sre/linux_basics/command_line_basics/#io-redirection)
- [Linux system administration](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/)
- [User/Groups management](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#usergroup-management-in-linux)
- [Superuser in Linux](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#becoming-a-superuser-in-linux)
- [File Permissions](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#file-permissions-in-linux)
- [Lab Environment Setup](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/lab-environment-setup)
- [User/Groups management](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#usergroup-management)
- [Becoming a Superuser](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#becoming-a-superuser)
- [File Permissions](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#file-permissions)
- [SSH Command](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#ssh-command)
- [Package Management](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#package-management)
- [Process Management](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#process-management)
- [Memory Management](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#memory-management)
- [Daemons and Systemd](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#daemons)
- [Logs](https://linkedin.github.io/school-of-sre/linux_basics/linux_server_administration/#logs)

- [Conclusion](https://linkedin.github.io/school-of-sre/linux_basics/conclusion)
- [Applications in SRE Role](https://linkedin.github.io/school-of-sre/linux_basics/conclusion/#applications-in-sre-role)
- [Useful Courses and tutorials](https://linkedin.github.io/school-of-sre/linux_basics/conclusion/#useful-courses-and-tutorials)

## What are Linux operating systems

Expand Down
51 changes: 8 additions & 43 deletions courses/linux_basics/linux_server_administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ As a server administrator, we are mostly concerned with the linux servers which
Since linux supports multiple users, we need to have a method which can protect the users from each other. One user should not be able to access and modify files of other users


## User/Group Management in Linux
## User/Group Management

- Each user in linux has an associated user ID called UID attached to him

Expand All @@ -35,7 +35,7 @@ Since linux supports multiple users, we need to have a method which can protect

- Each group has a group ID called GID associated with it.

### id command in linux
### id command

id command can be used to find the uid and gid associated with an user.
It also lists down the groups to which the user belongs to.
Expand Down Expand Up @@ -166,7 +166,7 @@ We will now try to add user "shivam" to the group we have created above.

![](images/linux/admin/image33.png)

## Becoming a Superuser in Linux
## Becoming a Superuser

**Before running the below commands, do make sure that you have set up a
password for user "shivam" and user "root" using the passwd command
Expand Down Expand Up @@ -243,7 +243,7 @@ accessed with the sudo privileges. We have already given sudo privileges
to user “shivam” by adding him to the group “wheel”.


## File Permissions in Linux
## File Permissions

On a linux operating system, each file and directory is assigned access
permissions for the owner of the file, the members of a group of related
Expand All @@ -263,7 +263,7 @@ related to file permissions.

![](images/linux/admin/image57.png)

### Chmod command in linux
### Chmod command

The chmod command is used to modify files and directories permissions in
linux.
Expand Down Expand Up @@ -296,7 +296,7 @@ command.
Chmod command can be also used to change the permissions of a directory
in the similar way.

### Chown command in linux
### Chown command

The chown command is used to change the owner of files or
directories in linux.
Expand All @@ -315,7 +315,7 @@ command.
Chown command can also be used to change the owner of a directory in the
similar way.

### Chgrp command in linux
### Chgrp command

The chgrp command can be used to change the group ownership of files or
directories in linux. The syntax is very similar to that of chown
Expand Down Expand Up @@ -518,7 +518,7 @@ additional information about io and cpu usage.

![](images/linux/admin/image38.png)

## Checking Disk Space in Linux
## Checking Disk Space

In this section, we will study about some useful commands that can be
used to view disk space on linux.
Expand Down Expand Up @@ -585,38 +585,3 @@ in linux. These logs can be very useful when you are troubleshooting on
the system.

![](images/linux/admin/image58.png)

## Applications in SRE Role

- Different users will have different permissions depending on their
roles. We will also not want everyone in the company to access our
servers for security reasons. Users permissions can be restricted
with chown, chmod and chgrp commands.

- SSH is one of the most frequently used commands for a SRE. Logging
into servers and troubleshooting along with performing basic
administration tasks will only be possible if we are able to login
into the server.

- What if we want to run an apache server or nginx on a server ? We
will first install it using the package manager. Package
management commands become important here.

- Managing services on servers is another critical responsibility of a
SRE. Systemd related commands can help in troubleshooting issues.
If a service goes down, we can start it using systemctl start
command. We can also stop a service in case it is not needed.

- Monitoring is another core responsibility of a SRE. Memory and CPU
are two important system level metrics which should be monitored.
Commands like top and free are quite helpful here.

- If a service is throwing an error, how do we find out the root cause
of the error ? We will certainly need to check logs to find out
the whole stack trace of the error. The log file will also tell us
the number of times the error has occurred along with time when it
started.

## Useful courses and tutorials

- Edx Red Hat Enterprise Linux Course - [https://courses.edx.org/courses/course-v1:RedHat+RH066x+2T2017/course/](https://courses.edx.org/courses/course-v1:RedHat+RH066x+2T2017/course/)

0 comments on commit 18857dc

Please sign in to comment.