728x90
Basic Linux Commands
change directory
cd path
List command
ls [parameters]
-l : detailed listing view (e.g. owner, date, permission)
-a : include hidden files
move
mv original_filepath target_filepath
copy
cp original_filepath target_filepath
sudo
sudo "Linux command"
pwd
pwd (current location)
mkdir
mkdir new_folder_name
// making new directory
touch
touch new_file_name
shutdown
shutdown
//reboot or shut down linux system
passwd
// change the password for a user
passwd
// change another user's password
sudo passwd username
ps
ps
-A : print all processes
-f : show in full format (UID, PID, etc.)
// process status is used to provide information about the currently running processes, including their process identification numbers
grep
grep "text" [file]
// linux command to search text and string in a given file
Ex. grep printf filename // search for a string in the target file
Ex. grep printf filename* // search for a string in all files in the current directory
kill
kill PID
// terminate a process from the command line
apt
apt options
// apt works Ubuntu's Advanced Packaging Tool (APT)
Ex. options
update
upgrade
install "something"
remove "something"
ssh
ssh user_account@server_domain or IP_address
// make a connection to a remote Linux computer and log into user account
tar
tar -options file_path
Ex. options
-cvf : when compressing
-xvf : when extracting
top
top
// top is used to show the Linux processes
// It provides a dynamic real-time view of the running system
uname
uname
-a : see everything
-r : see the kernel release
// computer program in Unix and Unix-like computer operating systems that prints the name, version, and other details about the current machine and the operating system running on it.
history
history
// lists the commands you have previously issued on the command line
less
less file_path
// like vi
// view files without operating an editor
man
man [linux_command]
Ex. man ps
Ex. man top
// displays the manual pages for a command
ctags
sudo apt install ctags
ctags -R
// a programming tool that generates an index (or tag) file of names found in source and header files
cscope
sudo apt install cscope
cscope
// a programming tool used on very large projects to find source code, functions, declarations, definitions and regular expressions
728x90
'School Lecture Study > Linux System Application Design' 카테고리의 다른 글
6-1. Synchronization (1) (0) | 2022.12.20 |
---|---|
5. Process and Thread (0) | 2022.12.20 |
4-2. Kernel module (1) | 2022.12.19 |
4-1. Design Principle of Linux Kernel (0) | 2022.12.19 |
3-2. System calls (0) | 2022.12.19 |