Giter Site home page Giter Site logo

linux-cheat-sheet's Introduction

๐Ÿ’Ž LINUX CHEATSHEET

โ˜‘๏ธ Let's Hands-on the Linux Commands for working on Super Useful and Powerful Linux Command Line Interface (CLI) ๐ŸŒ€

********************** โญ• LINUX SYSTEM COMMANDS โญ• *********************************

  • sudo :short name for "SuperUser Do" enables to perform tasks which require administrative or root permissions
  • ls :list of directories
  • stat :details of inode
  • gcc file_name.c -o myexe :create object file while compilation and create separate excecutable
  • mkdir :make new directory
  • rmdir :remove directory
  • rm :remove file
  • touch :create new file
  • make :runs the makefile (makefile: used to manage project)
  • cd :enter into directory
  • cp :copy files from current directory to diff directory
  • pwd :prints current working directory
  • cat file_name :list the contents of file
  • mv file_name source dest :move file from source to destination
  • find :searches for the files and directories
  • df :to get report of system disk space usage (in % and kb)
  • df -m :to get report of system disk space usage (in mb)
  • du :to check space used by file or directory (in blocks)
  • du -h :to check space used by file or directory (in bytes, kb and mb)
  • tar :used to archieve multiple files
  • chmod :to change read, write and execute permissions of file or directory
  • ping :to check connectivity status (ping google.com)
  • wget :to download required data from internet (eg wget download_link)
  • uname :nothing but stands for Unix Name (tells the unix type you are using)
  • history :gives list of commands used by you on terminal till date
  • zip :zip multiple files
  • unzip :unzip the zip folder
  • clear :to clean out the terminal with all past commands (but it is still there in history)
  • rm -rf .git :to remove hidden .git folder in linux

*********************** โญ• LINUX SHUTDOWN COMMANDS โญ• *********************************

  • shutdown -h now :immediately power off & shutdown the system
  • shutdown -h +5 :shutdown the system after 5 minutes
  • shutdown -r now :reboot the system
  • shutdown -Fr now :force file system check during reboot

*********************** โญ• LINUX FUNCTIONS โญ• *********************************

  • stat(file_name,address of stat object) :gives information about file
  • lstat(file_name(path)),address of stat object) :same as stat() but for symbolic links/soft links it returns info of link iself instead of target file
  • fstat(file_descriptor,address of stat object) :gives metadata
  • access(file_name,mode_of_permission) :return positive int if process has access of the requested mode/mode_of_permission
  • opendir() :directory file handling
  • readdir() :read contents of directory (data cannot be written in directory)
  • closedir() :close the opened directory
  • chmod(abs or rel path,mode)( :system call to change the file permisssions mode
  • fchmod(file_descriptor,mode) :system call to change the file permisssions mode
  • chdir(path) :<unistd.h> change the current working directory
  • fchdir(fd) :same as above (both returns 0 on success & -1 on failure)

linux-cheat-sheet's People

Contributors

wadermanasi avatar

Stargazers

 avatar  avatar

Watchers

 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.