I'm presuming that you're using the Arduino IDE and hoping it's on a Linux desktop.
It is important to set the correct library for your esp32 card vendor and model.
For seeing the serial output, I look on the IDE's pull-down menus to see which usb port is being used and then open a separate term window to cat /dev/USBa – note that this changes on reset or when it is plugged in.
The IDE has an option to watch the serial output but it starts after the esp32 boots.