Linux Basic Commands
Linux Basic Commands
1. ls
The ls command is used for viewing files, folders and directories.
Ex: ls filename
ls directory/
2. cd
The cd command - change directory - will allow the user to change between
file directories
Ex: cd directory/
3. mv
The mv command - move - allows a user to move a file to another folder or
directory
Ex: mv filename directory/
4. cp
The cp command - copy - allows a user to copy or rename a file.
Ex: cp filename filename1
5. rm
The rm command - remove - like the rmdir command is meant to remove files
from the directories.
Ex: rm filename
6. mkdir
The mkdir - make directory - command allows the user to make a new
directory.
Ex: mkdir directory_name
7. rmdir
The rmdir - remove directory - command allows the user to remove an existing
directory
Ex: rmdir directory_name
8. vi
The vi command allows the user to create a file using vi editor
Ex: vi filename
mysql -u root -p
where u= Username
p= Password
2. Select a database:
Ex: use database_name;
4. Create databases:
Ex: create database_name;