2. 2
Linux
“Linux is a family of open
source Unix-like operating
systems based on
the Linux kernel”
-- Wikipedia
https://www.linuxtrainingacademy.com/linux-
directory-structure-and-file-system-hierarchy/
Slide by Hao-Chun Chang
Current directory: ”.”
Parent directory: “..”
Auto-complete: Tab
You are usually here
ubuntu fedora debian CentOS Arch
If current is
here
This is parent directory
What you see in terminal
3. Basic bash commands
3
Remove files:
rm <filename>
Word count a file:
wc <filename>
Print the beginning or ending of a file:
head <filename> / tail <filename>
Monitor processes:
ps, jobs, top
Kill processes:
kill <process id, PID> or Ctrl+C
Read manual of commands:
man <command>
List file:
ls <folder name>
Move file:
mv <source> <destination>
Copy files:
cp <source> <destination>
Change directory (folders):
cd <destination>
Make new directory:
mkdir <new directory name>
https://courses.cs.washington.edu/courses/cse391/17sp/bash.html
Slide by Hao-Chun Chang
WARNING !!
There is no recycle bin!
5. 5
File permission
Each account is a user.
Each file has permission.
And you can change it.
Ref: 鳥哥的私房菜-第四課
http://linux.vbird.org/linux_basic_train
Slide by Hao-Chun Chang
permission user/owner group size 最後修改日期
rwx r-x r-x
others
root user
sudo group:
Have access to the whole system
Group can have many users Users can belong to many groups
docker
group
haochunchang
group
r = readable
w = writeable
x = executable
sudo # as root user
chmod u=rwx,g+w,o-r Desktop/