Using the Web Terminal in Shared Web Hosting
Introduction
The Web Terminal in the Web Control Panel allows you to execute UNIX-based commands directly through your browser, simulating access to a system's shell.
Key Information Before Starting
Every user session is contained within a "Jailed" environment. This ensures that your actions cannot interfere with other accounts, and critical root commands are disabled for safety.
Important Considerations
You are operating on a shared server, which does not support sudo
commands due to the server's architecture. Administrative commands like dnf update
or dnf install
are not available.
The Web Terminal is considered an open process (Task) on your side, you may encounter an error: -bash: fork: retry: Resource temporarily unavailable
. To avoid this, manage your tasks wisely or consider upgrading your hosting plan for higher limits.
From this terminal, you can run various commands like pip3
, npm
, or composer
to manage software packages.
How to Access the Terminal
- In the Web Control Panel, go to Development Tools > Terminal.
- You can start entering UNIX-based commands directly.
Using the Web Terminal
Before using the Web Terminal, check that its status is active. Here’s how to use some basic UNIX commands:
Basic File Commands
ls
: Lists files.ls -l
: Shows detailed file information.ls -a
: Lists all files, including hidden ones.more filename
: Views the contents of a file page by page.nano filename
: Opens a file in the nano editor.mv filename1 filename2
: Moves or renames a file.cp filename1 filename2
: Copies a file.rm filename
: Deletes a file. Add-i
to confirm before deleting.diff filename1 filename2
: Displays differences between two files.wc filename
: Counts lines, words, and characters in a file.chmod options filename
: Changes file permissions.
Managing Compression
gzip filename
: Compresses files, adding '.gz' to the filename.gunzip filename
: Decompresses '.gz' files.
Directory Management
mkdir dirname
: Creates a directory.cd dirname
: Changes the current directory.pwd
: Shows the current directory path.
Search Operations
whereis filename
: Finds the location of a file.grep string filename
: Searches within files for a string.
Learn more about these commands on Wikipedia's List of Unix commands.
Conclusion
The Web Terminal is a powerful extension of your Web Control Panel, enabling complex server management tasks directly from your browser. Use this tool responsibly to avoid any potential disruptions to your hosting environment.