Linux

You are currently browsing articles tagged Linux.

While i was trying to configure postfix, i learnt to sending e-mail in ssh. There are some script to do this and i choose sendEmail to install

sendemail type:

sudo apt-get intstall sendemail

then you can type

sendemail -f {from} -t (emailto}

sendEmail -f ADDRESS [options]

Required:
-f ADDRESS                from (sender) email address
* At least one recipient required via -t, -cc, or -bcc
* Message body required via -m, STDIN, or -o message-file=FILE

Common:
-t ADDRESS [ADDR ...]     to email address(es)
-u SUBJECT                message subject
-m MESSAGE                message body
-s SERVER[:PORT]          smtp mail relay, default is localhost:25

Optional:
-a   FILE [FILE ...]      file attachment(s)
-cc  ADDRESS [ADDR ...]   cc  email address(es)
-bcc ADDRESS [ADDR ...]   bcc email address(es)
-xu  USERNAME             username for SMTP authentication
-xp  PASSWORD             password for SMTP authentication

Paranormal:
-b BINDADDR[:PORT]        local host bind address
-l LOGFILE                log to the specified file
-v                        verbosity, use multiple times for greater effect
-q                        be quiet (i.e. no STDOUT output)
-o NAME=VALUE             advanced options, for details try: –help misc
-o message-file=FILE         -o message-format=raw
-o message-header=HEADER     -o message-charset=CHARSET
-o reply-to=ADDRESS          -o timeout=SECONDS
-o username=USERNAME         -o password=PASSWORD
-o tls=<auto|yes|no>         -o fqdn=FQDN

Help:
–help                    the helpful overview you’re reading now
–help addressing         explain addressing and related options
–help message            explain message body input and related options
–help networking         explain -s, -b, etc
–help output             explain logging and other output options
–help misc               explain -o options, TLS, SMTP auth, and more

After that type your email and press ctrl+d:

Mar 04 21:44:24 power sendEmail[24236]: Message input complete.
Mar 04 21:44:25 power sendEmail[24236]: Email was sent successfully!

Second Way

install mailx with:

sudo apt-get install mailx

to send email

mailx to@me.com

Subject: Write subject press enter

type here body press ctrl+d

CC: blank

Related posts

Tags: , , ,

Ubuntu 9.10 has released, it has some new faetures, i shared a few of them. For more

Store, sync and share


Integrated “Ubuntu One” technology gives you 2 GB of online storage for free. Easily share files between your own and your friends’ computers. Upgrade at low cost for more storage if you need it.

Software Center

Instant access to thousands of free and open-source applications

Categories include: Education, Games, Sound and Video, Graphics, Programming and Office.

Simply select the applications you want to use and the Software Center will add them to your computer

No CDs, no licenses, no hassle.

Download Ubuntu 9.10

Related posts

Tags: , ,

To learn your linux and kernel version ( release ) you can use /proc/version

Type it in console:

cat /proc/version

Linux version 2.6.18-92.el5
(brewbuilder@ls20-bc2-13.build.redhat.com)
(gcc version 4.1.2 20071124 (Red Hat 4.1.2-41))
#1 SMP Tue Apr 29 13:16:15 EDT 2008

In this output, you get to see the following information:

  1. Exact version of the Linux kernel used in your OS: Linux version 2.6.18-92.el5
  2. Name of the user who compiled your kernel, and also a host name where it happened: brewbuilder@ls20-bc2-13.build.redhat.com
  3. Version of the GCC compiler used for building the kernel: gcc version 4.1.2 20071124
  4. Type of the kernel – SMP here means Symmetric MultiProcessing kernel, the one that supports systems with multiple CPUs or multiple cpu cores
  5. Date and time when the kernel was built: Tue Apr 29 13:16:15 EDT 2008

For more: http://www.unixtutorial.org/2009/04/use-proc-version-to-identify-your-linux-release/

Related posts

Tags: , , , , ,

Some tips for Pardus

There are some tips for Pardus ,

1. How to chane linux root password in Pardus

write su root to login as root

write your password

type sudo passwd

type new password

confirm new password

2. How to terminate , kill a program

press ctrl+alt+esc and click the program that you want to kill

3. How to install program

Open pisi from pardus menu, search for a program for example amsn, check it and click install than you can use it or you can open console and write “sudo pisi it amsn” then write your password.

Related posts

Tags: , , , , ,

Compile C C++ in linux

i have studied c++ for my exam today and i will explain how can you compile c/c++ in linux also there were some error that i want mention.

1.install eclipse (not necessary for compiling)
probably you can find it from your package manager if there isn’t
use this link: http://www.eclipse.org
for pardus open pisi search for eclipse and install it ( 3.3)

2. install CDT plugin for eclipse
open eclipse help -> software updates -> avilable softwares -> add site
for eclipse 3.4 add this:

http://download.eclipse.org/tools/cdt/releases/ganymede

for eclipse 3.3 add this:

http://download.eclipse.org/tools/cdt/releases/europa

check it and click install

you have eclipse CDT to write your c and c++ codes
now you need gcc to compile it

3. install gcc
find gcc from your package manager.
for pardus write this to console
sudo pisi it gcc

4. first simple
i opened a new c++ project from eclipse, created new source file, writed my code and saved. when i am trying to make file,
I received this message “(Exec error:Cannot run make)” .

(solution: install make from your package manager.For pardus write this sudo pisi it make.)

after that i tried it on console with giving this command

(for c++ codes)

g++ example.cpp

(for c codes)

gcc example.c

however, i received “iostream.h: No such file or directory gcc”
solution: delete .h just write <iostream> also write g++ for *.cpp files

after i installed make, i was able to compile it from console and eclipse.

if you want to see your code’s output:

g++ example.cpp

it makes a compiled file named example in your folder

to run it just write

./example

i hope , help you.

Related posts

Tags: , , , , ,