sudo
: Super User Do sudo -i
: Switch to root userapt-get
: Advanced Packaging Tool sudo apt-get update
: Update software listsudo apt-get upgrade
: Upgrade softwaresudo apt-get install <package>
: Install packagesudo apt-get remove <package>
: Remove packagesudo apt-get autoremove
: Remove unused packagessudo apt-get clean
: Clean cachesudo apt-get autoclean
: Clean cache and unused packagessudo apt-get purge <package>
: Remove package and configuration filesdpkg
: Debian Package sudo dpkg -i <package>
: Install packagesudo dpkg -r <package>
: Remove packagels
: List files ls -a
: List all files including hidden filesls -l
: List files in detailcd
: Change directory cd ..
: Go to parent directorycd ~
: Go to home directorycd -
: Go to previous directorypwd
: Print working directorymkdir
: Make directory mkdir dir1 dir2 dir3
touch
: Create file touch file1 file2 file3
cp
: Copy file cp -r
: Copy directorycp <source> <destination>
mv
: Move file mv -r
: Move directorymv <old_name> <new_name>
: Rename filemv <file> <directory>
: Move file to directoryrm
: Remove file rm -r
: Remove directoryrm -f
: Force removerm -rf
: Force remove directorychmod
: Change mode chmod 777 <file>
: Give all permissions to file&&
: Logical AND command1 && command2
: Execute command2 if command1 is successful-y
: Yes sudo apt-get install -y <package>
: Install package without asking|
: Pipe command1 | command2
: Pipe the output of command1 to command2grep
: Global Regular Expression Print ls -l | grep <pattern>
: Search for pattern in output of ls -lStrongly recommend the Missing Semester course from MIT. It is a very good course for learning Linux and shell Link. My notes for this course can be found here.