CLI difference between distros

Discussion in 'Command Line' started by Graphic Jazz, Oct 27, 2013.

  1. Graphic Jazz

    Graphic Jazz New Member

    Messages:
    2
    Likes Received:
    2
    Trophy Points:
    1
    I am pretty new to linux and am trying to learn commands in the CLI. I am just wondering if I learn the commands in a distro such as Debian then try using a CLI in Fedora are they 1)completely different 2)pretty similar or 3) exactly the same? I'm basically trying to use just server type installations without any type of GUI at all. Also, I've heard that bash is the shell used in linux but is that for all distros or just certain ones?

    DevynCJohnson likes this.
  2. lann

    lann New Member

    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    1
    No it's the same commands
    DevynCJohnson likes this.
  3. arochester

    arochester Well-Known Member

    Messages:
    897
    Likes Received:
    293
    Trophy Points:
    63
    Hmm.

    Install an app in Fedora: su -c 'yum install application'

    Install an app in Debian: apt-get install application

    Slightly different?
    DevynCJohnson likes this.
  4. Graphic Jazz

    Graphic Jazz New Member

    Messages:
    2
    Likes Received:
    2
    Trophy Points:
    1
    Is it because they have different shells that they have different commands? If so, are shells as numerous as the distros themselves?
    DevynCJohnson likes this.
  5. grim76

    grim76 Active Member Staff Writer

    Messages:
    177
    Likes Received:
    48
    Trophy Points:
    28
    One thing to keep in mind is that there may be small differences. Some distributions will have a newer version of an app and that in turn may lead to a switch being depricated, or new switches being added.

    Each distro also has some "default" locations that are a little different for each. Some have default path differences as well.

    Just somethings to keep in mind when thinking about command line differences.
  6. slashedzero

    slashedzero New Member

    Messages:
    17
    Likes Received:
    9
    Trophy Points:
    3
    No, not necessarily in this case. Fedora (Red Hat) uses a different package management system than Debian and therefore they've created different tools (yum/apt-get and corresponding rpm/dpkg) to deal with them.

    There are different shells, however, but their differences are not quite so vast. Commands likely will be similar shell to shell. This article is a comparison of shells, but of these, I've only encountered maybe three. And then what grim76 said is correct as well, there're sometimes also small differences.
    DevynCJohnson likes this.
  7. Harikrishnan R

    Harikrishnan R Member

    Messages:
    30
    Likes Received:
    22
    Trophy Points:
    8
    I would argue that the shell commands are same in all the linux distros using bash.
    The only changes you get are when different distros use different softwares/utilities.
    In ubuntu its pppoeconf to get a pppoe connection running while its pppoe-setup in Fedora. Same story goes with the package managers as the above person said.
    Last edited: Nov 13, 2013
  8. GrumpyOldMan

    GrumpyOldMan Active Member

    Messages:
    149
    Likes Received:
    49
    Trophy Points:
    28
    Every distro has it's own notion of what should be included by default, and that includes the various os utilities. Some light-weight distros like Tinycore may use Busybox instead of stand-alone utils, and they have a somewhat simplified set of options in that case.

    Nothing precludes you from adding or upgrading your utilities. It's even a valuable exercise if you really want an in-depth understanding of the GNU portion of linux.

    Stricly, linux is the kernel, most of the other gubbins are GNU utilities. It's why it's properly called GNU/Linux. You could replace the linux kernel with something else, and it'd be pretty much the same. You could replace the utilities and keep the kernel, and have Android.
    DevynCJohnson likes this.
  9. Videodrome

    Videodrome Active Member

    Messages:
    214
    Likes Received:
    80
    Trophy Points:
    28
    It seems like navigating the file system or moving and copying files should be about the same. Unless a Distro offers a special disk utility or something.

    But yeah as a mostly Debian user, I tried Vector Linux which I realized came from Slackware and I couldn't Apt-Get my packages. I think it actually used Slapt-Get.

    Or more recently, this odd small distro SliTaz which uses Tazpkg get-install package.
  10. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,354
    Likes Received:
    1,084
    Trophy Points:
    113
    The differences largely lie in the fact that the system may have different applications installed or aliases set in ~/.bash_aliases
  11. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,354
    Likes Received:
    1,084
    Trophy Points:
    113
    This post of mine may get the thread off topic, but I wanted to say that replacing GNU with Dalvik is how Android is made. Android is Dalvik/Linux. Also, Android does not use a Vanilla-kernel. Android uses a Linux kernel called L4Android.

    If anyone wants to reply to this post, please make a new thread and reply to this post with a link to your new thread. Thanks!
  12. Cyber-Berserker

    Cyber-Berserker Active Member

    Messages:
    232
    Likes Received:
    139
    Trophy Points:
    43
    The names of package managers are different, but the shell commands are the same for all distros. Programmes like Bash do not make a distinction between Debian, Redhat and Arch. The only difference is the name of the package manager. In this case; (distro-specific package manager) install package.
    apt-get install conky
    apt-get install gnome
    Different commands? Or the same command with two different package names?

    The answer to the OP's question is; shell commands are the same everywhere, but certain aspects of systems require different names to be used in a few commands. Most commands will be identical. rm, cp, mk will do the same things on every system. There may be different locations of one or two directories, but the difference will be in the path/to/file, not the command.
    How dare you?!:D
    DevynCJohnson likes this.
  13. lobo

    lobo Active Member

    Messages:
    130
    Likes Received:
    74
    Trophy Points:
    28
    As others have said, commands are much the same. In fact if you learn basic bash commands you should be able to find your way around any *nix.

    The big difference the end users sees is in package management tools. But once you've learned to use one it's not that hard to adapt to others. Many distros, especially distros which are based on other distros, share the same package management tools.
    DevynCJohnson likes this.
  14. GrumpyOldMan

    GrumpyOldMan Active Member

    Messages:
    149
    Likes Received:
    49
    Trophy Points:
    28
    Actually, Dalvik is what runs the byte code compiled from Java sources, much like the Java VMs from various sources, including Oracle. Many Android OS utilities are actually C-coded, and don't use Dalvik. Also, the Android kernel has been pretty much merged back with the mainline GNU/Linux kernel. They're not that different any more. Finally, I believe a lot of GNU stuff could be compiled to run on Android platforms.

    It's for these reasons that you can now buy Android-based desktop systems, especially since Intel has started supporting Android on their processors.
    DevynCJohnson likes this.
  15. Videodrome

    Videodrome Active Member

    Messages:
    214
    Likes Received:
    80
    Trophy Points:
    28
    Actually, right now I'm trying Manjaro and I do not seem to have the command Ifconfig. Or related commands like Ifup or Ifdown.

    I sometimes find ifconfig useful just to check my IPaddress or for internet connection troubleshooting if I run into a problem.

    I think Manjaro is the first distro i've been on where this is missing. I think it was limited to Root on Debian but it was there.

    Oh weird.... I Googled and found the command "ip addr" for Manjaro. o_O I had previously thought ifconfig was standard for all Linux based OSes but I guess not.
    DevynCJohnson likes this.
  16. grim76

    grim76 Active Member Staff Writer

    Messages:
    177
    Likes Received:
    48
    Trophy Points:
    28
    ifconfig, ifup, ifdown, and netstat are depricated. ip and ss are the replacements.
    DevynCJohnson likes this.
  17. Mario Caveda

    Mario Caveda New Member

    Messages:
    19
    Likes Received:
    9
    Trophy Points:
    3
    You can use bash in any Linux's distro
    DevynCJohnson likes this.

Share This Page