Join Scott Simpson for an in-depth discussion in this video Find out which Linux distribution you're using, part of Learning Linux Command Line.
- [Voiceover] Up until now almost everything we've done has been distribution independent. That is it hasn't mattered if you're running CentOS, Fedora, Ubuntu, or another distribution of Linux, but it's good to know what environment you're working with, in case you need to make some changes to the system or install software. And it's just good to know what you're working with. If you find yourself in an environment you don't know about, it's pretty easy to figure out what distribution you're using. To do this we'll type cat/etc/*-release, which lists the contents of all the files in the systems Etcetera folder that end with -release.
On different distributions there will be different numbers and names of files that match this wild card, but they'll contain the information we need. Here I can see I'm using Fedora Workstation which I already knew. I'll switch over to an Ubuntu machine, and run the same command. I'll write cat/etc/*-release and here I can see I'm using Ubuntu 14.04 Trusty Tahr. If you're following along in a Mac, this command won't work for you. You could however use the uname-a command, which will tell you a little bit of information, namely that you're using Darwin, which is the name of the Mac OS 10 kernel.
Remember OS 10 isn't Linux, it's a Unix variant, uname-a works on Linux too. There's not much else to that, but it's a convenient tool to keep in your back pocket in case you find yourself exploring an unknown system.
This course will establish the foundation for more advanced Linux topics. Find other Linux training courses here.
- What is the Linux command line?
- Writing Linux commands at the prompt
- Finding help for Linux commands
- Editing files and folders
- Configuring user roles and file permissions
- Using pipes to connect commands
- Peeking at files
- Searching and editing text
- Finding disk and system information
- Installing and updating software