Broken Terminal? MAC OSX

Broken? : Yeah sometimes, you might haphazardly configured/changed your environment and that somehow broke you’r terminal

Effects : Commands like ls, cd , bash don’t work

Solution:

1. Open Terminal

2. Type  PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin and press enter

3. Type export PATH   and press enter

Zip in Terminal (Mac/Linux)

Need to Zip Contents Using Terminal?

Why?

1.Because Your are working remotely?

2.May be your Connected to a machine Via SSH or alternative for it

3.You have access to Terminal Only

4.Duh! Just Wanna Know

Here are the steps:

1.Go to the Directory Which has the folder to be zipped (here Directory is Rahul and it has folder called Progs that has to be zipped

2.Use zip -r A B

Where A is the name of the eventually zipped file

B is the Folder to be Zipped

-r is Recursively descent the contents and apply zip (needed)

Screenshot:

Terminal Zip.png



Install OpenSSH on Ubuntu

Want Some Way to access your Linux machine , then you definitely need to install OpenSSH

It:

1.Allows you to execute terminal commands from almost any device (Yes Any device)

2.Copy Files to and Fro!

3.Execute your School/Programs directly on your machine rather than your College 😛

(may be your college systems are Hogging or its just that you got a pretty damn fast system)

4.Forget about using the insecure telnet service!, OpenSSh is Secure!!!

Setting Up:

Step1: Install the Server and Client relevant to OpenSSh , Execute the below Command in your terminal

 sudo apt-get install openssh-client openssh-server

 

Step2: Now You need to get your IP Address 
(if you know skip this) also assume you know the 
username of the system using which you log in :D

 ifconfig 

Note: look for the ip address after "inet addr" 
example 123.123.1.1 and username is rahul

Step3: Now download a client (putty/Terminal) to access your system
 ssh host@ipaddress

example : ssh rahul@123.123.1.1
Note: rahul will be the username of the Target system
in which the OpenSSh server is running and its 
corresponding ip address.

Make sure you enter logout in the terminal
 before you close your session
Happy Playing!

Include Conio.h In Linux – Traditional C Programs

Want to compile programs Using GCC or CC in you’r Linux Machine?

You might face some compilation errors When you include #include<conio.h>

Like:

fatal error: conio.h: No such file or directory compilation terminated.

Solution:

To get the entire working solution in step wise

Like this page and once done the steps appear

Click here to view solution 

CPU Information-Linux

Q:Help I need to find some details regarding my system…How do i do that?  and i use Linux/Ubuntu

Yes..We all come across such situations..here are some commands that you can enter in the Linux Terminal and get what you want.

_______________________________________________________________

1.I Want to know What CPU i have and other details like What flags it has?

Type this:

cat   /proc/cpuinfo

*Note You can use the Flags to see if you have  “lm” i.e long mode,which tells you whether you’r system is capable of handaling 64 bit OS..yeah they are getting popular now…*

_______________________________________________________________

2.Hey Even i want to  know about my Memory

cat  /proc/meminfo


*Click To View Larger Size.

_______________________________________________________________

3.I Want to know Everything about my System..all the hardwares,interfaces..?

lspci

  • If You  are familiar …in certain cases you get large list of items/details, to scroll through them easily,use the pipe symbol.

use     | less to get fewer details ..which u can scroll through

example:  lspci  | less

  • If You Want to search for some term then use | grep  Whatyouwanttofind

example: lspci  grep VGA