[TUT] Using The Terminal
If you need help configuring, installing or using anything Linux please post in here.
1 post
Page 1 of 1
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)
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...
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
To add a folder you'd use...
cd Desktop
Code: Select all
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)
mkdir name-of-folder
Code: Select all
or instead of moving the file, say you wanna copy the file into that directory...
mv jquery.js js
Code: Select all
To remove/delete a file you'd use...
cp name-of-file.js name-of-folder
Code: Select all
To remove/delete a directory you'd use...
rm name-of-file.js
Code: Select all
Now in some cases you may need to become a root user, and that's simple.
rmdir name-of-folder
Code: Select all
To exit being a root user simply type...
sudo -s
Code: Select all
To open up a program simply type the program.
exit
Code: Select all
If it's not installed you may haft to run it using ./whatever.py, or ./whatever.gimp
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
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.
chmod +x name-of-file
Code: Select all
Installing, and uninstalling software using the terminal is pretty easy too, but I'll leave that for another tutorial.chmod -x snake.py spaceinvaders.py breaker.py
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023