\(\sigma \) hulls of linear codes are a generalization of Euclidean hulls, Hermitian hulls and Galois hulls of linear codes. Goppa codes, expurgated Goppa codes and extended Goppa codes over \({\mathbb {F}}_{q^m}\) are actually (extended) generalized Reed-Solomon (GRS and EGRS) codes when \(m=1\) . In this paper, we study the \(\sigma \) duals and \(\sigma \) hulls of Goppa codes and related codes over \({\mathbb {F}}_q\) . First, we give necessary and sufficient conditions for the \(\sigma \) dual codes of such codes to be Goppa codes and related codes over \({\mathbb {F}}_q\) . Second, under the above condition, we show that the \(\sigma \) hulls of such codes are still Goppa codes and related codes over \({\mathbb {F}}_q\) . Finally, we determine the \(\sigma \) hulls of the above codes. The results in this paper are a natural generalization of the recent results of Liu et al. (Finite Fields Appl., 88: 102183, 2023). Moreover, comparing with the results of Liu et al., we can obtain longer length Goppa codes and related codes over \({\mathbb {F}}_q\) with determined \(\sigma \) hulls as well as entanglement-assisted quantum error-correcting codes (EAQECCs).