In this article we will explore how to log in to Enterprise SONiC and the basics of the Command-Line Interface (CLI). We will cover:
- Access methods
- User login
- Privilege levels
- Basic navigation commands
Access Methods
You can access the switch using:
- Console port (direct physical connection).
- SSH (remote secure login).
ssh admin@192.168.1.10
Default username is admin
Password is YourPaSsWoRd
User Login
When logging in, you will be prompted for credentials.
login as: admin
admin@192.168.1.10's password: ********
admin@sonic:~$
sonic-cli
When logged in, you will be in the linux shell. To go to the SONiC CLI use the command sonic-cli
admin@sonic:~$ sonic-cli
sonic#
Privilege Levels
The CLI provides different modes:
-
- User EXEC mode (prompt ends with >).
- Limited set of commands (e.g., ping, show).
- Privileged EXEC mode (prompt ends with #).
- Full access to configuration and monitoring commands.
- Entered by typing:
sonic> enable sonic#
- Global Configuration mode (prompt ends with (config)#).
- Entered with:
sonic# configure terminal sonic(config)#
- Entered with:
- Interface Configuration mode (prompt ends with (conf-if)#).
- Used to configure interfaces:
sonic# interface Ethernet 1 sonic(config-if)#
- Used to configure interfaces:
- User EXEC mode (prompt ends with >).
Basic Navigation Commands
Some essential commands to get started:
- enable → move from user to privileged EXEC mode.
- configure terminal → enter configuration mode.
- exit → move back one level in CLI hierarchy.
- end → exit directly to privileged EXEC mode.
- show running-configuration → view active configuration.
- show version → display SONiC version and build info.
Verification
You can verify SONiC version and logged-in users using:
sonic# show version
Software Version : 4.5.1-Enterprise_Base
Product : Enterprise SONiC Distribution by Broadcom - Enterprise Base package
Distribution : Debian 11.11
Kernel : 5.10.0-35-amd64
Config DB Version : version_4_5_3
Build Commit : 7ef4c1a1eb
Build Date : Tue Oct 21 06:17:22 UTC 2025
Built By : sonicbld@bld-lvn-csg-01
Platform : x86_64-accton_as5835_54x-r0
HwSKU : Accton-AS5835-54X
ASIC : broadcom
Hardware Version : R01F
Serial Number : 583554X2345027
Uptime : 09:20:24 up 3 days, 17:06, 2 users, load average: 1.48, 1.61, 1.69
Mfg : Edgecore
sonic# show users
INDEX LINE USER ROLE APPLICATION IDLE LOGIN-TIME LOCATION
1 pts/0 admin admin bash 19:38 28-11-2025 09:00:53.627406 192.168.2.13 [ssh]
2 pts/1 admin admin bash 6.00s 28-11-2025 09:19:58.650111 192.168.2.13 [ssh]
Notes
- Usernames/passwords are managed by the system administrator. Default login credentials should always be changed for security.
- Privilege separation ensures only authorized users can modify configuration.
- SSH access requires that the management interface and IP are configured.