[Yandex Cloud documentation](../../../index.md) > [Command line interface](../../index.md) > [Step-by-step guides](../index.md) > Profile management > Creating a profile

# Creating a profile

There are two ways to create a profile:

- [Wizard-based profile creation with basic parameters](#interactive-create).

    The CLI suggests setting the basic profile parameters step-by-step. You can use this method to redefine the parameters of an existing profile. This method doesn't work for service accounts.

- [Creating an empty profile and adding parameters manually](#create).

    This creates and activates an empty profile which you have to [set up manually](manage-properties.md).

## Wizard-based profile creation with basic parameters {#interactive-create}

In interactive mode, the CLI will prompt you to set basic parameters step-by-step:
* Profile name.
* The cloud you have access rights to.
* Default folder.
* Default availability zone where Yandex Compute Cloud resources are created.

You can stop profile creation at any time. All the settings you entered before stopping are saved to the profile.


If you are not connected to the management console yet, log in to the [console](https://console.yandex.cloud) and accept the user agreement by clicking **Log in**.

{% list tabs group=authentication %}

- Yandex account {#yandex-account}

    To get authenticated using a [Yandex account](../../../iam/concepts/users/accounts.md#passport):
    
    1. Get your email address:
      
       1. Navigate to your [Yandex](https://id.yandex.ru/personal) account.
       1. Copy your email address from the **Contacts** section.
    
    1. Launch the profile creation wizard:
      
            
        ```bash
        yc init --username=<email_address>
        ```
    
    
    
    1. Select the profile you want to set up authentication for or create a new one.
    
       ```text
       Welcome! This command will take you through the configuration process.
       Pick desired action:
       [1] Re-initialize this profile 'default' with new settings
       [2] Create a new profile
       ```
    
    1. The CLI prompts you to continue authentication in the browser. Press **Enter** to continue.
    
       ```text
       You are going to be authenticated via username '<email_address>'.
       Authentication web site will be opened.
       After your successful authentication, you will be redirected to 'https://console.yandex.cloud'.
    
       Press 'enter' to continue...
       ```
    
       On successful authentication, an [IAM token](../../../iam/concepts/authorization/iam-token.md) will be saved in the profile. This IAM token will be used to authenticate each operation until the end of the token's [lifetime](../../../iam/concepts/authorization/iam-token.md) (not more than 12 hours). After that, the CLI will once again prompt you to authenticate in the browser.
       
       To extend the period during which you do not have to authenticate in the browser, use [refresh tokens](../../../iam/concepts/authorization/refresh-token.md), which allow you to reissue IAM tokens without entering the browser. Do it by enabling refresh tokens [at the organization level](../../../iam/concepts/authorization/refresh-token.md#token-enabling) and [initializing DPoP protection](../../../iam/concepts/authorization/refresh-token.md#enabling-dpop) in the CLI.
    
    1. Go back to the command line interface to finish creating the profile.
    
    1. Select one of the [clouds](../../../resource-manager/concepts/resources-hierarchy.md#cloud) from the list of those you have access to:
    
       ```text
          Please select cloud to use:
           [1] cloud1 (id = aoe2bmdcvata********)
           [2] cloud2 (id = dcvatao4faoe********)
          Please enter your numeric choice: 2
          ```
    
       If there is only one cloud available, it will be selected automatically.
    
    1. Select the default [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder):
    
       ```text
          Please choose a folder to use:
           [1] folder1 (id = cvatao4faoe2********)
           [2] folder2 (id = tao4faoe2cva********)
           [3] Create a new folder
          Please enter your numeric choice: 1
          ```
    
    1. To select the default [availability zone](../../../overview/concepts/geo-scope.md) for [Compute Cloud](../../../compute/index.md), type `Y`. To skip the setup, type `n`.
    
       ```bash
       Do you want to configure a default Yandex Compute Cloud availability zone? [Y/n] Y
       ```
    
       If you typed `Y`, select the availability zone:
    
       
       ```text
       Which zone do you want to use as a profile default?
        [1] ru-central1-a
        [2] ru-central1-b
        [3] ru-central1-d
        [4] Do not set default zone
       Please enter your numeric choice: 2
       ```
    
    
    
    1. View your CLI profile settings:
    
       ```bash
       yc config list
       ```
    
       Result:
    
       
       ```bash
       subject-id: b1g159pa15cd********
       username: <email_address>
       folder-id: b1g8o9jbt58********
       compute-default-zone: ru-central1-b
       ```

- Federated account {#federated-account}

    To authenticate using a [SAML-compatible identity federation](../../../organization/concepts/add-federation.md):
    
    1. Get your federation ID from your administrator.
    1. Launch the profile creation wizard:
    
          
       ```bash
       yc init --federation-id=<federation_ID>
       ```
    
    
    
    1. Select the profile you want to set up authentication for or create a new one.
    
       ```text
       Welcome! This command will take you through the configuration process.
       Pick desired action:
       [1] Re-initialize this profile 'default' with new settings
       [2] Create a new profile
       ```
    
    1. The CLI prompts you to continue authentication in the browser. Press **Enter** to continue.
    
       ```text
       You are going to be authenticated via federation-id 'aje1f0hsgds3a********'.
       Your federation authentication web site will be opened.
       After your successful authentication, you will be redirected to 'https://console.yandex.cloud'.
    
       Press 'enter' to continue...
       ```
    
       On successful authentication, an [IAM token](../../../iam/concepts/authorization/iam-token.md) will be saved in the profile. This IAM token will be used to authenticate each operation until the end of the token's [lifetime](../../../iam/concepts/authorization/iam-token.md) (not more than 12 hours). After that, the CLI will once again prompt you to authenticate in the browser.
       
       To extend the period during which you do not have to authenticate in the browser, use [refresh tokens](../../../iam/concepts/authorization/refresh-token.md), which allow you to reissue IAM tokens without entering the browser. Do it by enabling refresh tokens [at the organization level](../../../iam/concepts/authorization/refresh-token.md#token-enabling) and [initializing DPoP protection](../../../iam/concepts/authorization/refresh-token.md#enabling-dpop) in the CLI.
    
    1. Go back to the command line interface to finish creating the profile.
    
    1. Select one of the [clouds](../../../resource-manager/concepts/resources-hierarchy.md#cloud) from the list of those you have access to:
    
       ```text
          Please select cloud to use:
           [1] cloud1 (id = aoe2bmdcvata********)
           [2] cloud2 (id = dcvatao4faoe********)
          Please enter your numeric choice: 2
          ```
    
       If there is only one cloud available, it will be selected automatically.
    
    1. Select the default [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder):
    
       ```text
          Please choose a folder to use:
           [1] folder1 (id = cvatao4faoe2********)
           [2] folder2 (id = tao4faoe2cva********)
           [3] Create a new folder
          Please enter your numeric choice: 1
          ```
    
    1. To select the default [availability zone](../../../overview/concepts/geo-scope.md) for [Compute Cloud](../../../compute/index.md), type `Y`. To skip the setup, type `n`.
    
       ```bash
       Do you want to configure a default Yandex Compute Cloud availability zone? [Y/n] Y
       ```
    
       If you typed `Y`, select the availability zone:
    
       
       ```text
       Which zone do you want to use as a profile default?
        [1] ru-central1-a
        [2] ru-central1-b
        [3] ru-central1-d
        [4] Do not set default zone
       Please enter your numeric choice: 2
       ```
    
    
    
    1. View your CLI profile settings:
    
       ```bash
       yc config list
       ```
    
       Result:
    
       
       ```bash
       federation-id: aje1f0hs6oja********
       subject-id: ajea53egl28l********
       cloud-id: b1g159pa15cd********
       folder-id: b1g8o9jbt58********
       compute-default-zone: ru-central1-b
       ```

- Local user account {#local-account}

    To authenticate using a [local user account](../../../iam/concepts/users/accounts.md#local):
    
    1. Launch the profile creation wizard:
    
       {% list tabs %}
    
       - User pool
       
         1. Get your user pool ID from your administrator.
         1. Launch the profile creation wizard:
    
                      
             ```bash
             yc init --userpool-id=<user_pool_ID>
             ```
    
    
    
       - Email
    
          1. Get your email address:
             1. Go to the [My account](https://myaccount.yandex.cloud/) portal.
             1. In the left-hand panel, select ![alt](../../../_assets/console-icons/passport.svg) **Profile**.
             1. Copy the email address from the **Contacts** section.
          1. Launch the profile creation wizard:
    
                      
             ```bash
             yc init --username=<email_address>
             ```
    
    
    
       {% endlist %}
    
    1. Select the profile you want to set up authentication for or create a new one.
    
       ```text
       Welcome! This command will take you through the configuration process.
       Pick desired action:
       [1] Re-initialize this profile 'default' with new settings
       [2] Create a new profile
       ```
    
    1. The CLI prompts you to continue authentication in the browser. Press **Enter** to continue.
    
       ```text
       You are going to be authenticated via userpool-id 'ek0auknfc0mh********'.
       Your userpool authentication web site will be opened.
       After your successful authentication, you will be redirected to cloud console.
    
       Press 'enter' to continue...
       ```
    
       On successful authentication, an [IAM token](../../../iam/concepts/authorization/iam-token.md) will be saved in the profile. This IAM token will be used to authenticate each operation until the end of the token's [lifetime](../../../iam/concepts/authorization/iam-token.md) (not more than 12 hours). After that, the CLI will once again prompt you to authenticate in the browser.
       
       To extend the period during which you do not have to authenticate in the browser, use [refresh tokens](../../../iam/concepts/authorization/refresh-token.md), which allow you to reissue IAM tokens without entering the browser. Do it by enabling refresh tokens [at the organization level](../../../iam/concepts/authorization/refresh-token.md#token-enabling) and [initializing DPoP protection](../../../iam/concepts/authorization/refresh-token.md#enabling-dpop) in the CLI.
    
    1. Go back to the command line interface to finish creating the profile.
    
    1. Select one of the [clouds](../../../resource-manager/concepts/resources-hierarchy.md#cloud) from the list of those you have access to:
    
       ```text
          Please select cloud to use:
           [1] cloud1 (id = aoe2bmdcvata********)
           [2] cloud2 (id = dcvatao4faoe********)
          Please enter your numeric choice: 2
          ```
    
       If there is only one cloud available, it will be selected automatically.
    
    1. Select the default [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder):
    
       ```text
          Please choose a folder to use:
           [1] folder1 (id = cvatao4faoe2********)
           [2] folder2 (id = tao4faoe2cva********)
           [3] Create a new folder
          Please enter your numeric choice: 1
          ```
    
    1. To select the default [availability zone](../../../overview/concepts/geo-scope.md) for [Compute Cloud](../../../compute/index.md), type `Y`. To skip the setup, type `n`.
    
       ```bash
       Do you want to configure a default Yandex Compute Cloud availability zone? [Y/n] Y
       ```
    
       If you typed `Y`, select the availability zone:
    
       
       ```text
       Which zone do you want to use as a profile default?
        [1] ru-central1-a
        [2] ru-central1-b
        [3] ru-central1-d
        [4] Do not set default zone
       Please enter your numeric choice: 2
       ```
    
    
    
    1. View your CLI profile settings:
    
       ```bash
       yc config list
       ```
    
       Result:
       
       {% list tabs %}
    
       - User pool
       
          
          ```bash
          userpool-id: ek0auknfc0mh********
          subject-id: ek00cd1m8hdd8********
          cloud-id: b1g159pa15cd********
          folder-id: b1g8o9jbt58********
          compute-default-zone: ru-central1-b
          ```
    
    
    
       - Email
          
          ```bash
          subject-id: b1g159pa15cd********
          username: <email_address>
          folder-id: b1g8o9jbt58********
          compute-default-zone: ru-central1-b
          ```
    
    
    
       {% endlist %}

{% endlist %}

## Creating an empty profile and adding parameters manually {#create}

Create a profile named `test`:
1. Run this command: 
  
   ```bash
   yc config profile create test
   ```

   Result:

   ```text
   Profile 'test' created and activated
   ```

1. Specify the necessary profile parameters, e.g., a folder:

    ```bash
    yc config set folder-id <Folder_ID>
    ```

    View the full [list of profile parameters](../../concepts/core-properties.md) and learn how to [manage](manage-properties.md) them.