To a newbie linux/gnu can be terrifying "What's with all these commands?" - you may ask. Does it feel like going back instead of progressing? Actually, it isn't archaic. It is quite useful at times and definitely more powerful. Oh ! I almost forgot to tell you, today's linux distros have GUI too(and it's good)...
![]() |
| my ubuntu desktop & terminal |
Most of these commands will work in all distros unless specified.
In CC, instructor will ask you to work in Fedora, so forget about the SSH icon you saw in Windows desktop(as was initially taught by Prof. Rao).
In Fedora: Go to Applications -> System tools -> Terminal.
In Ubuntu: Go to Applications -> Accessories -> Terminal.(btw there's a shortcut just press Alt + Ctrl + T, you can also change this shortcut in System -> Preferences -> Keyboard Shortcuts, isn't it cool?)
There you will see some text before a $ or % sign. It's called the command prompt , basically it means the computer is ready to accept commands. Before connecting to the computing server using the ssh command let's learn some basic commands first.
Write pwd after the command prompt and press enter. You'll something like /home/username. pwd stands for print working directory and /home/username is the path of your working directory.
Now enter this command mkdir new_folder . Well ! don't worry if you see nothing because by mkdir command you have instructed the computer to make a new directory by the name new_folder( by the way don't write new folder, cos linux hates a space in a name. If you have to use spaces in a file/folder name use them inside inverted commas like mkdir 'new folder'). Now, the new directory will have the path /home/username/new_folder
To see it enter the command ls , which stands for list. You'll now see among your other files and folders, a folder called new_folder
To make this new_folder your working directory enter cd new_folder
cd stands for change directory. Now try pwd and see what you get.
To come out of this directory use cd .. or cd /home/username
the double dot(..) here stands for the parent directory and a single dot(.) means the working directory(did it ring some bells. Arrey bhai ./a.out, now you know why it's ./)
So, while you were in new_folder your working directory was new_folder and the parent directory was username.
The other commands are mv to move or rename a file, cp to copy a file, rm to remove/delete a file, rmdir to delete a directory.
use them this way
to move a file give the command- mv file (new destination)
suppose you have a file test.c in your username directory that you need to move to temporary, just type mv test.c temporary . Of course you must be in the parent directory of temporary, otherwise you shall have to type mv test.c /home/username/temporary
to rename a file just enter- mv (old file name) (new file name)
eg to rename test.c as renamed.c enter mv test.c renamed.c
to copy use cp the same way as mv
eg: cp renamed.c temporary
it will copy renamed.c to temporary
to delete renamed.c enter- rm renamed.c
to delete a directory enter rmdir (directory name)
eg: rmdir temporary will remove the directory named temporary.
okay, other interesting commands you might like to try on your own:
#1 whoami
#2 ip addr
#3 info
#4 man (a command name) eg man cp
#5 find (filename*)
#6 exit
(only for IITG 2nd sem students)And to connect to computing server just type the command ssh username@202.141.80.3
Alternatively, from your Ubuntu system you can goto Places -> Connect to Server.. change the sevice type to SSH , give the server as 202.141.80.3, port 22, folder /home/cs201/stud/username and then connect
enjoy linux/gnu and if you think I have forgotten something, made a mistake or simply you want to add something of your own...then please comment below...
