Linux Web Programming
Common Linux Commands
Common Commands in Linux
- Install MariaDB server and client
- Update the server:
sudo apt update -y
- Add the official MariaDB apt repository:
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
- Install the MariaDB server and client:
sudo apt-get install mariadb-server mariadb-client -y
- Check the status:
sudo systemctl status mariadb
- Open a text file for reading:
cat "mytext.txt" or less "mytext.txt" to page and search the file for "findthis" by entering /findthis. Press q to quit.
- Check for listening ports:
ss -nlt
- Display a dynamic view of the currently running processes and threads:
top
- Make a new directory inside the current directory. Use
mkdir mydir make a directory name "mydir" inside the current directory.
- To remove an empty directory, use
rmdir mydir remove the empty directory "mydir".
- To remove a file, use
rm myfile remove the file "myfile".
- To remove a directory and everything in it, use
rm -r mydir remove the directory "mydir" and remove everything within it recursively.
- Change the current directory. Use
cd mydir to switch to the directory "mydir" inside the current directory.
- List the contents of the current directory:
ls or ls -a to list everything.
- Get your current username:
whoami
- Print the name of the current working directory:
pwd
- Check what is installed:
apt list --installed or dpkg --list | more
- For the next page, press <space>. For the next line, press <Enter>. Press "q" to quit or "h" for help.
© 20072025 XoaX.net LLC. All rights reserved.