unix commands you should know
what directory am i currently in?
>$ pwd
list all files in your current directory
>$ ls
list all files in your current directory plus more info
>$ ls -l
make a new directory called dir1
>$ mkdir dir1
move into a directory call dir1
>$ cd dir1
back out of a directory
>$ cd ..
delete an emtpy directory dir1
>$ rmdir dir1
delete a single file file1.txt (or any other)
>$ rm file1.txt
copy file1.txt to a new file called file2.txt
>$ cp file1.txt file2.txt
rename (or move) a file.txt to hello.txt
>$ mv file.txt hello.txt
text editors used to edit your file hello.txt (or any other file)
>$ pico hello.txt
>$ nano hello.txt
>$ vi hello.txt
>$ emacs hello.txt
compile a c program in hello.c
>$ gcc hello.c
compile a c++ program in hello.cpp
>$ g++ hello.cpp
execute a c/c++ program a.out
>$ ./a.out
compile a java program hello.java
>$ javac hello.java
execute a java program hello.class
>$ java hello
back to linux home