Software needed for ATMEL ATMEGA8A-PU microcontroller in Ubuntu 18.04?
To run the Arduino IDE on Linux reference the Arduino.cc site. Full instructions are contained here.    

Note: You should have been able to do a simple search to find this documentation, there is simply no excuse for not being able to find this information yourself. 

To program the ATMega8 readily from the Arduino IDE requires two things:


Support for the ATMega8. This is a minimal MCU but libraries (such as this) are available to enable sketch development in the IDE. 
You need to be able to transfer the developed sketch to the ATMega8, and for this you can use one of two methods:  

(A) When you have a programmed bootloader in the MCU you can use serial or serial over USB configurations. The bootloader takes significant space (about 512 bytes) and limits the size of sketches in minimal MCU's, but is extremely convenient. 

(B) You can use an Arduino as an ISP to program the MCU directly. This is most useful where you want to program the bare chip that may have no serial protocol Bootloader or you need to program the bootloader into the MCU. While this requires you have an Arduino (typically a UNO or NANO) it lets you use larger sketches since there is no bootloader in the MCU.


Again, all this information is readily available on the Arduino website. I suggest you start here and here.