Aug 19, 2020. In Gedit, install 'gedit-plugins' and 'gedit-developer-plugins' from Ubuntu Software Center within the 'Text editor' application. Then go to Edit, Preferences, Plugins, Embedded Terminal. Restart gedit and after that just press CTRL+F9 and you will get a terminal embedded in gedit. I tried this in Ubuntu 14.04 LTS. Whenever I am using gedit to write code I can access either gedit or the terminal but not both. For example, when I type gedit hello.c linux brings up the file hello.c inside gedit. Now, while gedit is still displaying hello.c I cannot type anything into the terminal without closing hello.c in gedit.
This post shows how to run gedit on Mac OS terminal. gedit is a text editor on Ubuntu, which can be started on Ubuntu terminal. To have the same function of running gedit as a command line in Mac OS, first need to download it from the following link:https://wiki.gnome.org/Apps/Gedit
After downloading and installation, open the .bash_profile in your $HOME directory by running the following commands in the Mac terminal:
Once the .bash_profile is opened, add the following lines to the end:
Now save the .bash_profile and run the following command to update the environment var in the terminal:

Now enter the following command in the terminal to start gedit:
$./gedit
Gedit For Mac Download
You may notice some errors message such as the ones below:
Download Gedit For Mac Terminal File

Referenced from: /usr/lib/libxslt.1.dylib
Expected in: /Applications/gedit.app/Contents/Resources/lib/libxml2.2.dylib

Trace/BPT trap: 5
This may be due to libxml2 or libxslt is not installed or the libxml2.2.dylib not in the lib folder of gedit, to install them, run the following commands:
$brew install libxml2
$cp /usr/local/Cellar/libxml2/2.9.1/lib/libxml2.2.dylib /Applications/gedit.app/Contents/Resources/lib
(Change the 2.9.1 to your version of libxml2). Rerun the following command:
$./gedit