Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Shell Scripting
  • Kali Linux
  • Ubuntu
  • Red Hat
  • CentOS
  • Docker in Linux
  • Kubernetes in Linux
  • Linux interview question
  • Python
  • R
  • Java
  • C
  • C++
  • JavaScript
  • DSA
Open In App
Next Article:
How to Fix Terminal in Ubuntu?
Next article icon

How to Open a TextEditor in an Ubuntu Terminal

Last Updated : 30 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Ubuntu and other Linux distributions using the GNOME desktop environment come pre-installed with a default text editor known as the GNOME Text Editor, commonly referred to as Gedit. Gedit is a user-friendly, lightweight, and powerful text editor with rich features, making it an ideal choice for casual users and developers.

Gedit is a feature-rich text editor that supports a number of file types and includes functions like line numbering, search and replace, and syntax highlighting. It is appropriate for developers who need more sophisticated tools for coding work as well as casual users who occasionally need to modify text documents.

How to Open GNOME Text Editor (Gedit) in Ubuntu Terminal

You can quickly open the GNOME Text Editor (Gedit) from the terminal in Ubuntu. Here are some methods:

Example 1: Launching Gedit with a Blank Document

You can launch Gedit with a new, blank document directly from the terminal with the following command:

gedit

Output:

Launching Gedit with a Blank Document

This will open the GNOME Text Editor, where you can start typing in a blank document. This method is useful if you want to create or edit a new file.

Example 2: Opening an Existing File with Gedit

To open an existing text file or create a new one, use the filename as an argument with the gedit command:

gedit example.txt

Output:

Opening an Existing File with Gedit

This command will open example.txt in Gedit. If the file doesn’t already exist, Gedit will create a new file named example.txt and open it for editing.

Note: You can also use text editors mentioned below:

  • Vim Text Editor
  • Nano Text Editor
  • Vi Text Editor

Conclusions

In conclusion, users may easily view and modify text files by learning how to launch the GNOME Text Editor (Gedit) in Ubuntu via the terminal. Gedit is a versatile text editing tool that can be used for a wide range of jobs and workflows. With Ubuntu and other Linux distributions, users can efficiently utilize Gedit to handle their text files by following the instructions offered in this page.


Next Article
How to Fix Terminal in Ubuntu?

S

shubham_bind
Improve
Article Tags :
  • Linux-Unix

Similar Reads

  • How to Open Multiple Terminals in Ubuntu
    As a programmer or developer, we may feel insufficient to use only one terminal or window. We need more than one terminal to easily navigate through code files or do another installation task. This problem is also faced by the system administrators as well as the DB administrators because we may nee
    5 min read
  • How to Fix Terminal in Ubuntu?
    Encountering issues with the Terminal in Ubuntu can disrupt your workflow and productivity. Whether the Terminal is not opening, displaying errors, or behaving unexpectedly, these problems can be frustrating. This guide will walk you through the most common solutions to fix Terminal issues in Ubuntu
    3 min read
  • How to Print Colored Text to the Linux Terminal
    Printing colored text to the Linux terminal can greatly enhance the visual appeal and readability of your command-line applications or scripts. While the terminal traditionally displays text in monochrome, incorporating colors can provide crucial context, highlight important information, or simply a
    5 min read
  • How to Create a File in the Linux Using the Terminal?
    In this article, we will learn to create a file in the Linux/Unix system using the terminal. In the Linux/Unix system, there are the following ways available to creating files. Using the touch commandUsing the cat commandUsing redirection operatorUsing the echo commandUsing the heredocUsing the dd c
    4 min read
  • How to Use Terminal in Sublime Text Editor ?
    Well in Visual Studio Code we get a direct Option for opening Terminal, Unlike Sublime Text editor. Sublime is Simple and free to use, Light on memory, and can easily work with multiple projects. In this article, we will see how to use Terminal in a Sublime Text Editor. This article will answer all
    3 min read
  • How To Fix "Unable To Show a Git Tree in Terminal"?
    Git is an important tool for version control, and displaying the Git tree in the terminal is a common way to visualize your branch structure, history, and commits. However, you might sometimes encounter an error saying "Unable to show a Git tree in terminal" which can be frustrating. In this article
    4 min read
  • How to Open Terminal in Linux?
    The Shell or Command Prompt are common name for the Linux Terminal. The terminal was designed as a Linux File Browser, and this function is still carried out using it. You may traverse your files and undo changes made by using the Terminal as a File Browser. However, the very first step will be to O
    4 min read
  • How to Install Tilix Terminal Emulator in Ubuntu/Fedora/Arch Linux?
    A terminal emulator is a software that helps in interacting with the computer machine and perform operations using commands. Tilix is a tiling terminal emulator formerly known as Terminix. It is an enhancement over a regular terminal and provides some important features. Features of Tilix Terminal E
    3 min read
  • How To Install alpine-pico on Ubuntu
    Pico is a straightforward text editor based on the Alpine messaging system composer. Commands, like in Alpine, are presented at the bottom of the screen, and context-sensitive help is available. Characters are immediately placed into the text as they are written. Control-key combinations are used to
    3 min read
  • How to Run C program in Ubuntu
    Learning to run a C program in Ubuntu is a great first step for anyone starting their programming journey or switching to a Linux-based system. Ubuntu offers a clean and powerful environment to write, compile, and execute C code all from the terminal. In C, this guide will show you how to get starte
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences