GithubHelp home page GithubHelp logo

b-duncs / holbertonschool-system_engineering-devops Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 136 KB

Introduction to Shell

Shell 69.69% Puppet 2.59% Python 27.72%
shell-basics shell-permissions shell-scripts shell-redirections shell-filters shell-variables shell-expansions shell-loops shell-conditions shell-parsing

holbertonschool-system_engineering-devops's Introduction

holberton-system_engineering-devops

0x00. Shell, basics

man or help

  • cd: change directory
  • ls: list directory contents
  • pwd: print name of current working directory
  • less: view file contents
  • file: determine file types
  • ln: create hard and symbolic links
  • cp: copy file and directories
  • mv: move/rename files and directories
  • rm: remove files and directories
  • mkdir: create directories
  • type: indicate how a command line name is interpreted
  • which: display which executable program will be executed
  • help: get help for shell builtins
  • man: display a command's manual page

0x01. Shell, permissions

man or help

  • chmod: change a file's mode
  • sudo: execute a command as another user
  • su: return a shell as another user
  • chown: change a file's owner
  • chgrp: change a file's group owner
  • id: display the user identity
  • groups: print the groups a user is in
  • whoami: print effective userid
  • adduser: creates a new user in the system
  • useradd: creates a new user
  • addgroup: creates a new group in the system

0x02. Shell, I/O redirections and filters

man or help

  • echo: display a line of text
  • cat: concatenate files
  • head: output the first part of a file
  • tail: output the last part of a file
  • find: search for files in a directory hierarchy
  • wc: print newline, word, and byte counts for each file
  • sort: sort lines of text
  • uniq: report or omit repeated lines
  • grep: print lines matching a pattern
  • tr: translate or delete characters
  • rev: reverse lines characterwise
  • cut: remove sections from each line of files
  • passwd (5) (i.e. man 5 passwd): passwd - password file

0x03. Shell, init files, variables, and expansions

man or help

  • printenv: print all or part of environment
  • set: set or unset options and positional parameters
  • unset: unset values and attributes of variables and functions
  • export: set the export attribute for variables
  • alias: define or display aliases
  • unalias: remove alias definitions
  • .: execute commands in the current environment
  • source: contains sample profile files for general or individual use
  • printf: format and print data

0x04. Shell, loops, conditions, and parsing

man or help

  • env: run a program in a modified environment
  • cut: remove sections from each line of files
  • for: repeatedly execute a set of commands for every element present
  • while: repeatedly execute a set of commands as long as the COMMAND returns true
  • until: executes a set of commands as long as the final command has an exit status which is not zero
  • if: executes commands based on conditions

0x05. Shell, processes and signals

man or help

  • ps: report a snapshot of the current processes
  • pgrep: looks through the currently running processes and lists the process IDS which match the selection criteria to stdout
  • pkill: will send the specified signal (by default SIGTERM) to each process instead of listing them on stdout
  • kill: terminate a process
  • exit: cause normal process termination
  • trap: trap signals

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.