doc/pages/01.administrate/04.learn/04.commandline/02.cli/commandline.md

38 lines
2 KiB
Markdown
Raw Normal View History

2020-11-11 11:47:10 +01:00
---
title: Administrate YunoHost in command line
template: docs
taxonomy:
category: docs
routes:
default: '/commandline'
2020-11-11 11:47:10 +01:00
---
2013-12-26 22:19:07 +01:00
2018-08-27 21:53:18 +02:00
The command line interface (CLI) is, in the computer world, the original (and more technical) way of interacting with a computer compared to graphical interface. Command line interfaces are generally said to be more complete, powerful or efficient than a graphical interface, though it is more difficult to learn.
2013-12-26 22:19:07 +01:00
2018-08-27 21:53:18 +02:00
In the context of YunoHost, or system administration in general, the CLI is commonly used to remotely control machines after connecting through [connecting to it via SSH](/ssh).
2018-08-27 21:53:18 +02:00
<div class="alert alert-info" markdown="1">
Providing a full tutorial about the command line is quite beyond the scope of the YunoHost documentation : for this, consider reading a dedicated tutorial such as [this one](https://ryanstutorials.net/linuxtutorial/) or [this one](http://linuxcommand.org/). But be reassured that you don't need to be a CLI expert to start using it !
</div>
2018-08-27 21:53:18 +02:00
The `yunohost` command can be used to administrate your server and perform the various actions similarly to what you do on the webadmin. The command must be launched either from the `root` user or from the `admin` user by preceeding them with `sudo`. (ProTip™ : you can become `root` with the command `sudo su` as `admin`).
2013-12-26 22:19:07 +01:00
2018-08-27 21:53:18 +02:00
YunoHost commands usually have this kind of structure :
2013-12-26 22:19:07 +01:00
2013-12-28 12:34:52 +01:00
```bash
2018-08-27 21:53:18 +02:00
yunohost app install wordpress --label Webmail
^ ^ ^ ^
| | | |
category action argument options
2013-12-28 12:34:52 +01:00
```
2013-12-26 22:19:07 +01:00
2018-08-27 21:53:18 +02:00
Don't hesitate to browse and ask for more information about a given category or action using the the `--help` option. For instance, those commands :
2013-12-26 22:19:07 +01:00
2013-12-28 12:34:52 +01:00
```bash
2018-08-27 21:53:18 +02:00
yunohost --help
yunohost user --help
yunohost user create --help
2013-12-28 12:34:52 +01:00
```
2013-12-26 22:19:07 +01:00
2018-08-27 21:53:18 +02:00
will successively list all the categories available, then the actions available in the `user` category, then the usage of the action `user create`. You might notice that the YunoHost command tree is built with a structure similar to the YunoHost admin pages.