Linux - Terminal

  • File System => Everything is a File
    • / => Root
    • bin => Includes binaries or programs
    • boot => Files related to booting
    • dev => Files that are needed to access devices
    • etc => Editable Text Configuration
    • home => Stores home directories for users
    • root => Home directory of root user
    • lib => Keeps library files like software library dependencies
    • var => Variables contains files that are updated frequently, log files, application data
    • proc => Files that represent running processes
  • Ubuntu Linux
    • docker run ubuntu
    • docker run -it imageName => Runs Container in interatice mode in shell which is a program that takes our command and passes it to OS for execution
    • root@id:/# => Root user with id of machine, "/" represents root directory, "#" represents that the user is root with highest privileges
    • echo $0 => Shows location of the shell program
    • history => Shows history of all commands => !n to run that no. command
  • Package Manager => Advanced Package Tool (APT)
    • apt
    • apt list => Shows all the packages
    • apt update => Update package database
    • apt install nano => Install this package
    • apt remove nano
  • File Compression
    • tar -czvf dirName.tar.gz dirName => Create tarball
    • tar -tzvf dirName.tar.gz => See what is in the tarball
    • tar -xzvf dirName.tar.gz => Extract tarball
Share: