When you're trying to do something portably, test for features, not platforms:
if ls --help 2>&1 | grep -q -- --color
then
alias ls='ls --color=auto -F'
else
alias ls='ls -FG'
fi
Platform tests break when platforms change. macOS ships a mix of BSD and GNU userland tools today, but this mix is shifting over time towards a greater preponderance of BSD tools. So, a test for "macOS" today may fail tomorrow when Apple replaces a GNU tool you were depending on with its nearest BSD equivalent if you are relying on a feature the two implement differently. Feature tests more often keep working in the face of change.
As a bonus, you sometimes end up creating support for platforms you did not originally test against. The above script fragment should also do the right thing on Solaris and FreeBSD, for example.
(This is the philosophy behind GNU Autoconf, by the way, which is why a configure
script written 10 years ago probably still works on a brand new system today.)
Modify the aliases to suit. I'm just showing the values I use on the macOS and Linux systems nearest to hand as I write this.
Best Answer
Not only is it possible, some systems set up new accounts with both. This allows the same skeleton setup to be used whichever shell the user gets.
The purpose of the two file is the same, but they belong to two different shell families. The syntax of the shell scripts for the two shells is very different so different scripts are required.
With a bit of care it is possible to use the same rc file for Bourne shell, ksh, and bash. This can be done by inclusion or hard links.