Jump to content

An Introduction to Linux Basics


emerglines
 Share

Recommended Posts

504785995.jpg

About Linux

Linux is a free, open-source operating system. All of DigitalOcean's offered operating systems are Linux distributions.

Linux has been under active development since 1991. It has developed to become versatile and used all over the world, from web servers to cellphones.

DigitalOcean offers Linux distributions on droplets because Linux is free and easy to use.

However, newcomers to Linux may find it difficult to approach the structure of an unfamiliar operating system.

This guide gently introduces key terminal skills and equips newcomers to learn more about Linux.

The Terminal

For most of the time when you access a VPS, you'll be doing it through a terminal shell. The shell allows you to execute commands on the droplet.

All administrative tasks can be accomplished through the terminal. This includes file manipulation, package installation, and user management.

The terminal is interactive. You specify commands to run. The terminal outputs the results of those commands. Executing any command is done by typing it and pressing Enter.

Navigation

Linux filesystems are based on a directory tree. This means that you can create directories (or "folders") inside other directories, and files can exist in any directory.

To see what directory you are currently active in:

pwd

This stands for "print working directory", and will print the path to your current directory. The output can look similar to this:

/home/foo

This means that your current active directory is foo, which is inside home, which lives in the root directory, /.

To see other files and directories that exist in your current working directory:

ls

This will give you a list of names of files and directories. To navigate into a directory, use its name:

cd <name of directory>

This will change your new current working directory to the directory you specified. You can see this with pwd.

Additionally, you can specify .. to change to the directory one level up in your path. To get back to your original directory:

cd ..

We can also create new directories in our current working directory. For example, to create a new directory called bar:

mkdir bar

Then we can cd into bar if we want. We can also delete bar if we no longer find it useful:

rm -d bar

rm -d will only delete empty directories.

File Manipulation

Files cannot be used with cd (it stands for "change directory").

Instead, we can view files. If we have a file _baz_ in our current directory:

cat baz

This will print out the entire contents of baz to the terminal.

With long files, this is impractical and unreadable. To paginate the output:

less baz

This will also print the contents of baz, but one terminal page at a time, beginning at the start of the file.

Use the spacebar to advance a page, or the arrow keys to go up and down one line at a time. Press q to quit out of less.

To create a new file called foobar:

touch foobar

This creates an empty file with the name foobar in your current working directory. The contents of this file are empty.

If we decide foobar isn't such a good name after all, we can rename foobar to fizzbuzz:

mv foobar fizzbuzz

mv stands for "move" and it can move a file or directory from one place to another.

By specifying the original file, we can "move" it to a new location in the current working directory, thereby renaming it.

It is also possible to copy a file to a new location. If we want to bring back foobar, but keepfizzbuzz too:

cp fizzbuzz foobar

Just as you guessed, cp is short for "copy". By copying fizzbuzz to a new file called foobar, we have replicated the original file in a new file with a different name.

However, what good is a file if it contains nothing? To edit files, a file editor is necessary.

There are many options for file editors, all created by professionals for daily use. Such editors include vim, emacs, nano, and pico.

nano is a perfectly suitable option for beginners. It is easy and simple to use, with no bells or whistles to confuse the average user.

To edit text into foobar:

nano foobar

This will open up a space where you can immediately start typing to edit foobar.

To save the written text, press Ctrl-X then Y. This returns you to the shell with a newly savedfoobar file.

Now foobar has some text to view when using cat or less.

Finally, to delete the empty fizzbuzz:

rm fizzbuzz

Unlike directories, files are deleted whether they contain content or not.

The Filesystem Hierarchy Standard

Nearly all Linux distributions are compliant with a universal standard for filesystem directory structure.

The FHS defines clearly determined directores for different purposes.

The symbol / is used to indicate the root directory in the filesystem hierarchy defined by the FHS.

When a user logs into the shell, they'll be brought to their own user directory in /home.

The FHS defines /home as containing the home directories for regular users. (root has its own home directory in /root, also specified by the FHS.)

Because default, common-sense locations are provided for many different kinds of files, organisation of files for different purposes is simplified.

Permissions

On a system with multiple user accounts, determining who is allowed to interact with what files is important.

Linux supports unix-style filesystem permissions, which restricts who can read and write certain files.

Permissions are an expansive and profound topic, discussed in detail in our permissions article.

A Culture of Learning

So far, this guide only serves to teach the basics of toddling around in a Linux environment. But knowing your way around the Linux environment requires a mindset of study and illumination.

When you have a question about how to accomplish a task, there are several avenues of instruction you can turn to.

First and foremost, Google and DuckDuckGo are invaluable resources. Odds are that if you have a question, many others have already asked it and had the question answered.

Your immediate instinct should be to look for the answer through those search engines.

When your question has to do with any Linux command, the manual pages offer detailed and insightful documentation for nearly every single command.

To see the man-pages for any command:

man <command>

For instance, man rm displays the purpose of rm, how to use it, what options are available, examples of use, and more useful information.

Gaining the information you seek is an essential skill, which will sustain your Linux career for as long as you stay devoted to a time of learning.


Source

Edited by emerglines
Link to comment
Share on other sites

  • Replies 18
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

  • Pedrito

    5

  • TuFaS

    1

  • emerglines

    8

  • software182

    1

No wizards anymore. :P

367ckx.jpg

Lol! Sudo apt-get install wine ( for windows noobs) :)

Link to comment
Share on other sites

Nice topic, you can always learn something new, also I'd advise you to use code tag.

Thanks bro, appreciate :)

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

Link to comment
Share on other sites

i kinda like linux mint 15 kde i hope they get more software added to the software manager i think linux is great but they should make it easier for people who are migrating from windows!

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

A file will be called "veetle-X.X.XX-linux-install.sh" just go to extracted directory of Veetle in console and type :

"./veetle-X.X.XX-linux-install.sh" without quotes

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

A file will be called "veetle-X.X.XX-linux-install.sh" just go to extracted directory of Veetle in console and type :

"./veetle-X.X.XX-linux-install.sh" without quotes

That alone doesn't work on x64 Ubuntu! I have to install some libraries as well.

But after that the sound is out of sync.

It works very well on Ubuntu 12.04, but not on 13.04!

Thanks for the help anyway. :)

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

A file will be called "veetle-X.X.XX-linux-install.sh" just go to extracted directory of Veetle in console and type :

"./veetle-X.X.XX-linux-install.sh" without quotes

That alone doesn't work on x64 Ubuntu! I have to install some libraries as well.

But after that the sound is out of sync.

It works very well on Ubuntu 12.04, but not on 13.04!

Thanks for the help anyway. :)

Check this : http://veetle.com/index.php/article/view/externalVlc

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

A file will be called "veetle-X.X.XX-linux-install.sh" just go to extracted directory of Veetle in console and type :

"./veetle-X.X.XX-linux-install.sh" without quotes

That alone doesn't work on x64 Ubuntu! I have to install some libraries as well.

But after that the sound is out of sync.

It works very well on Ubuntu 12.04, but not on 13.04!

Thanks for the help anyway. :)

Check this : http://veetle.com/index.php/article/view/externalVlc

That is for broadcasting, I want to watch live streams on Ubuntu.

I did what's here on this blog: http://bhaismachine.wordpress.com/2012/06/04/watch-veetle-videos-in-hd-on-ubuntu-12-04-64-bits-using-firefox-browser/

Like I said it works perfectly on Ubuntu 12.04 but not on 13.04.

After changing from SD to HD sometimes it works fine, but the sound is always out of sync!

Thanks again for your help, I'll trying and maybe I'll manage to make it to work. :showoff:

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

A file will be called "veetle-X.X.XX-linux-install.sh" just go to extracted directory of Veetle in console and type :

"./veetle-X.X.XX-linux-install.sh" without quotes

That alone doesn't work on x64 Ubuntu! I have to install some libraries as well.

But after that the sound is out of sync.

It works very well on Ubuntu 12.04, but not on 13.04!

Thanks for the help anyway. :)

Check this : http://veetle.com/index.php/article/view/externalVlc

That is for broadcasting, I want to watch live streams on Ubuntu.

I did what's here on this blog: http://bhaismachine.wordpress.com/2012/06/04/watch-veetle-videos-in-hd-on-ubuntu-12-04-64-bits-using-firefox-browser/

Like I said it works perfectly on Ubuntu 12.04 but not on 13.04.

After changing from SD to HD sometimes it works fine, but the sound is always out of sync!

Thanks again for your help, I'll trying and maybe I'll manage to make it to work. :showoff:

This is my favorite it works well, maybe it will resolve your problem : http://xbmc.org/

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

A file will be called "veetle-X.X.XX-linux-install.sh" just go to extracted directory of Veetle in console and type :

"./veetle-X.X.XX-linux-install.sh" without quotes

That alone doesn't work on x64 Ubuntu! I have to install some libraries as well.

But after that the sound is out of sync.

It works very well on Ubuntu 12.04, but not on 13.04!

Thanks for the help anyway. :)

Check this : http://veetle.com/index.php/article/view/externalVlc

That is for broadcasting, I want to watch live streams on Ubuntu.

I did what's here on this blog: http://bhaismachine.wordpress.com/2012/06/04/watch-veetle-videos-in-hd-on-ubuntu-12-04-64-bits-using-firefox-browser/

Like I said it works perfectly on Ubuntu 12.04 but not on 13.04.

After changing from SD to HD sometimes it works fine, but the sound is always out of sync!

Thanks again for your help, I'll trying and maybe I'll manage to make it to work. :showoff:

This is my favorite it works well, maybe it will resolve your problem : http://xbmc.org/

Sorry, but that is not what I want. I want to watch live streams like you see here: http://thesporttv.eu/Sporttv1-veetle.html

That works perfectly on Windows and Ubuntu 12.04, using a browser. But not on Ubuntu 13.04, I haven't tried Saucy Salamander yet!

I really don't know why it works on one version and not on the other...

Well, thanks again for your help. :)

Link to comment
Share on other sites

Very nice info, thanks for sharing.

By the way, does anyone here know how to properly install Veetle on Ubuntu 13.04 x64?

I managed to install it but it either does not work or the sound is out of sync and/or distorted.

I would appreciate it. I really like Ubuntu! :)

A file will be called "veetle-X.X.XX-linux-install.sh" just go to extracted directory of Veetle in console and type :

"./veetle-X.X.XX-linux-install.sh" without quotes

That alone doesn't work on x64 Ubuntu! I have to install some libraries as well.

But after that the sound is out of sync.

It works very well on Ubuntu 12.04, but not on 13.04!

Thanks for the help anyway. :)

Check this : http://veetle.com/index.php/article/view/externalVlc

That is for broadcasting, I want to watch live streams on Ubuntu.

I did what's here on this blog: http://bhaismachine.wordpress.com/2012/06/04/watch-veetle-videos-in-hd-on-ubuntu-12-04-64-bits-using-firefox-browser/

Like I said it works perfectly on Ubuntu 12.04 but not on 13.04.

After changing from SD to HD sometimes it works fine, but the sound is always out of sync!

Thanks again for your help, I'll trying and maybe I'll manage to make it to work. :showoff:

This is my favorite it works well, maybe it will resolve your problem : http://xbmc.org/

Sorry, but that is not what I want. I want to watch live streams like you see here: http://thesporttv.eu/Sporttv1-veetle.html

That works perfectly on Windows and Ubuntu 12.04, using a browser. But not on Ubuntu 13.04, I haven't tried Saucy Salamander yet!

I really don't know why it works on one version and not on the other...

Well, thanks again for your help. :)

Its to watch streaming channels, just you need to add some add ons that will make you watch even foreign channels :) me too i'm addicted to sport channels

Edited by emerglines
Link to comment
Share on other sites

Yeah, I can't be without watching my sports! :P

And Veetle streams have much better quality.

I managed to make it work more or less now.

Thanks again for your help. :)

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...