Linux Commands
Linux Commands
1. ls command
The ls command lists the content of a folder, including files and directories.
Here’s the syntax:
ls [options] [directory_or_path]
2. pwd command
To check the full path of your current working directory, use the pwd command.
Its syntax is as follows:
pwd [options]
3. cd command
Use cd to navigate between directories in your Linux VPS. It doesn’t have any
option, and the syntax is simple:
cd [path_or_directory]
4. mkdir command
The mkdir command lets you create one or multiple directories. The syntax
looks like this:
mkdir [options] directory_name1 directory_name2
5. rmdir command
Run rmdir to delete empty directories in your Linux system. The command
syntax looks like this:
rmdir [options] directory_name
6. rm command
The rm command deletes files from a directory. You must have the write
permission for the folder or use sudo. Here’s the syntax:
rm [options] file1 file2
7. cp command
Use the cp command to copy files from your current directory to another folder.
The syntax looks like this:
cp file1 file2 [target_path]
8. mv command
The main usage of the mv command is to move a file or folder to another
location. Here’s the syntax:
mv file_or_directory [target_directory]
9. touch command
Run the touch command to create a new empty file in a specific directory. The
syntax is as follows:
touch [options] [path_and_file_name]
31. df command
The df command checks your Linux system’s disk usage, displaying the used
space in percentage and kilobyte (KB). The syntax looks like this:
df [options] [file system]
32. du command
To check the size of a directory and its content, use the du command. Here’s the
syntax:
du [directory]
35. ps command
The ps command summarizes the status of all running processes in your Linux
system at a specific time. Unlike top and htop, it doesn’t update the information
automatically. Here’s the syntax:
ps [options]
57. ln command
The ln command links files or directories with a shortcut. The syntax looks as
follows:
ln [options] source target