My laptop is an macbook pro retina late 2013.
#bootable usb stick for ubuntu
https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#1-overview
#install linux on macbook 2012
https://robmcbryde.com/reviving-2012-macbook-pro/
#Official guide to Install Debian on MacBook
https://wiki.debian.org/MacBook#Debian_installation
Some issues i encountered is recorded below:
Before Installation
#repartition Mac disk to make room for Linux is
https://www.makeuseof.com/tag/install-linux-macbook-pro/
During Installation
#no issues
After installation
#ssh
#linux continue work when lid is closed
/etc/systemd/logind.conf and make sure
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
#wifi issue, the debian official wiki has a solution
#in particular, my wifi nic is BCM4360, have to use the wl vendor driver