Rabu, 19 Juli 2023

Mix and Match Terminal With Nautilus File Manager in Linux

Mix and Match Terminal With Nautilus File Manager in Linux

Nautilus is the graphical file browser in the GNOME desktop. You use it for accessing and managing files and folders on your system.

You can also manage files and directories from the terminal though not everyone prefers that.

However, you may encounter situations where you have to switch between the terminal and file manager.

There are various ways to interact between the Nautilus file manager and terminal. Surprisingly, not many Linux users know about them.

For example, in Nautilus, right-click and choose 'Open in terminal' option and you'll open the current directory location in the terminal.

Mix and Match Terminal With Nautilus File Manager in Linux

That's just one of the many examples I am going to share with you in this article.

1. Drag and drop to get the absolute path

If you drag and drop a folder or a file to a terminal, its absolute path will be pasted on the terminal screen.

Mix and Match Terminal With Nautilus File Manager in Linux
Copies Absolute Path

This helps when you are deep inside the directory structure in the file browser and don't want to type the entire path in the terminal.

2. Enter a directory

It's similar to what you saw above. If you are deep inside the directory structure and don't want to type the entire path for switching to the directory, this trick helps.

Type the cd command in the terminal and then drag and drop to enter into the directory.

Mix and Match Terminal With Nautilus File Manager in Linux
Enter a Directory

3. Open a file in editor

Similarly, you can open a file for editing with Nano or Vim editor.

Drag and drop a file to nano command to open it for editing.

Mix and Match Terminal With Nautilus File Manager in Linux
Edit a File

4. Open a file for editing with sudo

Same as above but this time, you open the file for editing with sudo access.

Mix and Match Terminal With Nautilus File Manager in Linux
Open files with sudo privileges

5. Drag multiple files, if the command supports multiple arguments

You can also drag and drop multiple files to get their absolute paths. This can be used with commands that accept more than one argument.

For example, the diff command checks the difference between two files. Enter diff and then drag and drop the files you want to check for differences.

Mix and Match Terminal With Nautilus File Manager in Linux
Check Difference

6. Copy and paste from text files

Reading a document and have to run a command mentioned in it? You can of course copy paste in the terminal.

However, a quicker way is to select the text and drag and drop it to the terminal.

This trick works with GNOME-Sushi preview as well.

Mix and Match Terminal With Nautilus File Manager in Linux
Drag and Drop from gnome-sushi

7. Drag and drop from browser

Like the text files above, you can also drag and drop text from browsers. This helps in following tutorials while doing it at the same time.

Mix and Match Terminal With Nautilus File Manager in Linux
Drag and drop from internet

8. Embed terminal in Nautilus

Can't live without the terminal? Embed it directly in the file manager. This way you don't have to open a terminal separately.

The thing here is that if you switch to another directory in the file browser, it automatically switches the directly in the embedded terminal also.

You can perform most of the above-mentioned drag and drop operations in the Nautilus embedded terminal also. For example, search for a specific text in bashrc, by dropping the .bashrc file and using grep.

Mix and Match Terminal With Nautilus File Manager in Linux
Using Embedded Terminal

9. Drag files between tabs of the embedded terminal

Both terminal and file manager supports the tabbed view. You can drag and drop files from one tab to another.

For example, to check the shasum value for an ISO, enter shasum command, then, drag and drop the file from another tab, as shown below.

Mix and Match Terminal With Nautilus File Manager in Linux
Drag and Drop from multiple tabs in Nautilus

More on Nautilus and terminal

Liked these tips? Maybe you would want to learn more such tips.

If you want to get more out of the Nautilus file manager, here are a few tips for you.

13 Ways to Tweak Nautilus File Manager in Linux
Nautilus, aka GNOME Files, is a good file manager with plenty of features. You can further enhance your experience by using these extensions, tweaks and tips.
Mix and Match Terminal With Nautilus File Manager in Linux

Here are some terminal tips to explore.

19 Basic But Essential Linux Terminal Tips You Must Know
Learn some small, basic but often ignored things about the terminal. With the small tips, you should be able to use the terminal with slightly more efficiency.
Mix and Match Terminal With Nautilus File Manager in Linux

💬 Do you know any other such cool tip that combines the terminal and the file manager? Why not share it with us in the comment section below?



from It's FOSS https://ift.tt/8uL3qFy
via IFTTT

Tidak ada komentar:

Posting Komentar