## 1 Introduction  
Carbon steel is used significantly in many industrial applications due to its excellent mechanical properties [1; 2; 3]. Primarily, carbon steel pipes are used to transfer crude oil which contains corrosive agents and are usually placed under the sea in the oil and gas industry. Corrosive agents in crude oil and brackish water include salts, water, oxygen, acidic, and basic compounds [4; 5]. They promote the corrosion reactions, which occur on the internal and the external surfaces of carbon steel pipes. To solve these corrosion problems, corrosion experts prevent and reduce the corrosion rate of carbon steel by cathodic and anodic protection, the coating of the carbon steel surface, and using corrosion inhibitors [3; 4; 6; 7]. The isolation of carbon steel surfaces from corrosion agents is an effective strategy to prevent electrochemical corrosion [4; 8]. Among several corrosion prevention methods commonly used, the use of corrosion inhibitor is an effective method and the most appropriate way to prevent corrosion [9; 10; 11; 12]. A corrosion inhibitor is a compound which can reduce the corrosion rate on the metal surface [4; 13]. The efficiency of corrosion inhibitors is usually related to the presence of polar functional groupswith S, O or N atoms in the molecule, heterocyclic compounds, and \(\pi\) electrons [9]. Polar functional groups are considered as the reaction centers for the establishment of the adsorption process between corrosion inhibitors and carbon steel surfaces. However, the corrosion inhibitor is expensive, volatile, toxic, and unstable at high temperatures [14; 15]. Therefore, the recent focus of research is to make environmentally friendly corrosion inhibitors, which have a low environmental risk. The use of an organic compound is one of the best candidates as a raw material to make environmentally friendly corrosion inhibitors [4; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18]. An organic compound-based corrosion inhibitor has several advantages, such as being environmentally friendly, relatively inexpensive, and having more effective inhibitor performance [19; 20]. Imidazole and its derivatives have potential as a corrosion inhibitor due to their nitrogen (N) atomic functional groups and free electrons in their N atom able to interact with carbon steel to protect from corrosion attacks [11; 20]. Corrosion inhibitors are developed from new materials including changing the imidazole and its derivative into an ionic liquid (IL) [21]. IL is an organic or inorganic salt, which has a low melting point (under 100 \({}^{\circ}\)C), non-flammable, and stable at high temperatures [7; 17; 22; 23; 24; 25; 26; 27]. ILs are effective and useful in corrosion engineering and also as an outstanding candidate material in molecular designing and engineering [28]. ILs have very low vapor pressure, which makes them eco-friendlier and less hazardous inhibitors of metal corrosion [16; 17; 18; 29; 30; 31; 32]. In the last decade, many ionic liquids [33] were developed and applied in the corrosion field. [PERSON] et al. [5] reported an imidazole derivative-based IL (e.g., 4-methyl imidazole) as a corrosion inhibitor. [PERSON] et al. [5] showed that 4-methyl imidazole plays a role as Lewis acid. When the steel was contacted by acid, the surface of the steel oxidized and released electrons. The cations of IL adsorbed the electrons on the steel surfaces. [PERSON] et al. reported (bmim)(PF\({}_{6}\)) and (bmim)(BF\({}_{4}\)) as the ILs most commonly used as corrosion inhibitors [34]. However, if they are released into water, they decompose and produce hydrofluoric (HF) and phosphoric acids (H\({}_{3}\)PO\({}_{4}\)) which are harmful to the environment [34]. Consequently, the oxidizing agent, water, corrosive material, and oxygen can increase the corrosion rate in the system after the corrosion inhibitor left the steel surfaces. In this study, we developed two new ILs with high hydrophobic properties.