To open the YSQL shell, run ysqlsh.

$ docker exec -it yugabyte bash -c '/home/yugabyte/bin/ysqlsh --echo-queries --host $(hostname)'
ysqlsh (15.2-YB-2026.1.0.1-b0)
Type "help" for help.

yugabyte=#