[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New User



Hi Hammad,

I am CC-ing the Debian user mailing list since you may get more help
there from experienced user. Please use REPLY-ALL in Gmail to reply to
the mailing list as well.

Well, I think I was in a similar situation to you. Last Christmas, I
finally got rid of Microsoft Windows and switched to GNU/Linux. I was
able to do that because I got a long holiday in Christmas, so I could
take my time to learn new things.

So. Congratulations!

You are right that mastering terminal is one of the most important
things. So I am going to introduce to you now. In the following basic
tutorial, keyboard's keys are enclosed by [[ ]] and $ is the prompt of
the terminal which is NOT part of the command.

The first thing you should know is how you terminate a command. Well,
it is easy, you press [[ENTER]]. So let's try the following command:

$ printf "hello, world\n"
hello, world

Let's look at the structure of it. There is really two parts, printf
and "hello, world\n". They are separated by space. printf is the
command you try to run and "hello, world\n" is the argument given to
it. In general, a command can take any number of arguments, including
no arguments.

Here is an example of giving a command 3 arguments:

$ ls -a -h -l
LOTS OF STUFF PRINTED...

Now, you KNOW the basic shell syntax! Commands are terminated by
[ENTER] (aka newline character), and arguments are separated by
spaces. So we write the following to denote the generic case for a
command with n arguments:

[COMMAND] [ARG_1] [ARG_2] ... [ARG_N]

We are about to finish, one more thing though. What if your argument
contains spaces? Since the shell "separates" ("tokenize" is the more
technical term) the arguments by spaces, your argument cannot contain
spaces. Well, this is resolved by quoting. Remember in the first
example, we have

$ printf "hello, world\n"
hello, world

Note that "hello, world\n" contains a space but it is treated as a
single argument. It is because we enclosed hello, world by " ".

Well, if you replace double-quote with single-quote, the result will
be the same:

$ printf 'hello, world\n'
hello, world

But of course, they are different in general. For instance, you need
to single-quote a double-quote and double-quote a single-quote:

$ printf 'lots of double-quotes """\n'
lots of double-quotes """

and:

$ printf "lots of single-quotes '''\n"
lots of single-quotes '''

Well, finding the rest of the difference is left as an exercise...

For tutorial, <http://linuxcommand.org/lc3_learning_the_shell.php>
looks fine to me. But I personally do not learn using terminal this
way. I learn by searching on the Internet what I want to do and what I
do not understand. That way, you will slowly build up your knowledge.

For reference, the Advanced Bash-Scripting Guide
<http://www.tldp.org/LDP/abs/abs-guide.pdf> is really good, but it is
quite advanced thought...

Cheers,
Alex

On 13/10/2015, Hammad Khan <hammadkhanee04@gmail.com> wrote:
> Thnx Alex I also think about Debian.but how can I master terminal means
> commons line
> On Oct 12, 2015 1:12 PM, "Alex Vong" <alexvong1995@gmail.com> wrote:
>
>> Hi Hammad,
>>
>> Is Kali a distribution? I haven't tried using it so I don't know what
>> is your problem? Have you chosen any distribution yet? If you haven't,
>> I suggest Debian, because I am using it and I can help if you
>> encounter any problems.
>>
>> Cheers,
>> Alex
>>
>> On 12/10/2015, Hammad Khan <hammadkhanee04@gmail.com> wrote:
>> > failed to start open vulnerability assessment system scanner daemon in
>> kali
>> > 2.0
>> >
>> > Plz anybody can guide.I see this msg after installation when I start
>> > virtual machine .I am using VMware workstation for virtualization.
>> >
>> >
>> > On Oct 12, 2015 12:36 AM, "Hammad Khan" <hammadkhanee04@gmail.com>
>> wrote:
>> >
>> >> Hy Alex
>> >>       Thnx for ur guide. I want to know any sources or way to master
>> >> Linux
>> >> command line or terminal.
>> >>       I want to switch completely from windows to Linux and I guess
>> >> mastering terminal is important.
>> >>       Eagerly waiting for your guidance
>> >> Hammad
>> >> On Oct 11, 2015 11:38 AM, "Alex Vong" <alexvong1995@gmail.com> wrote:
>> >>
>> >>> Hi Hammad,
>> >>>
>> >>> To install Debian 8 (Jessie), you only need either CD1 or DVD1. The
>> >>> extra CDs or DVDs are there to provide packages installable without
>> >>> Internet access. I personally prefer to install using the Live CD
>> >>> since I can test to see if everything works before I install.
>> >>>
>> >>> Note that you also need to pick the CD/DVD with the needed
>> >>> architecture and desktop manager.
>> >>>
>> >>> Please do ask questions if you don't understand what I am taking
>> >>> about.
>> >>>
>> >>> Cheers,
>> >>> Alex
>> >>>
>> >>> On 11/10/2015, Hammad Khan <hammadkhanee04@gmail.com> wrote:
>> >>> > For Debian 8 u have two DVDs in ur download section for 64 bit
>> >>> > which
>> >>> should
>> >>> > be downloaded .what about the checksum files or I have to download
>> >>> > both
>> >>> > DVDs 1 and 2
>> >>> >
>> >>>
>> >>
>> >
>>
>


Reply to: