The other day one of my friends who is a Windows user asked me to basic Linux commands because he wanted to improve his IT skills. I helped him out and also decided to put together a brief list of basic Linux commands for newbies while having fantastic Latin America coffee at home.

Basic Linux Files and Navigation Commands

lsList of files/directories in current directory
ls -lFormatted listing
ls -laFormatted listing including hidden files
cd <dir>Change directory to <dir>(<dir> is directory name)
cdGo to your home directory
pwdShow current path
mkdirMake a directory e.g. mkdir holadir
rmRemove a file e.g. rm myfile
rm -rDelete a directory e.g. rm -r mydirectory
cpCopy files e.g. cp myfile yourfile
mvRename files e.g. mv myfile yourfile
Files and Navigation Linux Commands

Networking Basic Linux

pingPing a host
whoisGet whois for a domain
digGet DNS for a domain
wgetDownload a file
wget -r <url>Recursively download files from url
curl <url>Output webpages from url
ssh user@hostConnect to host as user
ssh -p <port> user@hostConnect to host as user using a port
ssh -D user@hostConnect and use bind port
Basic Networking Linux Commands

Viewing Processes Basic Commands

psDisplay current active processes
ps auxDetailed processes output
kill pidKill processes id (pid)
killall <processName>Kill all processes named <processName>
Viewing Processes Linux Commands

Basic Linux System Information

dateShow current date/time
uptimeShow system uptime
whoamiShow who you’re logged in as
wDisplay who is online
du -shDisplays readable space in GB
dfShow disk usage
uname -rShow kernel version
Viewing Linux System Information

Basic Linux Permissions Commands

chmod <octal file>Change permissions of file
chmod 777rwx for everybody
chmod 755rwx for owner, rx for group and world
Basic Linux Permissions table

Contact me if you’re confused about anything that I wrote here. Cheers.

Leave a comment

Your email address will not be published. Required fields are marked *