Create new file ubuntu 18.04

To create a new file in Ubuntu 18.04, you can use a text editor such as nano, gedit, or vim. Here are the steps:

Method 1: Using nano

  1. Open a terminal window.
  2. Type nano newfile.txt (replace newfile.txt with the name you want to give your file).
  3. Press Enter to create the file.
  4. Type some text into the file using the nano editor.
  5. Press Ctrl+X to exit the editor.
  6. Press Y to save the changes.
  7. Press Enter to confirm the file name.

Method 2: Using gedit

  1. Open a terminal window.
  2. Type gedit newfile.txt (replace newfile.txt with the name you want to give your file).
  3. Press Enter to create the file.
  4. Type some text into the file using the gedit editor.
  5. Click on "File" > "Save" to save the changes.
  6. Close the gedit window.

Method 3: Using vim

  1. Open a terminal window.
  2. Type vim newfile.txt (replace newfile.txt with the name you want to give your file).
  3. Press Enter to create the file.
  4. Type some text into the file using the vim editor.
  5. Press Esc to exit insert mode.
  6. Type :wq to save and quit the editor.

In all cases, the new file will be created in your current working directory. You can verify this by using the ls command to list the files in the directory.