blob: a955cf82c9f836761a950008339680509a74bc88 [file] [log] [blame]
---
title: Running gfsh Commands on the OS Command Line
---
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<a id="topic_fpf_y1g_tp__section_4BACD4EE33934083AC7046DF8B0A753A"></a>
You can run some `gfsh` commands directly from your operating system's prompt by preceding the command with `gfsh`. This can be useful for Unix shell or Windows batch scripting. For example:
``` pre
$ gfsh start locator --name=locator2 --port=10335
```
To see which gfsh commands are available directly on the prompt:
``` pre
$ gfsh help
```
## Running Multiple gfsh Commands on the OS Command Line
To run multiple commands directly on the command line,
use the `-e` option followed by the `gfsh` command within
quote marks. For example:
``` pre
prompt>gfsh -e "start locator --name=locator1" -e "start server --name=server1"
prompt>gfsh -e "start jconsole"
prompt>gfsh -e "connect --locator=remotehost[10334]" -e "rebalance" -e "gc"
```