Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tikam02 committed Jul 24, 2022
2 parents f46a72c + e4dfbeb commit 6cab862
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Container-orchestration/Docker/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Docker Tutorial
**********
### Table of Contents:
1. [Basic Concept of Images and Containers](https://github.com/Tikam02/DevOps-Guide/blob/master/Docker/docker-concepts.md)
1. [Basic Concept of Images and Containers](https://github.com/Tikam02/DevOps-Guide/blob/master/Container-orchestration/Docker/docker-concepts.md)
2. [Docker Setup](#2-setting-up-docker)
3. [Developing Fullstack WebApp With Node-js](#3-flask-web-app)
4. [Writing Dockerfile](#4-writing-dockerfile)
Expand All @@ -13,7 +13,7 @@

## 1. Basic concepts of docker - Containers and Images

- Detailed Docker concepts and notes from here - [Docker Concepts](https://github.com/Tikam02/DevOps-Guide/blob/master/Docker/docker-concepts.md)
- Detailed Docker concepts and notes from here - [Docker Concepts](https://github.com/Tikam02/DevOps-Guide/blob/master/Container-orchestration/Docker/docker-concepts.md)

- Introduction to Docker:

Expand Down
2 changes: 1 addition & 1 deletion Interview/Dev-ops-Interview.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@

- Q3) How do you start/stop services?
- (deprecated) service start/stop service_name
- systemctl strat/stop service_name
- systemctl start/stop service_name

- Q4) How do you display the shell’s environment variables?
- env
Expand Down
137 changes: 137 additions & 0 deletions LINUX/Basic_Command
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
## LINUX COMMAND

##DIRECTORY

sudo - super user do
---
pwd --> displays present working directory
---
mkdir (directory name) --> This command create a directory
---
cd (directory/folder where you want to navigate) -->This command change directory.
---
ls --> lists contents of current directory
---
ls -l --> list contents of current directory with detailed output
---
ll --> list contents of current directory with detailed output
---
cd <folder>
---
cd .. --> to come out of a directory
---
rm -r testdir --> to remove a directory
---
~ --> Home directory
---
mkdir -p folder/subfolder/subfolder2 --> create parent and child directory

---
---

##FILE

touch test.txt(file name) --> creates a empty file
---
ls -l --> lists the contents in current directory
---
echo Print Output

echo "This is a text" > test.txt
---
cat test.txt --> writes the content of file into terminal & exits
---
more test.txt --> writes the content of file on terminal page by page ( to move to next page need to hit space bar on keyboard )
---
less test.txt --> open the file on terminal & can be read line by line (use arrows to scroll up & down)

To comeout need to press 'q' on the key board
---
vi test.txt --> Visual Editor
-This opens the file in read only mode
-To edit the file, press 'i' on keyboard for INSERT mode & then you can write anything
-once the text is entered, press 'ESC' on keyboard to return back on readonly mode
-press ':wq' on keyboard -- to save & come out of the file
-press ':q' on keyboard -- to come out of the file without saving
-press ':wq!' on keyboard -- to save forcefully & come out of the file
-press ':q!' on keyboard -- to come out of the file forcefully without saving
---
rm test.txt --> To remove a file
---
COPY/RENAME/MOVE/OPERATION

While performing these operations, we can always use absolute paths or relative paths accrodingly.
These commands expects source & dest values

cp A.txt B.txt --> makes a copy of A.txt names it to B.txt in current directory

cp /home/A.txt /tmp/A.txt --> make a copy of A.txt to /tmp

cp -r testdir/ newdir/ --> makes a copy of testdir & names it to newdir in current dirctory

cp -r /home/testdir /tmp/testdir --> makes a copy of testdir to /tmp

mv A.txt new.txt ---> renames A.txt to new.txt in current path

mv A.txt /tmp ---> moves to A.txt to /tmp

mv testdir newdir --> renames testdir to newdir in crrent path

mv newdir /tmp ---> moves newdir to /tmp path

---

##PERMISSION

Observe the output of ls:

drwxrwxr-x 2 manifoldailearning manifoldailearning 4096 Nov 7 23:38 testdir
-rw-rw-r-- 1 manifoldailearning manifoldailearning 126 Nov 7 23:37 abc.txt
-rw-rw-r-- 1 manifoldailearning manifoldailearning 126 Nov 7 23:38 one.txt

drwxrwxr-x or -rw-rw-r-- --> Read/Write/Execute Permission for a file or a directory in linux

(1st value)manifoldailearning --> owner of the file/directory
(2nd value)manifoldailearning --> group who owns file/directory

---

How to update the owner & group for a file/dir -

chown ( change owner ) is the command to update the owners of dir/file
note: note that you need to have previliges to update the permissions for a file/directory

Syntax: chown owner:group filename/dirname

---

How to update the read,write & execute permissions for a file/dir

How to decode the Read/Write/Execute Permission terminology:

-/d ---> denotes if it is a file or directory ( - means file / d means directory )
rwx ---> means read,write & execute permissions for super user ( root )
rw- ---> means read,write permissions for the owner of the file ( ex: manifoldailearning as above )
r-- ---> means read only permissions for others ( whoever login to the machine )


r --> Permission to read the file.
w --> Permission to write (or delete) the file.
x --> Permission to execute the file, or, in the case of a directory, search it.

chmod ( change mode ) is the command to update the read/write/execute permissions for a file/directory
r = 4, w = 2, x = 1

- | rwx | rwx | rwx
- | 421 | 421 | 421

To update the permissions we can sum 421
If super user needs to have read,write & exeute give 7
If the owner need to read & write give 6
If other need to have only read give 4


chmod 777 file/dir -- rwx for root, rwx for owner, rwx for others
chmod 764 file/dir -- rwx for root, rw for owner, r for others
chmod 755 fire/dir -- rwx for root, rw for owner, rw for others
---
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

- [What is Devops - AWS](https://aws.amazon.com/devops/what-is-devops/)
- [What is DevOps - Logit.io](https://logit.io/blog/post/what-is-devops)
- [DevOps Roadmap by kamranahmedse](https://github.com/kamranahmedse/developer-roadmap/blob/master/img/devops.png)
- [DevOps Roadmap by kamranahmedse](https://github.com/kamranahmedse/developer-roadmap/blob/master/public/roadmaps/devops.png)
- [Devops Roadmap by Nguyen Truong Duong](https://github.com/raycad/devops-roadmap)
- [Roadmap To devops](https://medium.com/faun/the-roadmap-to-become-a-devops-dude-from-server-to-serverless-dd97420f640e)
- [r/devops](https://www.reddit.com/r/devops/)
Expand All @@ -93,6 +93,8 @@
- [DevOps Getting Started](https://medium.com/@devfire/how-to-become-a-devops-engineer-in-six-months-or-less-366097df7737)
- [How-to-get-started-with-devops](https://dev.to/liquid_chickens/how-to-get-started-with-devops)
- [Going-from-it-to-devops](https://medium.com/better-programming/going-from-it-to-devops-996192520331)
- [How to Become a DevOps Engineer in Six Months](https://spacelift.io/blog/how-to-become-devops-engineer)
- [Who is DevOps? Is it Worth it to Become a DevOps Engineer?](https://spacelift.io/blog/who-is-devops-engineer)

**************************

Expand Down
4 changes: 2 additions & 2 deletions Servers/basics/caching-servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**What is Caching ?**

Caching is the process of storing copies of files in multiple temporary locations to help users access access the data faster. This process speeds up the process of accesing web content over the Internet. A Cache server by default allows all outgoing requests and monitors all incoming requets.
Caching is the process of storing copies of files in multiple temporary locations to help users access access the data faster. This process speeds up the process of accessing web content over the Internet. A Cache server by default allows all outgoing requests and monitors all incoming requets.

![Cache Server](https://github.com/Tikam02/DevOps-Guide/blob/master/img/Cache.png)

Expand All @@ -20,4 +20,4 @@ A proxy server handles the flow of requests on the server. The Cache server is i

- Content Delivery Network (CDN) Cache
- Database cache
- General Cache
- General Cache

0 comments on commit 6cab862

Please sign in to comment.