Giter Site home page Giter Site logo

ronlabs / holberton-system_engineering-devops-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rennleon/holberton-system_engineering-devops

1.0 0.0 0.0 1.11 MB

Start learning shell using basic commands

Shell 54.18% Ruby 1.71% Python 22.87% C 1.88% Puppet 10.39% HTML 8.97%

holberton-system_engineering-devops-1's Introduction

holberton-system_engineering-devops

Resources

Read or watch:

man or help:

  • cd
  • ls
  • pwd
  • less
  • file
  • ln
  • cp
  • mv
  • rm
  • mkdir
  • type
  • which
  • help
  • man

Learning Objectives

At the end of this project, you are expected to be able to explain to anyone, without the help of Google:

General

  • What does RTFM mean?
  • What is a Shebang

What is the Shell

  • What is the shell
  • What is the difference between a terminal and a shell
  • What is the shell prompt
  • How to use the history (the basics)

Navigation

  • What do the commands or built-ins cd, pwd, ls do
  • How to navigate the filesystem
  • What are the . and .. directories
  • What is the working directory, how to print it and how to change it
  • What is the root directory
  • What is the home directory, and how to go there
  • What is the difference between the root directory and the home directory of the user root
  • What are the characteristics of hidden files and how to list them
  • What does the command cd - do

Looking Around

  • What do the commands ls, less, file do
  • How do you use options and arguments with commands
  • Understand the ls long format and how to display it
  • A Guided Tour
  • What does the ln command do
  • What do you find in the most common/important directories
  • What is a symbolic link
  • What is a hard link
  • What is the difference between a hard link and a symbolic link

Manipulating Files

  • What do the commands cp, mv, rm, mkdir do
  • What are wildcards and how do they work
  • How to use wildcards

Working with Commands

  • What do type, which, help, man commands do
  • What are the different kinds of commands
  • What is an alias
  • When do you use the command help instead of man

Reading Man Pages

  • How to read a man page
  • What are man page sections
  • What are the section numbers for User commands, System calls and Library functions

Keyboard Shortcuts for Bash

  • Common shortcuts for Bash

LTS

  • What does LTS mean?

Requirements

General

  • Allowed editors: vi, vim, emacs
  • All your scripts will be tested on Ubuntu 14.04 LTS
  • All your scripts should be exactly two lines long ($ wc -l file should print 2)
  • All your files should end with a new line (why?)
  • The first line of all your files should be exactly #!/bin/bash
  • A README.md file at the root of the holberton-system_engineering-devops repo, containing a description of the repository
  • A README.md file, at the root of the folder of this project, describing what each script is doing
  • You are not allowed to use backticks, &&, || or ;
  • All your scripts must be executable. To make your file executable, use the chmod command: chmod u+x file. Later, well learn more about how to utilize this command.

More Info

Example of line count and first line

julien@ubuntu:/tmp$ wc -l 12-file_type
2 12-file_type
julien@ubuntu:/tmp$ head -n 1 12-file_type
#!/bin/bash
julien@ubuntu:/tmp$

In order to test your scripts, you will need to use this command: chmod u+x file. We will see later what does chmod mean and do, but you can have a look at man chmod if you are curious.

Example

julien@ubuntu:/tmp$ ls
12-file_type
lll
julien@ubuntu:/tmp$ ls -la lll
-rw-rw-r-- 1 julien julien 15 Sep 19 21:05 lll
julien@ubuntu:/tmp$ cat lll
#!/bin/bash
ls
julien@ubuntu:/tmp$ ls -l lll
-rw-rw-r-- 1 julien julien 15 Sep 19 21:05 lll
julien@ubuntu:/tmp$ chmod u+x lll # you do not have to understand this yet
julien@ubuntu:/tmp$ ls -l lll
-rwxrw-r-- 1 julien julien 15 Sep 19 21:05 lll
julien@ubuntu:/tmp$ ./lll
12-file_type
lll
julien@ubuntu:/tmp$

Resources

Read or watch:

man or help:

  • chmod
  • sudo
  • su
  • chown
  • chgrp
  • id
  • groups
  • whoami
  • adduser
  • useradd
  • addgroup

Learning Objectives

At the end of this project, you are expected to be able to explain to anyone, without the help of Google:

Permissions

  • What do the commands chmod, sudo, su, chown, chgrp do
  • Linux file permissions
  • How to represent each of the three sets of permissions (owner, group, and other) as a single digit
  • How to change permissions, owner and group of a file
  • Why cant a normal user chown a file
  • How to run a command with root privileges
  • How to change user ID or become superuser

Other Man Pages

  • How to create a user
  • How to create a group
  • How to print real and effective user and group IDs
  • How to print the groups a user is in
  • How to print the effective userid

Requirements

General

  • Allowed editors: vi, vim, emacs
  • All your scripts will be tested on Ubuntu 14.04 LTS
  • All your scripts should be exactly two lines long ($ wc -l file should print 2)
  • All your files should end with a new line (why?)
  • The first line of all your files should be exactly #!/bin/bash
  • A README.md file, at the root of the folder of the project, describing what each script is doing
  • You are not allowed to use backticks, &&, || or ;
  • All your files must be executable

Resources

Read or watch:

man or help:

  • echo
  • cat
  • head
  • tail
  • find
  • wc
  • sort
  • uniq
  • grep
  • tr
  • rev
  • cut
  • passwd (5) (i.e. man 5 passwd)

Learning Objectives

At the end of this project, you are expected to be able to explain to anyone, without the help of Google:

Shell, I/O Redirection

  • What do the commands head, tail, find, wc, sort, uniq, grep, tr do
  • How to redirect standard output to a file
  • How to get standard input from a file instead of the keyboard
  • How to send the output from one program to the input of another program
  • How to combine commands and filters with redirections

Special Characters

  • What are special characters
  • Understand what do the white spaces, single quotes, double quotes, backslash, comment, pipe, command separator, tilde and how and when to use them

Other Man Pages

  • How to display a line of text
  • How to concatenate files and print on the standard output
  • How to reverse a string
  • How to remove sections from each line of files
  • What is the /etc/passwd file and what is its format
  • What is the /etc/shadow file and what is its format

Requirements

General

  • Allowed editors: vi, vim, emacs
  • All your scripts will be tested on Ubuntu 14.04 LTS
  • All your scripts should be exactly two lines long ($ wc -l file should print 2)
  • All your files should end with a new line (why?)
  • The first line of all your files should be exactly #!/bin/bash
  • A README.md file, at the root of the folder of the project, describing what each script is doing
  • You are not allowed to use backticks, &&, || or ;
  • All your files must be executable
  • You are not allowed to use sed or awk

More Info

Read your /etc/passwd and /etc/shadow files. Note: You do not have to learn about fmt, pr, du, gzip, tar, lpr, sed and awk yet.

Resources

Read or watch:

man or help:

  • printenv
  • set
  • unset
  • export
  • alias
  • unalias
  • .
  • source
  • printf

Learning Objectives

At the end of this project, you are expected to be able to explain to anyone, without the help of Google:

General

  • What happens when you type $ ls -l *.txt

Shell Initialization Files

  • What are the /etc/profile file and the /etc/profile.d directory
  • What is the ~/.bashrc file

Variables

  • What is the difference between a local and a global variable
  • What is a reserved variable
  • How to create, update and delete shell variables
  • What are the roles of the following reserved variables: HOME, PATH, PS1
  • What are special parameters
  • What is the special parameter $??

Expansions

  • What is expansion and how to use them
  • What is the difference between single and double quotes and how to use them properly
  • How to do command substitution with $() and backticks

Shell Arithmetic

  • How to perform arithmetic operations with the shell

The alias Command

  • How to create an alias
  • How to list aliases
  • How to temporarily disable an alias

Other help pages

  • How to execute commands from a file in the current shell

Requirements

General

  • Allowed editors: vi, vim, emacs
  • All your scripts will be tested on Ubuntu 14.04 LTS
  • All your scripts should be exactly two lines long ($ wc -l file should print 2)
  • All your files should end with a new line (why?)
  • The first line of all your files should be exactly #!/bin/bash
  • A README.md file, at the root of the folder of the project, describing what each script is doing
  • You are not allowed to use &&, || or ;
  • You are not allowed to use bc, sed or awk
  • All your files must be executable

More Info

Read your /etc/profile, /etc/inputrc and ~/.bashrc files. Look at some files in the /etc/profile.d directory. Note: You do not have to learn about awk, tar, bzip2, date, scp, ulimit, umask, or shell scripting, yet.

Manual QA Review

It is your responsibility to request a review for your blog from a peer before the projects deadline. If no peers have been reviewed, you should request a review from a TA or staff member.

This project is about basic shell scripting below the learning obejctives are listed for this project

Learning Objectives

  • How to create SSH keys
  • What is the advantage of using #!/usr/bin/env bash over #!/bin/bash
  • How to use while, until and for loops
  • How to use if, else, elif and case condition statements
  • How to use the cut command
  • What are files and other comparison operators, and how to use them

holberton-system_engineering-devops-1's People

Contributors

rennleon avatar

Stargazers

LoreCG avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.