We present the study of gas phases around cosmic-web filaments detected in the TNG300-1 hydro-dynamical simulation at redshift z = 0. We separate the gas into five different phases according to temperature and density. We show that filaments are essentially dominated by gas in the warm-hot intergalactic medium (WHIM), which accounts for more than 80% of the baryon budget at r ∼ 1 Mpc. Apart from WHIM gas, cores of filaments (r ≤ 1 Mpc) also host large contributions from other hotter and denser gas phases, whose fractions depend on the filament population. By building temperature and pressure profiles, we find that gas in filaments is isothermal up to r ∼ 1.5 Mpc, with average temperatures of Tcore = 4−13 × 105 K, depending on the large-scale environment. Pressure at cores of filaments is on average Pcore = 4−12 × 10−7 keV.cm−3, which is ∼1000 times lower than pressure measured in observed clusters. We also estimate that the observed Sunyaev-Zel’dovich signal from cores of filaments should range between 0.5 < y < 4.1 × 10−8, and these results are compared with recent observations. Our findings show that the state of the gas in filaments depends on the presence of haloes and on the large-scale environment.