Show User Name in Right corner of Top-bar in Ubuntu 22.04

Want to display your username in the top panel? It’s easy to do this job in Ubuntu, Fedora Workstation and other Linux with GNOME Desktop via an extension.

After following this tutorial, you’ll see your username appear in the far right corner in top panel, just like the screenshot below shows you:

1. First, open Ubuntu Software, search for and install Extension Manager app.

Install Extension Manager in Ubuntu 22.04+

2. Then, press Super (Windows Logo) key on keyboard to open the overview screen. Search for and launch Extension Manager.

3. When the tool opens, navigate to ‘Browse‘ tab. Finally, search for and click install “Add Username to Top Panel” extension.

After installation, your username should appear immediately on top panel. To remove it, go back “Installed” tab, then either turn off or remove the extension.

For other Linux, e.g., Fedora Workstation, Arch, Debian, RockyLinux with GNOME, go to this page in web browser and use the ON/OFF switch to install it.

Find Files by Name in Linux

Find Files by Name in Linux

Most often, you are looking for a file on Linux and you do not exactly know its true location on the system disk.

There are multiple ways to find files in the Linux command line. Most common and most reliable way is to use the find command.

The find command is extremely versatile and has way too many usages but here I’ll focus on finding files by their name.

I’ll explain how to use the ‘find’ command for:

  • Searching files using their name
  • Searching files with their exact name
  • Searching files for a particular pattern
  • Searching multiple files
  • Excluding certain files from the search results.

Besides these, I’ll also show how to use the grep command with the output from the find command. Let’s first start with an overview of the find command.

The utility ‘find’ looks for files that match a certain set of parameters like the file’s name, its modification date, its extension, etc. It has the following format:

find path pattern

If a path is not specified, it searches in the current directory and its sub-directories.

Searching for Files Using their Name

Looking for a file with its name is a commonly used operation with the find command. The -iname option looks for a file regardless of its case.

For example, suppose you have two files abc.txt and ABC.txt. Both of them have the same name but different cases. Using the find command, you get both files in the results:

find -iname abc.txt
Find Files by Name in Linux
Find files with their name while ignoring the case

Searching for Files Using their Exact Name

The -name option is case-sensitive in contrast to the -iname option, so you are going to get files with the exact name.

For example, let us look for a file with the name abc.txt :

find -name abc.txt
Find Files by Name in Linux

The name of the file can be composed of wildcards as you will see later in this guide.

Searching for Files With a Particular Pattern

You can also filter files that follow a given pattern. For that, you can use wildcards.

Say, for instance, you are looking for all the configuration files on your system that end with the ‘.conf’ extension:

find /etc -type f -name "*.conf" | grep client.conf
Find Files by Name in Linux
Find files with a certain extension

In the same way, you can also search for files with the same name but with any extension of three characters as:

find ~ -name "abc.???" 
Find Files by Name in Linux
Find files with the same name but any extension

If you have several file names that contain a common string, say ‘VM’, the find command in this scenario will be as:

find -name '*VM*' 
Find Files by Name in Linux
Find files with a matching pattern

So far we have used a single directory (the home directory) with the ‘find’ command.

You can also search in multiple directories by specifying them on the CLI:

find ~/Desktop/example1/ ~/Desktop/example2/ -name 'abc*.*'
Find Files by Name in Linux
Find files in multiple directories

Searching for Multiple Files and Multiple Patterns

Suppose you want to find multiple files in a directory having .msi and .txt as file types.

Here you need to use both the name and type options on the CLI as:

find -type f ( -name "*.txt" -o -name "*.msi" )
Find Files by Name in Linux
Search for multiple files and multiple patterns

In a similar approach, you can extend the above command for more files by using extra -o options.

Excluding Certain Files from the Search Results

The find command can also exclude certain types of files from the search result:

find -name '*abc*' -type f ( ! -name '*.msi' )
Find Files by Name in Linux
Exclude certain files from find search results

Here, the ‘find’ command will look for all the files having ‘abc’ string in their name. However, it will filter out the .msi type of files.

Other Common Examples of the ‘find’ Command

You have more options that can be used with the ‘find’ command. Let me share a few such examples:

System reporting low disk space? Find bigger files like this:

find -size +2000M

Using the above command, you can find files occupying more than 2000 Megabytes of space.

In case you need to save your findings for later investigation, redirect it to a file:

find -name '*abc*' -type f ( ! -name '*.msi' ) > mysearch.txt
Find Files by Name in Linux
Save the result of the find command

The type option with the find command opens many opportunities.

You can combine it with different file descriptors for different types of files. For example, ‘f’ for a regular file, ‘d’ for a directory, ‘l’ for a symbolic link, etc.

find /var/log -type f -name "*.log" 

Conclusion

In this guide, I explained how to search for files by their names using the find command. You saw multiple ways to narrow down the search path and most importantly, how to incorporate the ‘wildcards’ for pattern searching.

There are many more uses of the find command. Like you can use it to find recently modified files. Here are a few more common examples if you are interested.

15 Super Useful Examples of Find Command in Linux
Learn the super powerful and super useful find command with these practical examples.
Find Files by Name in Linux

You can always search man pages to get extensive insights into the various options with the ‘find’ command.

Replace “Activities” with Current Workspace Name in Ubuntu 22.04 / Fedora 36

This simple tutorial shows how to set custom names for your desktop workspaces, and replace “Activities” in the top-left with the current workspace name you specified.

Today’s desktop operating systems mostly have multiple desktops to group app windows in different screen. These virtual desktops in GNOME (default desktop environment in Ubuntu/Fedora Workstation) are called workspaces. And, each workspace can have its own name.

Step 1: Set custom names for your workspaces

1. First, search for and install “Dconf Editor” if you don’t have it from Ubuntu Software (or GNOME Software).

2. Next, search for and open the Dconf Editor tool from ‘Activities’ overview screen.

When it opens, navigate to “org/gnome/desktop/vm/preferences“. Scroll down and click on “workspace-names” to get into the setting page.

Finally, turn off the default value, and type your desired named in ‘custom value’ box.

NOTE: GNOME by default has 2 workspaces. It adds/removes workspaces automatically to keep only one extra empty workspace. To set fixed number of workspaces, open “Settings” and navigate to “Multi-tasking > Workspaces”

For those familiar with Linux commands, this can be done simply by running the command below in terminal:

gsettings set org.gnome.desktop.wm.preferences workspace-names "['name1', 'name2', 'name3', 'name4']"

Step 2: Replace “Activities” with current workspace name

By replacing “Activities”, you can take a glance at top-left to make sure which workspace you’re working on. Though the name changes, it’s still working like before. By clicking on it will open the overview screen.

1.) First, search for and install “Extension Manager” from Ubuntu Software.

Install Extension Manager in Ubuntu 22.04

2.) Then, search for and launch the tool you just installed from overview screen:

3.) Finally, navigate to “Browse” tab, search for and install the “Activities Workspace Name” extension.

For Fedora 36 user, just go to the extension web page and use the ON/OFF switch to install it:

NOTE: If you set workspace names after installed the extension, restart GNOME Shell it required to make it work. To do so, press Alt+F2, type ‘r’ and hit Enter on Xorg session, or log out and back in on default Wayland.