I was recently watching a video that was walking beginners through terminal commands and they listed over 50 commands that you should use. 50!? Who uses more than 10 terminal commands?
The ones that I use (off the top of my head)
1) pwd
The command pwd
stands for "print working directory" which gives your current location in terminal
2) cd
directory
The command cd
stands for "change directory" which allows you to navigate through the terminal.
3) ls
The command ls
will list all the computer files in your current directory.
4) mkdir
folder
The command mkdir
will create a new folder in your current directory.
5) clear
The command clear
will... you guessed it, clear your terminal.
6) 🐈
aka cat
file
The command cat
will return the contents of a file.
If you cat
command a directory it will let you know that as well.
7) touch
file
The command touch
file will create a new file in your current directory.
8) rm
file
The command rm
file will remove the file from your current directory
There are some special options that you can pass into some of these commands but for now, the basics are all that is needed to be a hacker!
Some honorable mentions - these are commands that I use here and there.
-
mv
- move files or rename files -
sudo
- "SuperUser Do", this enables admin/root permissions, only use this if you know what you are doing -
grep
- search for something in a file -
ping
- check your connectivity status to a server. -
echo
- used to move data into a file
Top comments (17)
vim
- to edit anythingsed
- to filter and updateawk
- to manage table dataalias
- to create own command acronymsgit
- to version controllfind
- to search filesmake
- to run tasksxmllint
,xsltproc
,xqilla
,xmlstarlet
- to working with XMLjq
- to working with JSONphp
,python3
,gcc
,clisp
,bc
,octave
... compilers and interpretersvim
,alias
, &git
are ones I use often as well. Can't say the same for the other two (awk
&sed
)They are very useful for working with huge files.
history | grep "search text"
no love for
find
? it's so powerful!I have honestly rarely/never used it 😂
Ive been making a lot of use out of these commands lately: (I'll admit they might not be a frequent use type of command but helpful to know)
The first to check if prcoesses im expecting to run are running. Sometimes combined with a grep to search for a specific part of a command. And then top to see what kinda usage those processes are producing.
👏 Don't use these often, but they do come in handy.
Great article, my favorite
grep -ril 'search_string' ./folder
One of my favorite commands
lsof -nP -i4TCP | grep LISTEN
to see what open connections I have.In order from most- to least-used, the top 20 on one of my machines are ...
mutt
,ps
,ls
,cd
,ssh
,vi
,ping
,find
,host
,grep
,which
,rm
,cat
,nslookup
,man
,history
,whois
,tree
,touch
,mount
, ...... and that's ignoring everything that's used from within any of my own scripts, and only counting the first command on a line, it ignores anything that might follow in a pipeline such as
awk
,sed
,sort
,uniq
,tac
,head
,tail
,cut
, ...... and that also ignores anything used in development (which I generally do on a different machine) such as
git
,cc
,make
,perl
,python
,go
, ...Yeah if I introduce development commands then
git
would be the number 1 command that I use.history 0 | grep "..."
cd, clear, touch, ls, rm they are the most used
Greate summary !
You could also use fasd to replace
cd
and usetail -f <some_file>
when the file is too long forcat
.Interesting command, thanks for the share!
it's very few bro but again it's good that u have shared.