Book Image

Webmin Administrator's Cookbook

By : Michal Karzynski
Book Image

Webmin Administrator's Cookbook

By: Michal Karzynski

Overview of this book

Table of Contents (19 chapters)
Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Executing a command on the server


The simplest way to execute commands on your server that uses Webmin is the Command Shell module. In this recipe, we will execute a command that lists all network services running on our machine.

How to do it...

Perform the following steps to execute a netstat command:

  1. Navigate to Others | Command Shell.

  2. Type in a command in the textbox. To list all active network servers on your system, use the netstat –tl command.

  3. Click the Execute button.

You will be presented with a page showing the output of your command. At the bottom of the screen, you will see a form that allows you to execute another command. You can clear the command output by clicking the Clear history button:

How it works...

Webmin executes every command you type in as the root user by default, and saves each command into a history file for the currently logged in user. Webmin also keeps track of the directories you move into using the cd command, but other environment variables will not be preserved...