ls
: Lists directories in the current directory.Example:
ls -l
lists details of files and directories.cd
: Changes the current directory.Example:
cd /path/to/directory
.pwd
: Prints the current directory.Example:
pwd
.cat
: Displays the content of a file.Example:
cat filename
.echo
: Outputs the strings it is being passed as arguments.Example:
echo "Hello, World!"
.touch
: Creates a new empty file.Example:
touch filename
.rm
: Removes files.Example:
rm filename
.cp
: Copies files and directories.Example:
cp source destination
.mv
: Moves or renames files.Example:
mv old_filename new_filename
.mkdir
: Creates a new directory.Example:
mkdir directoryname
.rmdir
: Removes an empty directory.Example:
.rmdir directoryname
find
: Searches for files in a directory hierarchy.Example:
find . -name "*.txt"
.grep
: Searches the given input files for lines containing a match to the given patterns.Example:
grep "pattern" filename
.head
: Outputs the first part of files.Example:
head filename
.tail
: Outputs the last part of files.Example:
tail filename
.cut
: Removes sections from each line of files.Example:
cut -c 1-10 filename
.sort
: Sorts lines in text files.Example:
sort filename
.uniq
: Filters out repeated lines from sorted files.Example:
uniq filename
.diff
: Compares files line by line.Example:
diff file1 file2
.cmp
: Compares two files byte by byte.Example:
cmp file1 file2
.ln
: Creates links between files.Example:
ln -s target linkname
.tar
: Archives files.Example: tar cvf archive.tar directoryname.
gzip
: Compresses files.Example: gzip filename.
gunzip
: Decompresses files.
Example:
gunzip filename.gz.
man
: Provides manual pages for commands.Example: man ls.
uname
: Prints system information.Example: uname -a.
whoami
: Prints effective userid.Example: whoami.
date
: Displays or sets the system date and time.Example: date.
df
: Reports disk space usage.Example: df -h.
du
: Estimates file and directory space usage.Example: du -sh directoryname.
ping
: Tests network connectivity.Example: ping www.google.com.
netstat
: Displays network connections.Example: netstat.
route
: Shows or modifies kernel routing tables.Example: route -n.
wget
: Downloads files from the internet.Example: wget http://example.com.
curl
: Transfers data to or from a server.Example: curl http://example.com.
ssh
: Secure shell login to remote servers.Example: ssh username@hostname.
scp
: Secure copy files to and from remote hosts.Example: scp file username@hostname:/path.
vi
: A text editor.
Example:vi filename
.nano
: A simple text editor.
Example:nano filename
.top
: Displays dynamic real-time view of a running system.
Example:top
.ps
: Reports a snapshot of the current processes.
Example:ps -ef
.kill
: Sends signals to processes.
Example:kill -9 pid
.killall
: Sends signals to all instances of a particular process.
Example:killall processname
.traceroute
: Traces and displays the route that a packet takes to reach a network host.
Example:traceroute www.google.com
.ifconfig
: Configures network interface parameters.Example: ifconfig.
ufw
: Uncomplicated Firewall.Example: ufw enable.
iptables
: User-space utility program that allows a system administrator to configure the IP packet filter rules of the Linux kernel firewall.Example: iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT.
apt
: Advanced package management command line tool.Example: apt update && apt upgrade.
pacman
: Package management utility in Arch Linux.Example: pacman -Syu.
yum
: Yellowdog Updater Modified, a package manager for RPM-based Linux distributions.Example: yum update.
Subscribe
Login
0 Comments