Basic Linux(Debian) Command

Full Forms

sudo: super user do

apt: Advanced Packaging Tool

pip: Package Installer for Python

dpkg: Debian PacKaGe manager

Press Ctrl + O for Save

clear: Clean terminal

sudo shutdown now : Shut Down Lubuntu

ssh linux default port: port: 22

TypeLinux CommandFunction
Updatesudo apt update 
 sudo apt upgrade 
 sudo apt update && sudo apt upgrade 
Software Installationsudo apt install app_nameDirect install From Server
 cd /path Go to directory where software is present
 sudo dpkg -i file_name.deb Install Downloaded app
 which app_nameVerify Installation
 dpkg –listAll installed APT package
 snap listAll Snap Application
 flatpak listAll Flatpak Application
 sudo apt install postgresqlPostgreSQL
 sudo apt install postgresql-contribPostgreSQL Contribution
 sudo apt install python3-venvVirtual Environment
Software Uninstallsudo apt remove app_nameUninstall App only
 sudo apt purge app_nameUninstall app and Config Files
Open Appsapp_name 
 firefoxOpen Firefox
 libreoffice –writerOpen Libre Writer
 python3Open Python Terminal
 codeOpen Visual Studio Code
Open File by Specific Appapp_name filename.extension 
 nano filename.txtOpen filename.txt in Nano Editor
 code test.pyOpen test.py file in VS Code
Disk/PartitionlsblkDisplay all block device (Disk/Partition)
 sudo fdisk -lDetailed info of disk
 sudo apt install gpartedInstall Gparted (GUI Partition Manager)
 gpartedOpen Gparted
Open URLxdg-open https://domainUniversal Url Open Method
 firefox https://domainOpen URL in firefox
Directory/Filescd /path Go to directory
 cd .. Go one step back from directory
 mkdir directory_nameCreate directory
 mkdir -p parent_directory/child_directoryCreate two director that is create parent directory first and then child directory inside it
 lsList the content of parent directory
 ls -l /path/to/directoryCheck full path of directory
 mkdir -m 755 directory_nameGive Specific Permission, eg; mkdir -m 700 secure_folder
 touch file_name.extensionCreate File
 nano filename.txtOpen text file in nano text editor
 rm filename.extensionTo delete file of current directory
 mv /source_path/filename.extension /destination_path/Move file from source directory to destination directory
 mv /source_path/directory /destination_path/directoryMove directory from source directory to destination directory
 cp /source_path/filename.extension /destination_path/Copy file from source directory to destination directory
 rmdir /directory_pathDelete Empty Directory
 rmdir -r /directory_pathDelete a directory with content
Remote Login (SSH) Setupsudo apt install openssh-serverInstall SSH Server
 sudo systemctl status sshCheck if SSH server is running
 sudo systemctl start sshIf SSH is not active please make activate
 sudo systemctl enable sshEnable ssh to start automatically while booting
 ip addrCheck IP address
 sudo ufw allow sshAllow ssh in firewall
 sudo nano /etc/ssh/sshd_configCheck ssh configuration for port no
SSH Loginssh host_user@ip_address 
Pythonpython3Open Python Terminal
 exit()Exit from python terminal
 python3 /path_to_script/script_name.pyRun Python Script
 sudo apt install python3-pipInstall pip
 pip3 –versionPip Version
 sudo apt install python3-biopythonInstall Biopython

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top