# Computer: Basic Commands
# pwd
return current directory
pwd
1
# ls
list all file and directory in current directory
ls
1
# cd
Changes Directory
- ./ => refer to current directory
- ../ => refer to previous directory
pwd
1
output
/.../
1
ls
1
output
code.py text_file.txt folder-1 folder-2
1
cd ./folder-1
pwd
1
2
2
output
/.../folder-1
1
cd ../
pwd
1
2
2
output
/.../
1
# cat
shows content of file
ls
1
output
code.py text_file.txt folder-1 folder-2
1
cat ./code.py
1
output
print("HelloWorld")
1
# Running Python Script with command line
ls
1
output
code.py text_file.txt folder-1 folder-2
1
cat ./code.py
1
output
print("HelloWorld")
1
# Runs the Python Script
python3.10 main.py
1
output
HelloWorld
1