[TUT] Using The Terminal

If you need help configuring, installing or using anything Linux please post in here.
1 post Page 1 of 1
Contributors
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

[TUT] Using The Terminal
mikethedj4
If you're new to Linux one thing you're gonna use quite often is the terminal. It makes the process of doing everything incredibly faster. Not to mention in some cases you'll need root access to add a file/folder say in /usr/share for example.

So today we're just gonna go over the basics of using the terminal. (NOTE: Some of these commands will vary upon distro to distro)

First off to navigate from directory to directory (or folder to folder) you'd use the cd command. In most distros your default folder is your home folder, but if you're not sure just use the ls command to see what files are in it's current directory and you should be good.

So if I wanna navigate to my desktop I'd use. (Yes capitalization matters)
Code: Select all
cd Desktop
To add a folder you'd use...
Code: Select all
mkdir name-of-folder
To move a file to the folder you've created you'd use the following command... (js is the name of my folder, and I'm moving the jquery.js file into that folder)
Code: Select all
mv jquery.js js
or instead of moving the file, say you wanna copy the file into that directory...
Code: Select all
cp name-of-file.js name-of-folder
To remove/delete a file you'd use...
Code: Select all
rm name-of-file.js
To remove/delete a directory you'd use...
Code: Select all
rmdir name-of-folder
Now in some cases you may need to become a root user, and that's simple.
Code: Select all
sudo -s
To exit being a root user simply type...
Code: Select all
exit
To open up a program simply type the program.
Code: Select all
gimp
If it's not installed you may haft to run it using ./whatever.py, or ./whatever.

However some cases a program maynot be set as an executable, which could end up not launching the app, or you'll get prompted to make it an executable, and doing this is simple...
Code: Select all
chmod +x name-of-file
NOTE: If it has a file type like .py for example make sure you include that, and if you ever want to make it to the app is no longer an executable just change the + to -. Here's a prime example, where I'm doing it to multiple files.
Code: Select all
chmod -x snake.py spaceinvaders.py breaker.py
Installing, and uninstalling software using the terminal is pretty easy too, but I'll leave that for another tutorial.
1 post Page 1 of 1
Return to “Help & Support”