Question about Ubuntu 20.04 LTS

ex4722

Member
Joined
Oct 14, 2020
Messages
42
Reaction score
16
Credits
344
Hi guys! I started following a ubunut tutorial and one of the lessons were about the unity tweak tool and how if you navigate to computer/usr/share/application you can find all the desktop and i see that the files but im confused cause when the guy opened them he launched a app but for some reason when i did i got a text editor file that had some random stuff on it. Could be because his version is older than mine or am i doing something wrong. Here is the link for it
. Its at around 1;00;42 that he shows this thing.
 


Ubuntu 20.04 uses Gnome Desktop.

Ubuntu 16.04 was the last Ubuntu to use Unity desktop.

It's possible the different desktop environments could be the cause.
 
Actually, 17.04 'Zesty Zapus', Nelson, was the last (albeit a Point Release). 17.10 'Artful Aardvark' Point release was the first to re-introduce GNOME. 16.04 'Xenial Xerus' was the last LTS (Long Term Support) to incorporate it, which means that Unity under that release is still supported until April next year.

Wikipedia have an interesting article on Unity here

https://en.wikipedia.org/wiki/Unity_(user_interface)

Also, @ex4722 (Hi :)), if you Google

unity tweak tool under gnome

you will likely find some references to using GNOME Tweak, which may be the closest equivalent.

So

Could be because his version is older than mine

Yep, and also

It's possible the different desktop environments could be the cause.

Correctimundo

Cheers

Wiz
 
Alright thanks guys, turns out the files are different on the new version and if you install a older version if works out just fine. I started learning how to use terminal and i got kinda confused about the the cd ./ command. Its used to change to a directory inside the current one according to some sources. What the point of this is the normal cd command navigates from the current directory to the next one as long as it is not cd /. So what is the usage of the ./ command??
 
Actually, 17.04 'Zesty Zapus', Nelson, was the last (albeit a Point Release). 17.10 'Artful Aardvark' Point release was the first to re-introduce GNOME. 16.04 'Xenial Xerus' was the last LTS (Long Term Support) to incorporate it, which means that Unity under that release is still supported until April next year.

Wikipedia have an interesting article on Unity here

https://en.wikipedia.org/wiki/Unity_(user_interface)
I should've specified LTS versions since LTS versions are my go to versions when using Ubuntu.
 
Alright thanks guys, turns out the files are different on the new version and if you install a older version if works out just fine. I started learning how to use terminal and i got kinda confused about the the cd ./ command. Its used to change to a directory inside the current one according to some sources. What the point of this is the normal cd command navigates from the current directory to the next one as long as it is not cd /. So what is the usage of the ./ command??

./ isn't a command, it's a relative path which specifies the current directory.

Likewise ../ is a relative path which specifies the parent directory of the current directory. In other words, the directory that is one level up from the current working directory.

So if you want to run an executable script called script.sh which is in the current working directory (AND if the current directory is NOT a location listed in $PATH) - you would execute the script using:
Bash:
./script.sh

Or if you want to open the script to edit it:
Bash:
vim ./script.sh

However, the default behaviour for most commands is to look in the current working directory for files, so you could also just use:
Bash:
vim script.sh
So in that particular context the ./ is optional.
But if you were trying to run a script that is not in $PATH, then you would need to specify a relative path, or an absolute path.

So the relative path is relative to where you currently are in the file-system.
If you wanted to edit a file that is a couple of sub-directories deeper than where we are, you could use a relative path like this:
Bash:
vim ./sub-dir1/sub-dir2/somefile.txt
Note: I use vim as my terminal editor - you might use nano, or emacs, or perhaps you're one of these crazies who opens a GUI editor from the terminal - use whatever floats your boat!

If it is two directories above where we are, you would use something like this:
Bash:
vim ../../somefile.txt

If it is in a sub-directory that is two directories above where we are, you would do this:
Bash:
vim ../../somedir/somefile.txt

Likewise, if you want to run a script in a sub-directory that is outside of $PATH - you can run it using a relative path like the first example I gave where we specified ./script.sh to run a script in the current directory.
But if you're not in the directory containing script.sh - you will need to use ./ or multiple ../'s to specify the path to script.sh, relative to where you are in the file-system.
e.g.
./sub-dir1/someotherdir/script.sh or ../../../sub-dir1/someotherdir/script.sh

That's how relative paths work. They describe a path to a file-system object, in a way that is relative to the current working directory - in other words relative to where we currently are in the file-system.

Other than relative paths, there are also absolute paths. An absolute path is the complete path from the root of the file-system.

So examples of absolute paths are:
/home/yourusername/sub-dir/script.sh or ~/sub-dir/script.sh (~ is a bash shortcut for /home/yourusername) or /usr/bin/vim, or /bin/cat.

Absolute paths can be used to specify the paths to file-system objects too.

When to use a relative path and when to use an absolute path:
Typically, you'd use a relative path if the file-system object you are referring to is close to where you are. If it is some distance away - it would be more practical to use an absolute path.

So if you're deep in the file-system somewhere and you want to run a script in your home directory - rather than using a ton of relative ../'s in the path to the script - it would be simpler to use:
Bash:
/home/yourusername/script.sh
or using ~ as a shortcut:
Bash:
~/script.sh

Or if you wanted to open the file in an editor whilst you are deep in the file-system:
Bash:
vim ~/script.sh
Again, I use vim - but feel free to use whatever you normally use!

I think that just about covers relative and absolute paths.
If you have any questions regarding anything in this post - fire away.
If you have any further terminal related questions, feel free to make another thread in the command-line forum here. I tend to lurk there quite often!
 
Wow that was an awesome explanation. Thanks a lot. Sorry I'm kinda slow at this stuff but let me get this straight. If a command starts with / it means it starts from the root(relative path) and goes into specific details. If it starts with./ it means that what you are listing is relative path.
 
Basically, yes.
Any path that starts with / is an absolute-path. It describes the complete path, from the root of the file-system.
Any path that starts with ./ or ../ is a relative-path. It describes the path relative to the current working directory.

Also, a path to a directory like the one in the following cd command would also be interpreted as a relative path:
Code:
cd somedir/someotherdir
It can't be an absolute-path because there is no / prefix at the start of the path.
And because there are no explicit relative-path operators like ./ or ../, then the shell would implicitly assume that somedir (the first item in the path) is in the current working directory. Therefore, this is a relative path too!
 
I want to mention that I stoutly avoid any/all video 'tutorials' or video content in general. It takes longer, isn't searchable, etc... It may be a matter of preference, but CTRL + F is awesome.
 
I want to mention that I stoutly avoid any/all video 'tutorials' or video content in general. It takes longer, isn't searchable, etc... It may be a matter of preference, but CTRL + F is awesome.
How do you learn how to use linux then?
 
You can CTRL + F a tutorial in text. I also find it much, much faster than watching videos.

These days, I don't really need much help. I already read tons and tons.
 
My recommendation is to wait until you bump into a problem and then search for it. Rather than learning what they want you to know, learn what you need to know to do what you want to do with your computer.

If you want a book, there's The Linux Bible.
 
Learn Linux at your own pace. It might take 5 minutes, 5 days, 5 years, or a lifetime. It's not up to us, it's up to you.

Pick a user friendly Linux - one that is easy to install. Install it, use it, ask questions about it. Every Linux is the same, under the hood. Every Linux is also different in presentation and user content, so while you are always welcome here and will always get good answers here, sometimes it is also useful to join a "targeted" forum, relevant to the distro you install.

When you know the distro, and have some knowledge of Linux, then you might want to try another one - or not. Linux is choice.
 

Members online


Top