-
Notifications
You must be signed in to change notification settings - Fork 124
[Tutorial] Basic Terminal Commands
Yes, the terminal may look like something only a hacker use. However, it is the quintessential element for any GNU/Linux operating system. Here is a short introduction for newcomers to JingOS and GNU/Linux. Happy tinkering!
To start with, there is some nitty-gritty you need to know. A shell is like the nobs on a machine that allows you to interact with the computer. For most GNU/Linux based OSs, Bash is the default shell.
This is a typical command of the Bash shell.
user_name@DEVICE_NAME:~$ <COMMANDS>
In Linux, everything is a file including the ones of the OS. To protect the OS from being damaged, you need to acquire the superuser privilege to access the system files, including installing and uninstalling an app. If you wish to gain superuser privilege, you need to use "sudo". The terminal will prompt you to input the password, which is the one you set the first time you start the device.
For example, if you want to install an app, let's say "gimp", using "apt" package manager, you can input this command
sudo apt-get install gimp
A directory is shown as a "folder". Please note, the label of a directory is case sensitive. Here are some common commands for printing and manipulating the directories.
-
pwd
is to print the current directory. -
ls
is to list the items in a directory (files or subdirectories) -
cd
is to change the directory. -
mkdir
is to create (make) a directory If you are in the 'Home' directory now, and the directory tree is like the following:
./Home
./Home/Desktop
./Home/A_Sub_Dir_in_Desktop
./Home/Download
./Home/User
If you want to print the current directory, you can input pwd
. Now, let's see what will be shown by your Terminal
Input: user_name@DEVICE_NAME:/Home$ pwd
Result: ./Home
Input: user_name@DEVICE_NAME:/Home$ ls
Result: Desktop Download User
Input: user_name@DEVICE_NAME:/Home$ cd Desktop
Result: user_name@DEVICE_NAME:/Home/Desktop$
To change back to the parent directory, use cd ..
(There's a white place between cd and ..)
If you want to create a subdirectory (a folder), say "Music", under the Desktop directory, change the working directory to Desktop, then use mkdir
Input: user_name@DEVICE_NAME:/Home/Desktop$ mkdir Music
To remove the folder "Music", use rm Music -r
Now you have some ideas of how the terminal works. Be careful not to tinker with the system files if you don't know what you are doing. If you still have problems, please join our community Telegram
Read More:
https://matrix.to/#/#jingos:matrix.org
https://mastodon.social/@jingos_official
https://www.youtube.com/c/JingOS-team/videos
- https://t.me/JingOS_Linux
- https://t.me/JingPad
- https://t.me/JingOS_de
- https://t.me/JingOS_Italia
- https://t.me/JingOS_Sp
https://www.facebook.com/JingOSfb