LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu Version (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-version-660500/)

sawgrass 08-04-2008 10:47 PM

Ubuntu Version
 
I am very new to the linux world having recently installed Ubuntu which I am enjoying a lot.

I want to know how do I find out which version I have. Having downloaded all the updates that have been available, does that mean that I have the last version installed. If not how do I find out what version I'm running?

Sawgrass

IndyGunFreak 08-04-2008 11:29 PM

Quote:

Originally Posted by sawgrass (Post 3236901)
I am very new to the linux world having recently installed Ubuntu which I am enjoying a lot.

I want to know how do I find out which version I have. Having downloaded all the updates that have been available, does that mean that I have the last version installed. If not how do I find out what version I'm running?

Sawgrass

open a terminal(applications/accessories/terminal) and copy paste this line at the prompt then hit enter....

Code:

lsb_release -a
If you want to know your kernel version, both of the below will provide some insight....
Code:

uname -a
Code:

uname -r
IGF

texasone 08-06-2008 08:02 AM

hey, at my work there are linux servers. I don't interact with them but some programmers here, who I am friends with, use them. I was down at the programmers station the other day and I know for a fact that they are using the ksh, but have bash installed if needed to use. We were trying to figure out what distro they were using, just curiosity from me. I use bash and I don't have experience with ksh at the moment. Are the commands the same in ksh, or should I just, the next time I am down there, just hop on and switch to bash and use lsb_release -a for distro and version and uname -r for kernel release?

BTW, I would prefer using ksh since that is what the main shell is.

colucix 08-06-2008 08:24 AM

You have to consider the difference between external commands and built-ins. A built-in is a statement of the shell language, an external command is an external application which can run under any shell (if properly built). For example cd, echo, read are shell built-ins, whereas find, grep, awk are external commands. You can verify this using the type built-in:
Code:

$ type cd
cd is a shell builtin

$ type find
find is /bin/find

$ type type
type is a shell builtin

So you can run external commands - like lsb_release and uname - under bash or ksh indifferently. Furthermore bash and ksh are very similar in their syntax, whereas you will find more differences between the C-shells (csh and tcsh) and the Bourne shells (sh and bash). Other differences depend on the release: for example arrays were introduced in the Korn shell (ksh) earlier than the Bourne Again shell (bash).

In summary you have not to worry about using linux commands under a shell or another, you have to worry about the scripting language and eventually about the compatibility between different shells.


All times are GMT -5. The time now is 04:23 AM.