Tips for Windows Users new to Linux

In my real life I'm a Windows programmer writing code in Clarion. Writing code in C on a Linux machine, then "managing" both the Linux development machine and the Linux Fox machine is something of a change for me. There are so many things I do everyday on Windows that I need to re-learn to do on Linux.

 

 

Warning : This stuff is so obvious to a Linux user that it'll make you laugh. But it's precisely this "obvious" stuff which makes moving from Windows to Linux so hard.

 

 

Another warning: I'm running Fedora Core 3 as my Linux development machine, using the bash shell. In true Unix tradition there's no guarentee of any of this working on your machine. Good luck though.

 

This page contains some of the things I've discovered (and I'm hoping readers will tell me more.) You might want to check back here from time to time as I add more.

  Action Linux
1 equivalent of Windows ipconfig command.

ifconfig

Tells you the current IP numbers for the board.

To set the IP number specifically

ifconfig eth0 1.2.3.4

2 setting the password

passwd

Do this from the console to set the root password. Or (if you know the root password already) telnet into the Fox board and then use passwd.

3 tip pressing tab in the terminal editor will auto-complete the file name. So those really long download files can be handled by typing the first few characters and then pressing tab.
4 dir

ls

or

ls -l

that's a small L not a 1

5 how to start a background process

add a & to the command line. For example

./a.out &

then the terminal returns immediately, and your program runs in the background.

6 how to kill a background process

This is a 2 step process. First you need the process ID (PID).

ps

Then kill the pid.

kill -9 1234

Tip : Be careful what you kill... The -9 is always there. The second parameter is the PID.

7 tip

You can start a VNC server on the Linux development maching, then run a VNC client on your Windows machine - (I recommend full-screen mode). So you can develop on Linux, and still have your Windows machine all at the same time. Way cool. (VNC to Linux is very fast - much faster than VNC'ing a Windows box.)

8 documentation

Linux has a command called man that often has documentation about what you're trying to do. Sometimes it's helpful, sometimes it's not. (No surprise there.) try

man ls

9 finding a file

locate filename

This works from a database though (which automatically updates itself at night) so it's somewhat delayed. However very useful if you're trying to find a specific source file in the SDK etc.

10 ending a program Programs like man don't end by pressing ESC. Press Q instead.
11 copying files

cp source destination

Unlike Windows you must enter the destination or the copy will fail.

12 home directory When downloading one of the usual places to put the file is in your home directory. If you are logged in as a user (other than root) your home directory is /home/username.  However if you've logged in as root your home is /root .
13 unzipping a .tar.gz file

use the command

tar -zxvf filename

14 checking cpu,disk & memory usage

use command

top

use P to sort by cpu time, M to sort by memory usage. Q to quit. Also don't miss the very top line that shows memory used and memory free.

another, similar related command is uptime . Note that CPU load for both utilities is not necessarily an accurate measure of anything since there is no idle process.

Another command for getting information about the memory is free.

For details on the disk (ie Flash drive) usage use df or df -h.

15 equivalent of windows SET command

use command

env

to see a list of all current environment variables.


Comments on this HowTo

document revision :

Original version

19 July 2005 : bruce johnson

updates

22 July - added 14 - top & uptime,
             added 15 - env

26 july - update 14 - free & df


FOX Related Links: ACME Systems :: Yahoo Group :: CapeSoft

Search CapeFox.com:  
Powered by Google.