- Check Ubunto Version:
lsb_release -a
- Change Directory :
cd
- Goto root directory:
cd /
- Check file/directory:
ls
- Check file/directory with details :
ls -l
Explain: drwxr-xr-x => if exixts d that means ‘directory’, l means link, otherwise means ‘file’. - Goto home:
cd /home
(in my laptop- cd irfan). - Where I’ m now to check:
pwd
- Create a new file:
touch <myfile.txt>
- Copy one file to another :
cp <file1.txt> <file2.txt>
- Remove file:
rm file2.txt
- Remove Directory:
rm -rf <test_folder>
- Move file to folder : mv <myfile.txt> <php/myfile123.txt>
- Copy file and paste one directory back:
cp myfile123.txt ../fileagain.txt
- Create Directory:
mkdir another_dir
- PC Shutdwon:
shutdwon now
- PC Restart:
sudo shutdwon -r now
cd Downloads
ls
sudo apt install ./discord-0.0.47.deb
to install all software in one command : sudo apt install docker-desktop-4.17.0-amd64.deb firefox.tmp microsoft-edge-dev_112.0.1702.3-1_amd64.deb
-
Open the file manager or terminal on your Ubuntu system
-
Navigate to the directory where your Git repository is located.
-
Press
Ctrl+H
to show hidden files and folders. This will make the ".git" folder visible in the file manager or terminal -
To hide the hidden files and folders again, press
Ctrl+H
again.
sudo chmod -R a+rwx /path/to/folder
to give permissions to the selected folder and its files.
-
To Give Directory and it’s all files permission access
sudo chmod -R a+rwx /path/to/folder
to give permissions to the selected folder and its files. -
To change permission access to 0755 or 0644
chmod 0755 your_file_or_directory
chmod 0644 your_file_or_directory
-
To change permission access on Directory-0755 and Files – 0644
find /path/to/your/project -type d -exec chmod 0755 {} +
find /path/to/your/project -type f -exec chmod 0644 {} +
-
/varwww/html file permission access
sudo chmod 777 /var/www/html -R
- display list
sudo update-alternatives --config php
- For Disable
sudo a2dismod php8.2
- For Enable
sudo a2enmod php7.4
- For Start
sudo service apache2 restart
or,
systemctl restart apache2
-
You can execute the command below to change the version straight away:
sudo update-alternatives --set php /usr/bin/php7.4
sudo apt-get remove php5.6
Also, uninstall all the modules for that version, Run the following command:
sudo apt-get remove php5.6-*
sudo systemctl start apache2
sudo systemctl stop apache2
sudo systemctl status apache2
sudo systemctl reload apache2
Ref: https://phoenixnap.com/kb/ubuntu-start-stop-restart-apache
sudo service mysql start
sudo service mysql stop
sudo service mysql restart
sudo service mysql status
sudo /opt/lampp/./manager-linux-x64.run
sudo systemctl stop apache2 && sudo service mysql stop && sudo /opt/lampp/./manager-linux-x64.run
sudo systemctl start apache2 && sudo service mysql start
To switch to root, then execute the curl command.
sudo -s -H
Ref : https://stackoverflow.com/questions/68724464/docker-not-running-ubuntu-20-04
Ref : https://github.com/thecodeholic/php-developer-roadmap
- To Open : sudo nano /etc/php/8.1/cli/php.ini
- To Search any word : Ctrl + W (and then type the word and press ENTER)
- To Save file : Ctrl + O (fille name will be shown, then press ENTER)
- To Exit from Terminal : Ctrl + X
1. cd /var/www
2. sudo rm -r your_website_directory
https://itsfoss.com/install-xampp-ubuntu/
https://stackoverflow.com/questions/23411520/how-to-fix-error-laravel-log-could-not-be-opened