---
schema_version: "1"
id: e2f8f6a4d799672ccdbfcec032a7d4ad1f9e983f639cef587fdf50e5ce2afa23
title: Before You Create Second-Generation Managed Packages
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform-pkg-exchange/managed_packaging/guides/second-generation/sfdx-dev-dev2gp-before.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/sfdx-dev-dev2gp-before.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: dced9c57125f4ba7a5c68f57e600b103116f974360ed771a4b3c7aa02e50a920
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Before You Create Second-Generation Managed Packages

When you use second-generation managed packaging, to be sure that you set it up correctly, verify the following.

Did you?

- [Enable Dev Hub and Second-Generation Managed Packaging](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_pkg_enable_devhub.htm) in your Partner Business Org (PBO)
- Install [Salesforce CLI](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm)
- [Create and Register Your Namespace for Second-Generation Managed Packages](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_dev_dev2gp_create_namespace.htm)

Developers who work with managed 2GP packages need a user license and permission set that provides access to the Dev Hub org. See [Limited Access License for Package Developers](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_pkg_slalf_pkg_dev.htm) and [Assign Second-Generation Managed Packaging User Permissions](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_pkg_user_permission.htm).

- **[Know Your Orgs for Second-Generation Managed Packages](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/sfdx-dev-dev2gp-before-know-orgs.md)**


    Some of the orgs that you use with second-generation managed packaging (managed 2GP) have a unique purpose.

- **[Link a Namespace to a Dev Hub Org](https://developer.salesforce.com/docs/platform/pkg2-dev/sfdx-dev/workspace-setup/sfdx-dev-reg-namespace.md)**


    To use a namespace with a scratch org, you must link the Developer Edition org where the namespace is registered to a Dev Hub org.

- **[Namespaces for Second-Generation Managed Packages](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/sfdx-dev-dev2gp-plan-namespaces.md)**


    A namespace is a 1–15 character alphanumeric identifier that distinguishes your package and its contents from other packages in your customer’s org. A namespace is assigned to a second-generation managed package (managed 2GP) at the time that it’s created, and can’t be changed.

- **[Create and Register Your Namespace for Second-Generation Managed Packages](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/sfdx-dev-dev2gp-create-namespace.md)**


    With second-generation managed packaging (managed 2GP), you can share a single namespace with multiple packages. Since sharing of code is much easier if your package shares the same namespace, we recommend that you use a single namespace for all of your managed 2GP packages.

- **[Key Concepts in Second-Generation Managed Packaging](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/sfdx-dev2gp-key-concepts.md)**


    Let’s look at some key high-level concepts in second-generation managed packaging (managed 2GP).

- **[How Manageability Rules and Ancestry Impact Upgrades for Second-Generation Managed Packages](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/sfdx-dev2gp-rules-ancestry-upgrades.md)**


    Before you dive in and create your first second-generation managed package (managed 2GP), it’s important to understand these concepts, and how they affect each other.

- **[Which Package Types Can Your Package Depend On?](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/sfdx-dev-dev2gp-dependency-overview.md)**


    Both second-generation managed packaging (managed 2GP) and unlocked packaging let you easily develop small interdependent packages and share logic between them. If you design your app to rely on small modular packages, both package creation and package installation are faster, and you’re less likely to hit limits.
