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 commandsonic-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 login and basic system status using:
sonic(config)# show version
SONiC Software Version: Enterprise SONiC 4.5.0
Distribution: Debian 11.5
Kernel: 5.10.0-21-amd64
Platform: x86_64-onyx
ASIC: Broadcom
Build date: 2023-07-15
password: ********
sonic#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.
