what cmd for connecting switch with straight cable
You haven't mentioned the switch in question, but switch<->switch connectivity is automatically enabled with straight-thru cable as long as both switches support auto-mdix.
Keep in mind, configuring the speed/duplex on the switchports will disable auto-mdix support.
Edison is right. What is the model of your appliance?
As a rule of thumb, connect a cross-over cable when you connect a switch to another switch.
However, if you have the newer generation of switches: 2960/2970/2975, 3560, 3750, these appliances now come with MDI/MDIX enabled.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: