Linux Tech Hacks

Your Linux tech hacks and Tips

10 Things An 'Average Joe' Must Know About Linux



Lots of people have chosen to make the move from Windows to Linux but do
they have 'it' in them to know and understand what's in store?
 




Linux, Linux distros, Windows, Ubuntu, Linux kernel, Open source, operating system, News, Technology news



Saturday, January 25, 2014



Well, frankly speaking nobody is perfect, and in the current
discussion not everyone is a tech-savy geek. But does that mean they
don't have right to feel and enjoy the 'best' things in life (in this
discussion, the same pertains to technology). Over the years, many
people have switched from Windows to Linux primarily owing to freedom
that the latter provides. But, the question remains- is the 'average
joe' in you truly familiar with what Linux really is?




This goes out to all the
people who have heard the term Linux and want to know a bit more but
have no clue where to begin. Here are 10 things users must know about
Linux:

What is Linux?

"Linux is a Unix-like
computer operating system assembled under the model of free and open
source software development and distribution. The defining component of
Linux is the Linux kernel, an operating system kernel first released 5
October 1991 by Linus Torvalds." is how Wikipedia puts it. Most of you
will probably have the Windows operating system that has seen a number
of versions over the years. Now Windows is an Operating System, while
Windows Kernel or the Windows NT Kernel is basically the engine for it.
From the Windows NT Kernel multiple versions of Windows are formed
including the home, professional and ultimate editions.

Now
coming to our point: there is a common misconception that Linux is an
Operating System (or as even Wiki calls it). Linux is however the engine
that spawns a whole host of different operating systems known as
distributions.


What is a distribution (distro)?

The
distribution is in fact the actual operating system. So you could look
at it like this. There are multiple distributions each aimed at a
different target audience. The difference between Linux and Windows is
that there are hundreds of choices of Linux distributions with majority
of them being free.

How do I know which distribution is right for me?

This
basically comes down to personal preference. A lot of distributions
provide live CDs which makes it possible to insert the CD into you CD
drive and restart your computer and it will boot straight into the Linux
distribution. Simply try out all the functions without worrying about
messing up your Windows installation and if you like it you can then
install it. However, blindly downloading distributions is not advisable
for newbies. You can always visit www.distrowatch.org that convineantly
lists the top 100 distributions. Further, the search tool can be used to
search on the distribution type.

Searching on 'older
computers' provides a list of distributions that run well on older
computers. Then there are distros for gamers, education and so on. Each
distribution has a description which states the major goals of the
projects. You can also see screenshots and read reviews.

For first timers however, Ubuntu, Linux Mint or Zorin OS might be useful!

What is a desktop environment?

A
desktop environment is simply a series of menus, taskbars, windows and
keyboard shortcuts that you use to start and run applications. Linux
offers an abundant choice of desktop environments. The main desktop
environments in use are Unity, Cinnamon, Mate, Gnome, KDE, XFCE and
LXDE.

Where can I get Linux distributions?

Most
distributions of course come free, however, some distros make it more
complicated than others when choosing what to download. Ubuntu is fairly
easier since there is only one desktop choice (Unity) and so you simply
get the choice to download a 32 bit version or a 64 bit version.

How do I install Linux but keep Windows?

Some
Linux distributions can run from inside Windows or as well as Windows
without affecting the Windows install at all for those of you still
wanting to hold on to Windows while trying out Linux. For instance,
Ubuntu has the Wubi installer which runs Ubuntu from inside Windows.
While, many other distros enable you to install the Linux distribution
alongside Windows so that when you boot your PC you can choose whether
to use Windows or Linux.

Can I still run my Windows applications?

WINE
enables you to install Windows applications within the Linux operating
system and run them straight from within Linux. While, VirtualBox
enables you to install a copy of Windows within a virtual machine
whereby you can install the Windows applications you wish to use.

Is my hardware supported by Linux?

The answer is a yes! The best thing however is to try out the live version of a distribution first and test all your hardware.

How do I get support for Linux?

The
major distros have forums that you can go to for help. If the forums
don’t work then there are the ICQ chat rooms. Then there is of course
Google and Youtube.

Why would I want to use Linux instead of Windows?

If
your machine is running slowly or it is getting older then you might
not be able to upgrade to a later version of Windows. However, the
current version of Windows will eventually lose support and there is
every chance security holes will be found and not plugged. Moving to a
version of Linux that is designed for older computers will give you
peace of mind that you are running on an operating system designed for
you.

Source: Everyday Linux User







Saurabh Singh, EFYTIMES News Network 







Fonte: 10 Things An 'Average Joe' Must Know About Linux

Here's A List Of 83 Linux Commands For Beginners!

Here's A List Of 83 Linux Commands For Beginners!

Switching to Linux was a wonderful decision, now it's time to explore its power - the command line!


So you have just switched to Linux and trying to figure out what was the fuss about the command prompt as the most powerful tool. Well here's a list of Linux commands for a beginner to help you get a glimpse of what the command prompt can do for you. 

Viewing, copying, moving and deleting files

lsDisplay the contents of the current directory
ls -aDisplay also hidden files and hidden directories
  
cp filename /path/dir_nameCopy filename into directory /path/dir_name
cp -r dir_name /path/dir_name2Copy the entire dir_name into /path/dir_name2
cp filename1 filename2 /path/dir_nameCopy filename1 and filename2 into /path/dir_name
  
rm nameRemove a file or directory called name
rm -r nameRemove an entire directory as well as its included files and subdirectories
  
mv filename /path/dir_nameMove filename into /path/dir_name
mv filename1 filename2Rename filename1 to filename2
  
cat filenameDisplay filenames contents
  
more filenameDisplay filename in pages. Use spacebar to view next page
  
head filenameDisplay filenames first 10 lines
head -15 filenameDisplay filenames first 15 lines
  
tail filenameDisplay filenames last 10 lines
tail -15 filenameDisplay filenames last 15 lines
  
pwdDisplay current directory
  
cd /path/dir_nameChange to directory /path/dir_name
cd ..Go 1 directory up
  
mkdir dir_nameCreate directory dir_name
rmdir dir_nameDelete directory dir_name

Finding files and text within files

updatedbUpdate (create first time used) a database of all files under the root directory /
locate filenameFind file filename searching in the database
  
find / -name filenameStarting from the root directory search for the file called filename
find / -name *filenameSame as above but search for file containing the string filename
  
grep string /path/dir_nameStarting from /path/dir_name search for all files containing string
  
which application_nameSearch $path for application app_name
whereis application_nameSearch $path, man pages and source files for application_name

Archived files

Decompress
tar -xzf filename.tgzDecompress tzg file
tar -xzf filename.tar.gzDecompress tar.gz file
tar -xjf filename.tar.bz2Decompress tar.bz2 file

Compress
tar -czf filename.tar /path/dir_nameCompress directory /path/dir_name to filename.tar
gzip -c filename > filename.gzCompress /path/dir_name to filename.tar.gz
bzip2 -c filename > filename.bz2Compress /path/dir_name to filename.tar.bz2

Using rpm files 

rpm -hiv package.rpmInstall rpm called package.rpm
rpm -hiv --force package.rpmInstall rpm called package.rpm by force
rpm -hUv package.rpmUpgrade rpm called package.rpm
rpm -e package.rpmDelete rpm called package.rpm
rpm -qpil package.rpmList files in not-installed rpm called package.rpm
rpm -ql package.rpmList files in installed rpm called package.rpm
rpm -q strList installed rpms containing the string str
rpm -qf /path/application_nameDisplay the rpm that contains application application_name

Starting and Stoping 

startxStart the X system
shutdown -h nowShutdown the system now and do not reboot
halt
Same as above
shutdown -r nowReboot
rebootSame as above
shutdown -r +10Reboot in 10 minutes
   

Mounting filesystems

mount -t vfat /dev/sd(a)(1) /mnt/c_driveMount the first partition 1 of the first hard disk drive a which is in fat32 vfat dormat under /mnt/c_drive directory
mount -t iso9660 /dev/cdrom /mnt/cdromMount cdrom under /mnt/cdrom directory
  
umount /mnt/hda1Unmout the above

User administration

usersDisplay users currently logged in
adduser usernameCreate a new user called username
passwd usernameDefine password for user called username
whoList logged-in users
whoamiDisplay current user
finger usernameDisplays info about user username
suLog in as root from current login
su -Log in as root from current login and take root's path
exitExit from console login (ie, logout).

Processes 

commandExecute command in the foreground
command &Execute command in the background
ctrl+zSuspend a program
ctrl+cInterrupt a program
psList all processes
kill -9 pidKill process with id pid
topMonitor processes in real time

Networking 

hostnameList the system's hostname
ifconfigSet/Display network information
host ipResolves ip's hostname
ping ip/hostnameCheck if ip/hostname is reachable
traceroute ip/hostnameFind network path to ip/hostname
   

System Information

uname -aGeneral system information
fdisk -lList partition tables
cp filename /path/dir_nameCopy filename into directory /path/dir_name
df -T -hList filesystem disk space usage
lspciList PCI devices
lsusbList USB devices
free -mDisplay RAM+Swap usage

Program Compile

gcc -o output file.cCompile a C program
./outputRun a C program you have compiled
g++ -o output file.cppCompile a C++ program
./outputRun a C++ program you have compiled
./configure && make && su -c 'make install'Configure, compile and install a program with Makefile

List Courtesy: my-guides


Fonte: Here's A List Of 83 Linux Commands For Beginners!

52 C Shell Commands And Their Function!



52 Comandos C Shell  E Suas Funções!

Preparado para testar suas mãos no C Shell? Esses comandos podem vir a calhar!

O C shell (csh), que é a versão melhorada do tcsh, é um shell Unix (na maioria das plataformas), que foi criado por Bill Joy quando ele estava se graduado na Universidade de Berkeley, na Californiain no final do anos 1970. Aprsentando no lançamento do2BSD do sistema Unix BSD, o C shell ganhou popularidade e agora está espalhado e apliado. Então, se você decidiu por suas mãos nesse popular shell para testá-lo, aqui estão 52 comandos e suas funções para lhe ajudar.
Por favor, note que os comandos Shell diferem em uso e em syntax de um tipo de shell para outro e os comandos aqui mencionados são listados para referências gerais. Você pode sempre consultar o comando man para ver como o comando funcionará em um shell em particular.


#Marca um comando.
breakswUtilize isso para quebrar a partir de um comando que transmite o comando executante depois do comando endsw .
fgTraz o serviço (job) para o plano frontal (foreground).
chdirMuda de diretório, o mesmo que cd.
cdMuda de diretório.
niceMuda a prioridade dos comandos que rondas nesse shell.
caseCondicionalmente desempenha um comando.
gotoContinua a execução depois da label especificada.
aliasCria um apelido (alias).
unsetenvRemove variáveis de ambiente.
unsetRemove variáveis do shell.
unhashDesabilita a tabela interna de hash.
hashstatExibe as estatísticas da tabela de hash.
setExibe ou configura o valor de uma variável do shell.
@Exibe ou cria os valores de todas as variáveis do shell.
historyExibe a lista de comandos executados.
dirsExibe lista de diretórios em uma pilha.
timeExibe o tempo utilizado para executar comandos.
evalAvalia um comando.
pushdTroca dois elemenstos da pilha de diretório.
ifExecuta um comando se a condicional coincidir.
execExecuta o comando no shell presente.
while ...endExecuta os comandos repetidamente enquanto não corresponder com a comunicação final.
exitSai do shell.
nohupIgnora o sinal hangup.
jobsLista serviços ativos.
loginentrar no shell.
logoutSair do shell.
notifyNotifica o susuário a respeito de alterações no status do serviço.
popdSalta ao topo do diretório fora da pilha de diretório e altera para o novo directório topo.
rehashRe-caucula a tabela de hash a partir de conteúdos dos diretórios em uma variável shell de caminhos (variável shell path).
sourceLê comandos de um script.
unaliasRemove o apelido do comando.
unlimitRemove limitações do recurso do sistema.
repeatRepete a execução de um comando.
continueResume a próxima iteração de um laço (loop) ou continua depois do laço
breakResume execução depois do laço.
killEnvia um sinal para um processo. term [terminate (suspender)] é o sinal padrão.
bgEnvia i serviço para o plano de fundo (background).
setenvDefine as variáveis de ambiente.
limitDefine ou lista os limites de recurso do sistema.
shiftSobe os argumento do shell.
umaskExibe ou define as permissões de arquivo.
foreachEspecifica um controle da declaração de e executa uma sequênci de comandos até alcançar um comando final.
defaultEspecifica o case padrão em um transição.
switchInicia uma transição.
stopPara um serviço em plano de fundo.
suspendPara um shell presente.
onintrDiz ao shell o que fazer no interrupt.
waitEspera o serviço background finalizar.
globescreve argumentos para a saída padrão do shell, como o comando echo, mas sem a nova linha.
echoescreve um argumento na saída padrão do shell.



Atithya Amaresh, EFY News Network


Fonte:52 C Shell Commands And Their Function!

Siga-nos