Linux Commands Use Cases
- zip & unzip. It works on Windows CMD, too
tar -czvf 123.zip 1.sh 2.sh 3# zip file 1.sh and file 2.sh and folder 3 into 123.zipmkdir 123 && mv 123.zip 123# Create an empty directoy and move the .zip file into ittar -xzvf 123.zip# unzip 123.zip and extract all files and folders inside folder 123 - Check installed Linux kernels
cat /etc/os-release - Stop & start GUI
sudo systemctl stop gdmsudo systemctl start gdm headandtailn number of lines (default is 10)head file -n 30tail file -n 5- Open & close a command line prompt
Ctrl + Alt + Texit - About
cpandmv, evenscporrsynccp /path/to/file /path/to/dirorcp -r /path/to/dir /path/to/another_dirThese are but the basic commands to copy a file or a folder into another folder(directory). It's the same withmv,scpandrsynccommands.
In Windows, we know we can copy a file or a folder into another folder and then rename it. We can also do this in Linux but with just one stepcp /path/to/file /path/to/dir/new_file_nameorcp -r /path/to/dir /path/to/dir/new_dir_name. The same is also true withmv,scpandrsynccommands. - Find all processes that using a certain port and kill them all
sudo netstat -tulnp | grep ':[PORT]'kill -9 [PID] - Debug when the bluetooth can't be turned on
sudo apt install git dkms
git clone https://github.com/jeremyb31/bluetooth-6.8.git
sudo dkms add ./bluetooth-6.8
sudo dkms install btusb/4.2
reboot
sudo apt remove bluetooth
sudo apt install bluetooth
sudo systemctl enable bluetooth
sudo systemctl start bluetooth
reboot
Copied to clipboard
Share this post
Related Posts
Linux Commands Cheat Sheet
Linux commands cheat sheet: comprehensive reference covering basic commands, man pages, and help options.
How to install custom fonts on Linux
Install custom fonts on Linux: fc-list command, OTF/TTF file installation, font cache updates, verification steps.
Deploy Django on Ubuntu with Caddy && Gunicorn
Django deployment on Ubuntu with Caddy and Gunicorn: Gunicorn installation, worker configuration, Caddy reverse proxy.
Add SSL Certificate for Django Deployed with Apache on Ubuntu
Add SSL certificate to Django Apache deployment: ZeroSSL free certificates, SCP file transfer, Apache SSL config.