As already described in About section , One-Stop-Linux π§ will be a one stop resource which can help you get a walkthrough of basic Linux Commands π¨βπ», whether you are noob or experienced this resource would definitely help you get on the track ποΈββοΈ
Command | What it does |
---|---|
ls |
directory listing ( list all files / folders on current dir ) |
ls -l |
formatted listing |
ls -la |
formatted listing including hidden files |
cd dir |
change directory to dir ( dir will be directory name ) |
cd .. |
change to parent directory |
cd ../dir |
change to dir in parent directory |
cd |
change to home directory |
pwd |
show current directory |
mkdir dir |
create a directory dir |
rm file |
delete file |
rm -f dir |
force remove file |
rm -r dir |
delete directory dir |
rm -rf dir |
remove directory dir |
rm -rf / |
launch some neuclear bombs targetting your system |
cp file1 file2 |
copy file1 to file2 |
mv file1 file2 |
rename file1 to file2 |
mv file1 dir/file2 |
move file1 to dir as file2 |
touch file |
create or update file |
cat file |
output contents of file |
cat > file |
write standard input into file |
cat >> file |
append standard input into file |
tail -f file |
output contents of file as it grows |
Command | What it does |
---|---|
ping host |
ping host |
whois domain |
get whois for domain |
dig domain |
get DNS for domain |
dig -x host |
reserve lookup host |
wget file |
download file |
wget -c file |
continue stopped download |
wget -r url |
recursively download files from url |
curl url |
outputs the webpage from url |
curl -o meh.html url |
writes the page to meh.html |
ssh user@host |
connect to host as user |
ssh -p port user@host |
connect using port |
ssh -D user@host |
connect & use bind part |
Command | What it does |
---|---|
ps |
display currently active processes |
ps aux |
detailed outputs |
kill pid |
kill process with process id ( pid ) |
killall proc |
kill all processes named proc |
Command | What it does |
---|---|
date |
show current date / time |
uptime |
show uptime |
whoami |
who you're logged in as |
w |
display who is online |
cat/proc/cpuinfo |
display cpu info |
cat/proc/meminfo |
memory info |
free |
show memory and swap usage |
du |
show directory space usage |
du-sh |
displays readable sizes in GB |
df |
show disk usage |
unname -a |
show karnel config |
Command | What it does |
---|---|
tar cf file.tar files |
tar files into file.tar |
tar xf file.tar |
untar into current directory |
tar tf file.tar |
show contents of archive |
c - create archive
r - table of contents
x - extract
z - use zip / gzip
f - specify filename
j - bzip2 compression
w - ask for confirmation
k - do not overwrite
T - files from files
v - verbose
Command | What it does |
---|---|
chmod octal file |
change permissions of file |
4 - read ( r )
2 - write ( w )
1 - execute ( x )
order: owner/group/world
chmod 777 - rwx for everyone
chmod 755 - rw for owner , rx for group world
Command | What it does |
---|---|
grep pattern files |
search in files for pattern |
grep -r pattern dir |
search for pattern recursively in dir |
locate file |
find all instances of file |
whereis app |
show possible locations of app |
man command |
show manual page for command |