Directory Structure of Linux file system

  • opt – OPTional software and packages
  • bin – Essential command binaries are stored here
  • sbin – Essential system binaries
  • etc – Contains configuration files
  • home – Any users home directories
  • lib – contains common libraries
  • mnt – Temporary file system file pendrives and cd drives comes under this directory
  • proc – Contains virtual file system and stores kernal info
  • tmp – temporary files are stored in this directory and files in this dir get deleted after restart
  • usr – Contains user program and user data
  • var – (variable)files and folders where system writes during and operation example system logs

Linux Essentails

  • If $ symbol comes up after login in your terminal this means you have logged in as a user
  • If # symbols comes up after login in you terminal means you have logged in as root user
  • su (super user)command, it is used to login to an user account, if user name is not mentioned then su command will enter into root user.
    su tyson
  • whoami – print which user you have logged in as in linux
  • passwd – is the command to change the password of login
  • id – unique id of the user is printer, for root it is zero
  • which python
  • whereis python

Bashrc and BashProfile Specific Change

  • All the terminal specific changes(change color or change PS1) that you want to do can be done in ~/.bashrc file, below code add username@[directory_name] to your terminal
PS1="\u@[\W] $";
export PS1;

Leave a Comment