Coach Whittingham and assistant manager Stuart Gray led the side in the absence of Cotterill, who departed for Nottingham Forest.
After the victory at Fratton Park, Whittingham said: "I am not interested in the job. All I and Stuart are doing is preparing the side until such time an appointment is made.
"I love being a coach and I don't want the stress of being a manager. I have a nice family life and I want to keep it that way.
"I told the players not to get too excited by this result, I just hope it gives us some confidence going into Tuesday's match against Ipswich.
"It is never easy when a manager leaves the day before and it took us time to settle but we made a bright start to the second half and got the two goals in quick succession."
Barnsley had the better of the first half and nearly took the lead when captain Jacob Butterfield smashed a shot straight at Stephen Henderson from 20 yards.
The Tykes continued their dominance and the disappointing Ricardo Vaz Te was guilty of wasting another effort which is fired over from just outside the six-yard area.
Pompey got a footing in the game midway through the first period with Luke Varney coming close with a 22-yard drive and Greg Halford heading wide from a Liam Lawrence corner.
Both teams came close just before the break, Varney slipping David Norris through but his scooped shot was well saved by former Manchester United goalkeeper Luke Steele.
Moments later, the impressive Butterfield was inches from breaking the deadlock when he bought down a Steele goal-kick, turned and struck a 20-yard thunderbolt against the inside of the right-hand post which flew away to safety.
Just after the interval, Lawrence crossed for Erik Huseklepp whose shot into the ground was brilliantly cleared off the line by Stephen Foster.
But Pompey got a quick-fire double in the space of just 73 seconds when Norris struck a volley into the corner in the 61st minute and Varney slotted home a Dave Kitson cross a minute later.
Barnsley manager Keith Hill saw his side have the better of the first half but they never looked like getting back into the game once Portsmouth had gone ahead.
Hill said: "If we had scored first, we could have won the game. In the first half, they caused us no danger expect from set-pieces.
"Overall I am not too disappointed with the performance but once Portsmouth had scored they started to play better and it gave them energy.
"We are moving in the right direction despite this result. I am pleased with the development of our style and with the commitment of the players. You can learn a lot from losing."