Jump to content

Terminals in linux

I've never used linux before, but now I have to so I'm planning to install Ubuntu.

I've learnt a bit of Unix commands which I used in Fedora, will the same commands work in Ubuntu  and other linux OSes?

Thanks

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, NareN said:

I've learnt a bit of Unix commands which I used in Fedora, will the same commands work in Ubuntu  and other linux OSes?

Most of them, yes, but not all of them, like e.g. Ubuntu uses a different package-manager and thus the same commands for installing or uninstalling stuff from CLI won't work.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, WereCatf said:

Most of them, yes, but not all of them, like e.g. Ubuntu uses a different package-manager and thus the same commands for installing or uninstalling stuff from CLI won't work.

Thanks a lot

Link to comment
Share on other sites

Link to post
Share on other sites

A fair few of the commands should work across from what I know. Some apps have specific versions (they should say ubuntu (.deb) arch, etc.) I have only really used pop! os on an old computer I replaced so not sure 100%. From what I know its the same for most things and some specifics for app downloads and some may not work because of snaps and stuff like that without changing settings.

Quote me for an answer, and to help track conversations

PC: tuf b450m plus gaming, ryzen 5 3600, 1650 OC (gigabyte windforce), corsair vengeance 16gb @ 3200mhz

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, MistercanIgetacookie said:

Can you give me an example?

I just wanted to know whether Fedora and Ubuntu use totally different terminal commands like python and C++ do.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Oh no, its not like that. It's just smaller things that change. The basic commands will work across all distros as it is part of linux, not necessarilly th distro

Quote me for an answer, and to help track conversations

PC: tuf b450m plus gaming, ryzen 5 3600, 1650 OC (gigabyte windforce), corsair vengeance 16gb @ 3200mhz

Link to comment
Share on other sites

Link to post
Share on other sites

"Commands" is a misleading term in this case and answering yes or no here would be reductive.

 

Some of the commands you type in the terminal are Bash commands. Bash is the default shell in most (but not all!) Linux distributions. These commands will be the same on every distribution that uses Bash and you can always install Bash yourself if you want it on any distribution. This includes pipes ( ) and environment variable syntax. Other shells (such as ZSH) often share many basic commands with Bash but you should always check.

 

Some other commands are programs you run in your terminal. Many of these are part of the GNU core utilities and will be present on all GNU/Linux distributions. An example of this would be cat or ls. Others are programs that may or may not be available on any given distribution and you may need to install yourself; for example sudo is a program that is not preinstalled on some distributions.

 

Of those, some commands refer to programs that are distribution specific, for example the package manager, which often cannot be easily installed on distributions that don't come with them. On Ubuntu you use apt to install packages, on Fedora you use dnf or yum.

 

Lastly, a command could be an alias, which is a shortcut for some longer or less intuitive command. These depend on your shell configuration and you should not count on their presence on any given distribution unless you define them yourself. For example, some people alias ll to mean 'ls -F', but this is far from universal.

 

With some experience using Linux you'll be able to make this distinction without thinking much about it.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

20 hours ago, NareN said:

I just wanted to know whether Fedora and Ubuntu use totally different terminal commands like python and C++ do.

 

most common commands like cd and ls all work. 

 

where they differ as others have mentioned is installing packages. 

 

so instead of:

sudo dnf install package

you use:

sudo apt install package

 

for apt, or you can use snap like so:

sudo snap install package

 

mostly snap installs are automatic on Ubuntu. if for example you were to type: sudo apt install chromium, the system would notice that there is a chromium snap available and install that instead of the apt version. 

 

snaps have advantages and disadvantages. the advantage of snap is security, since the applications are sandboxed from the rest of the OS. the disadvantages are that they are slower to launch and don't use any custom theming you have installed. if you don't want to use snaps, Ubuntu is not the distro for you, since they are basically the default on Ubuntu now. 

She/Her

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×