Day 11 Task: Linux & Github cheat-sheet
Linux & Github cheat-sheet Digrams.

Day 11 Task: Linux & Github cheat-sheet

In the Previous tasks, I have uploaded the Devops basics, Linus, shell Scripting, Git & GitHub. Now in these task we are learn Linux and GitHub commands.

Linux Commands:

# To check your present working directory:

pwd

No alt text provided for this image
pwd command diagram.

# List of all the files or directories

ls

No alt text provided for this image
List of all the files or directories diagram.

# Lists hidden files or directories:

ls -a

No alt text provided for this image
Lists hidden files or directories diagram.

# Create new directory:

mkdir <directory name>

No alt text provided for this image
Create new directory diagram.

# Multiple directory creation:

mkdir -p A/B/C/D

No alt text provided for this image
Multiple directory creation diagram.

# Remove directory

rmdir <directory name>

No alt text provided for this image
Remove Directory diagram.

# remove multiple directories.

rm -rf <directory name>

No alt text provided for this image
remove multiple directories diagram.

# Remove files:

rm <file name>

No alt text provided for this image
remove files diagram.

# change directory

cd <path where to move>

No alt text provided for this image
change directory diagram.

# create an empty file

touch <file name>

No alt text provided for this image
Create an empty file with touch diagram.

# copy file

cp <source path> <destination path>

No alt text provided for this image
cp command diagram

# move file

mv <source path> <destination path>

No alt text provided for this image
mv command Diagram

# To write some content inside a file

# To read the content without open a file

echo <message> > file name

cat <file name>

No alt text provided for this image
echo and cat command diagram,

# history (for check all running commands)

No alt text provided for this image
history command diagram.

# search a word

grep string <file name>

No alt text provided for this image
grep command diagram.

# return the specified number of lines from the top

head /etc/passwd

No alt text provided for this image
head command diagram

# Return the specified number of lined from the bottom.

tail /etc/passwd

No alt text provided for this image

# To show the disk space

df -H

No alt text provided for this image
df -H diagram

File Permissions:

# to change the permission of a file

No alt text provided for this image
chmod command diagram

# To change the file or directory ownership

sudo chown <username> <filename>

No alt text provided for this image
change the file or directory ownership diagram

# To change the group ownership

sudo chgrp <groupname> <filename>

No alt text provided for this image
change the group ownership diagram

User Managemnet:

# To create a new user

sudo add user <username>

No alt text provided for this image
add user diagram

# To set a password for user

sudo passwd <username>

No alt text provided for this image
set a password diagram.

Git Commands:

No alt text provided for this image

After Linux cheat sheet, now let us discuss the Git cheat sheet

# to initialise empty git repository, transforms the current directory into a git.list of all remote repositories.

No alt text provided for this image
git init commands diagram

# Clone an existing repository:

No alt text provided for this image
git clone repository diagram.

# Add files and changes from the working directory to the staging area.

No alt text provided for this image
git add diagram

# Add all current directory files to git:

No alt text provided for this image
git add . diagram

# Commit all the staged files to git.

No alt text provided for this image
git commit - m "commit messages" diagram

# To show the status of git repository:

No alt text provided for this image
git status command diagram.

Git Branch

# To list of all the branches

No alt text provided for this image
git branch diagram.

# Create a new branch:

No alt text provided for this image
git branch branch name diagram.

# For going to specific branch:

No alt text provided for this image
git checkout command diagram.

# for creating and going to that branch:

No alt text provided for this image
git checkout diagram

Remote Origin:

# list of all remote repositories that are currently connected to local repository

No alt text provided for this image
git remote diagram.

# To add remote origin url:

No alt text provided for this image
git remote add origin diagram

# To remove remote orgin url:

No alt text provided for this image
remove orign diagram

# To upload local repository content to a remote repository

No alt text provided for this image
git push origin command diagram.

# To pull your remote repository content to local repository

No alt text provided for this image
git pull origin diagram

# To fetech down all the branches form the git remote

No alt text provided for this image
git fetch diagram.

To check you git commit logs:

No alt text provided for this image
git log diagram

Git configuration

# To set a author name for all the commits by the current user:

No alt text provided for this image
git config --globsl user,name diagram

# To set author email to be used for all the commits by the user:

No alt text provided for this image
git config --global user.email diagram

# To merge the 2 branches in Git:

No alt text provided for this image
git merge Diagram,

Thank you for reading this article!!

Happy Learning !!


Next Topic:

Day 12: Basics of Python!!


Hello Maninder... We post 100's of job opportunities for developers daily here. Candidates can talk to HRs directly. Feel free to share it with your network. Visit this link - https://jobs.hulkhire.com And start applying.. Will be happy to address your concerns, if any

回复

要查看或添加评论,请登录

Maninder Singh的更多文章

  • Artificial Intelligence for DevOps Engineer

    Artificial Intelligence for DevOps Engineer

    Dear learners, In today article we will explain the Artificial Intelligence for the DevOps Engineers. Important Aspects…

    12 条评论
  • Bash Shell Scripting:- Lesson 7,8 &9 for DevOps Engineers.

    Bash Shell Scripting:- Lesson 7,8 &9 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 条评论
  • Bash Shell Scripting:- Lesson 4,5 &6 for DevOps Engineers.

    Bash Shell Scripting:- Lesson 4,5 &6 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 条评论
  • Bash Shell Scripting:- Lesson 1,2 &3 for DevOps Engineers.

    Bash Shell Scripting:- Lesson 1,2 &3 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 条评论
  • EP 2 DevOps:- 2 Tier Application Deployment

    EP 2 DevOps:- 2 Tier Application Deployment

    2-Tier Application Deployment Diagram (Architecture) Dear Learners in today topic we will deploy a 2 Tier Application…

    8 条评论
  • DevOps Engineers:- Docker Cheat Sheet

    DevOps Engineers:- Docker Cheat Sheet

    Dear learner, presented below is a concise yet comprehensive Docker cheat sheet, complete with detailed commands and…

    7 条评论
  • DevOps (Day-90): Ending the challengs

    DevOps (Day-90): Ending the challengs

    Table of Contents: Flashback Self-Impact of Learning Today, We have completed the 90days of DevOps challenge where we…

    16 条评论
  • DevOps (Day-88): Kubernetes Architecture

    DevOps (Day-88): Kubernetes Architecture

    Dear Learner's in today topic we will discuss the Kubernetes Architecture in detail. Table of Contents Kubernetes…

    1 条评论
  • DevOps (Day-87): Argo CD

    DevOps (Day-87): Argo CD

    Dear Learners in today topic we will the discuss the Argo CD in Kubernetes. Table of Contents Challenges with CD into…

    13 条评论
  • DevOps (Day-86): Project-7 Portfolio App

    DevOps (Day-86): Project-7 Portfolio App

    Dear Learners in Today's article we will deploying a Portfolio app on AWS S3 Bucket using GitHub. Table of Contents:…

    10 条评论

社区洞察

其他会员也浏览了