I have found myself in the GUTL Wiki this complete list with more than 400 commands for GNU / Linux with their respective explanation, and I want to share them with you to complement this excellent article that my colleague wrote to learn how to live with the console.
System information
-
arch: show the architecture of the machine (1).
-
join me -m: show the architecture of the machine (2).
-
uname -r: show the version of the kernel used.
-
dmidecode -q: show the components (hardware) of the system.
-
hdparm -i / dev / hda: show the characteristics of a hard disk.
-
hdparm -tT / dev / sda: perform read test on a hard disk.
-
cat / proc / cpuinfo: show CPU information.
-
cat / proc / interrupts: show interruptions.
-
cat / proc / meminfo: check memory usage.
-
cat / proc / swaps: show swap files.
-
cat / proc / version: show the kernel version.
-
cat / proc / net / dev: show network adapters and statistics.
-
cat / proc / mounts: show mounted filesystem.
-
lspci-tv: show PCI devices.
-
lsusb -tv: show USB devices.
-
data: show the system date.
-
2011 cal: show the 2011 almanac.
-
07 cal 2011: show the almanac for the month July 2011.
-
dates 041217002011.00: set (declare, set) date and time.
-
clock-w: save date changes in BIOS.
Shutdown (Reboot System or Log Out)
-
shutdown-h now: turn off the system (1).
-
init 0: turn off the system (2).
-
telinit 0: turn off the system (3).
-
halt: turn off the system (4).
-
shutdown -h hours: minutes &- Planned system shutdown.
-
shutdown -c- Cancel a scheduled system shutdown.
-
shutdown -r now: restart (1).
-
reboot: restart (2).
-
logout: Sign off.
Files and Directories
-
cd / home: enter the "home" directory.
-
Cd ..: go back one level.
-
cd ../ ..: go back 2 levels.
-
CD: go to root directory.
-
cd ~ user1: go to the user1 directory.
-
cd -: go (return) to the previous directory.
-
pwd: show the path of the working directory.
-
ls: view the files in a directory.
-
ls -F: view the files in a directory.
-
Ls -l: show the details of files and folders in a directory.
-
ls -a: show hidden files.
-
ls * [0-9]*: show files and folders containing numbers.
-
tree: show files and folders as a tree starting from the root. (1)
-
lstree: show files and folders as a tree starting from the root. (2)
-
mkdir dir1: create a folder or directory named 'dir1'.
-
mkdir dir1 dir2: create two folders or directories simultaneously (Create two directories at the same time).
-
mkdir -p / tmp / dir1 / dir2: create a directory tree.
-
rm -f file1: delete the file named 'file1'.
-
rmdir dir1: delete the folder named 'dir1'.
-
rm -rf dir1: delete a folder named 'dir1' with its contents recursively. (If I delete it recursively I am saying that it is with its content).
-
rm -rf dir1 dir2: delete two folders (directories) with their content recursively.
-
mv dir1 new_dir: rename or move a file or folder (directory).
-
zip file1: copy a file.
-
cp file1 file2: copy two files in unison.
-
cp dir / *.: copy all files from a directory into the current working directory.
-
cp -a / tmp / dir1.: copy a directory within the current working directory.
-
cp -a dir1: copy a directory.
-
cp -a dir1 dir2: copy two directories in unison.
-
ln -s file1 LNK1: create a symbolic link to the file or directory.
-
ln file1 lnk1: create a physical link to the file or directory.
-
touch -t 0712250000 file1: modify the real time (creation time) of a file or directory.
-
file file1: output (dump on screen) of the mime type of a text file.
-
iconv -l: lists of known ciphers.
-
iconv -f fromEncoding -t toEncoding inputFile> outputFile: create a new form of the input file assuming it is encoded in fromEncoding and converting it to ToEncoding.
-
find. -maxdepth 1 -name * .jpg -print -exec convert ”{}” -resize 80 × 60 “thumbs / {}” \;: group resized files in the current directory and send them to directories in thumbnail views (requires converting from ImagemagicK).
Find files
-
find / -name file1: search for file and directory starting from the root of the system.
-
find / -user user1: search for files and directories belonging to user 'user1'.
-
find / home / user1 -name \ *. bin: search for files with extension '. bin 'inside the directory' / home / user1 '.
-
find / usr / bin -type f -atime +100: find binary files not used in the last 100 days.
-
find / usr / bin -type f -mtime -10: search for files created or changed within the last 10 days.
-
find / -name \ *. rpm -exec chmod 755 '{}' \;: search for files with '.rpm' extension and modify permissions.
-
find / -xdev -name \ *. rpm: Search for files with '.rpm' extension ignoring removable devices such as cdrom, pen-drive, etc. ...
-
locate \ *. ps: find files with extension '.ps' first executed with command 'updatedb'.
-
where's halt: show the location of a binary, help or source file. In this case it asks where the 'halt' command is.
-
which stops: show the full path (the entire path) to a binary / executable.
Mounting a filesystem
-
mount / dev / hda2 / mnt / hda2: mount a disk named hda2. Check first the existence of the directory '/ mnt / hda2'; if it is not, you must create it.
-
umount / dev / hda2: unmount a disk named hda2. First exit from point '/ mnt / hda2.
-
fuser -km / mnt / hda2- Force unmount when device is busy.
-
umount -n / mnt / hda2: run the unmount without reading the / etc / mtab. Useful when the file is read-only or the hard drive is full.
-
mount / dev / fd0 / mnt / floppy: mount a floppy disk.
-
mount / dev / cdrom / mnt / cdrom: mount a cdrom / dvdrom.
-
mount / dev / hdc / mnt / cdrecorder: mount a rewritable cd or dvdrom.
-
mount / dev / hdb / mnt / cdrecorder: mount a rewritable cd / dvdrom (a dvd).
-
mount -o loop file.iso / mnt / cdrom: mount a file or iso image.
-
mount -t vfat / dev / hda5 / mnt / hda5: mount a FAT32 filesystem.
-
mount / dev / sda1 / mnt / usbdisk: mount a usb pen-drive or memory (without specifying the type of filesystem).
Related article:
4 commands to know data from our HDD or partitions
Disk space
-
df -h: display a list of mounted partitions.
-
ls -lSr | more: show the size of the files and directories ordered by size.
-
du -sh dir1: Estimate the space used by the directory 'dir1'.
-
du sk * | sort -rn: show the size of the files and directories ordered by size.
-
rpm -q -a –qf '% 10 {SIZE} t% {NAME} n' | sort -k1,1n: show the space used by the installed rpm packages organized by size (Fedora, Redhat and others).
-
dpkg-query -W -f = '$ {Installed-Size; 10} t $ {Package} n' | sort -k1,1n: show the space used by installed packages, organized by size (Ubuntu, Debian and others).
Users and Groups
-
groupadd group_name: create a new group.
-
groupdel group_name: delete a group.
-
groupmod -n new_group_name old_group_name: rename a group.
-
useradd -c “Name Surname” -g admin -d / home / user1 -s / bin / bash user1: Create a new user belonging to the group "admin".
-
user add user1: create a new user.
-
userdel -r user1: delete a user ('-r' removes the Home directory).
-
usermod -c "User FTP”-G system -d / ftp / user1 -s / bin / nologin user1: change user attributes.
-
Passwd: change Password.
-
password user1: change a user's password (root only).
-
change -E 2011-12-31 user1: set a term for the user's password. In this case it says that the key expires on December 31, 2011.
-
pwck: check the correct syntax the file format of '/ etc / passwd' and the existence of users.
-
grpck: check the correct syntax and format of the file '/ etc / group' and the existence of groups.
-
newgrp group_name: Register a new group to change the default group of newly created files.
Permissions in Files (Use "+" to place permissions and "-" to remove)
-
ls -lh: Show permissions.
-
ls / tmp | pr -T5 -W $ COLUMNS: divide the terminal into 5 columns.
-
chmod ugo + rwx directory1: place read ®, write (w) and execute (x) permissions to owner (u), group (g) and others (o) on directory 'directory1'.
-
chmod go-rwx directory1: remove read permission ®, write (w) and (x) execute to group (g) and others (o) on directory 'directory1'.
-
chown user1 file1: change the owner of a file.
-
chown -R user1 directory1: change the owner of a directory and of all files and directories contained within.
-
chgrp group1 file1: change group of files.
-
chown user1: group1 file1: change user and group that owns a file.
-
find / -perm -u + s: view all files on the system with SUID configured.
-
chmod u + s / bin / file1: put the SUID bit in a binary file. The user running that file acquires the same privileges as the owner.
-
chmod us / bin / file1: disable the SUID bit in a binary file.
-
chmod g + s / home / public: put an SGID bit in a directory –similar to SUID but per directory.
-
chmod gs / home / public: disable an SGID bit in a directory.
-
chmod o + t / home / public: put a STIKY bit in a directory. Allows file deletion only to legitimate owners.
-
chmod ot / home / public: disable a STIKY bit in a directory.
Special attributes in files (Use "+" to set permissions and "-" to remove)
-
chattr + to file1: allows writing by opening a file only append mode.
-
chattr + c file1: allows a file to be compressed / decompressed automatically.
-
chattr + d file1: ensures that the program ignores deleting files during backup.
-
chattr + i file1: makes the file invariable, so it cannot be deleted, altered, renamed, or linked.
-
chattr + s file1: allows a file to be safely deleted.
-
chattr + S file1: ensures that a file is modified, changes are written in synchronous mode as with sync.
-
chattr + u file1: allows you to recover the content of a file even if it is canceled.
-
lsattr: show special attributes.
Related article:
With Terminal: Size and Space Commands
Archives and compressed files
-
bunzip2 file1.bz2: unzip a file named 'file1.bz2'.
-
bzip2 file1: compress a file named 'file1'.
-
Gunzip File1.gz: unzip a file called 'file1.gz'.
-
gzip file1: compress a file named 'file1'.
-
gzip -9 file1: compresses with maximum compression.
-
rar to file1.rar test_file: create a rar file called 'file1.rar'.
-
rar to file1.rar file1 file2 dir1: compress 'file1', 'file2' and 'dir1' simultaneously.
-
rar x file1.rar: unzip rar file.
-
UNRAR X FILE1.RAR: unzip rar file.
-
tar -cvf archive.tar file1: create an unzipped tarball.
-
tar -cvf archive.tar file1 file2 dir1: create a file containing 'file1', 'file2' and 'dir1'.
-
tar tf archive.tar: display the contents of a file.
-
tar -xvf archive.tar: extract a tarball.
-
tar -xvf archive.tar -C / tmp: extract a tarball in / tmp.
-
tar -cvfj archive.tar.bz2 dir1: create a compressed tarball inside bzip2.
-
-xvfj tar archive.tar.bz2: decompress a tar archive compressed in bzip2
-
tar -cvfz archive.tar.gz dir1: create a gzipped tarball.
-
tar -xvfz archive.tar.gz- Unzip a gzipped tar archive.
-
zip file1.zip file1: create a compressed zip file.
-
zip -r file1.zip file1 file2 dir1: compress, in zip, several files and directories simultaneously.
-
unzip file1.zip: unzip a zip file.
RPM packages (Red Hat, Fedora, and the like)
-
rpm ivh package.rpm: install an rpm package.
-
rpm -ivh –nodeeps package.rpm: install an rpm package ignoring dependency requests.
-
rpm -U package.rpm: update a rpm package without changing the configuration of the files.
-
rpm -F package.rpm: update an rpm package only if it is installed.
-
rpm -e package_name.rpm: remove a rpm package.
-
rpm -qa: show all rpm packages installed on the system.
-
rpm -qa | grep httpd: show all rpm packages with the name "httpd".
-
rpm -qi package_name- Get information on a specific installed package.
-
rpm -qg "System Environment / Daemons": show rpm packages of a software group.
-
rpm -ql package_name: show list of files given by an installed rpm package.
-
rpm -qc package_name: show configuration list of files given by an installed rpm package.
-
rpm -q package_name --whatrequires: show requested list of dependencies for an rpm package.
-
rpm -q package_name -whatprovides: show the capacity given by an rpm package.
-
rpm -q package_name --scripts: show scripts started during installation / removal.
-
rpm -q package_name --changelog: show the revision history of an rpm package.
-
rpm -qf /etc/httpd/conf/httpd.conf: check which rpm package belongs to a given file.
-
rpm -qp package.rpm -l: show list of files given by a rpm package that has not yet been installed.
-
rpm –import / media / cdrom / RPM-GPG-KEY: import the digital signature of the public key.
-
rpm –checksig package.rpm: verify the integrity of an rpm package.
-
RPM -QA GPG -Pubkey- Check the integrity of all installed rpm packages.
-
rpm -V package_name: check file size, licenses, types, owner, group, MD5 summary check and last modification.
-
rpm -Va: check all rpm packages installed on the system. Use with care.
-
Vp rpm package.rpm: check an rpm package not installed yet.
-
rpm2cpio package.rpm | cpio –extract –make-directories * bin*: extract executable file from rpm package.
-
rpm -ivh /usr/src/redhat/RPMS/`arch`/package.rpm: install a package built from an rpm source.
-
rpmbuild –rebuild package_name.src.rpm: build a rpm package from a rpm source.
YUM Package Updater (Red Hat, Fedora and the like)
-
yum install package_name: download and install an rpm package.
-
yum localinstall package_name.rpm: this will install an RPM and try to resolve all dependencies for you, using your repositories.
-
yum update package_name.rpm: update all rpm packages installed on the system.
-
yum update package_name: modernize / update an rpm package.
-
yum remove package_name: remove a rpm package.
-
yum list: list all packages installed on the system.
-
yum search package_name: Find a package in rpm repository.
-
yum clean packages: clear an rpm cache by deleting downloaded packages.
-
yum clean headers: remove all header files that the system uses to resolve the dependency.
-
yum clean all: remove from cache packets and header files.
Deb packages (Debian, Ubuntu and derivatives)
-
dpkg -i package.deb: install / update a deb package.
-
dpkg -r package_name: remove a deb package from the system.
-
dpkg -l: show all deb packages installed on the system.
-
dpkg -l | grep httpd: show all deb packages with the name "httpd"
-
dpkg -s package_name- Get information on a specific package installed on the system.
-
dpkg -L package_name: show list of files given by a package installed on the system.
-
dpkg -contents package.deb: show list of files given by a package not installed yet.
-
dpkg -S / bin / ping: check which package belongs to a given file.
APT Package Updater (Debian, Ubuntu and derivatives)
-
apt-get install package_name: install / update a deb package.
-
apt-cdrom install package_name: install / update a deb package from a cdrom.
-
apt-get update: update package list.
-
apt-get upgrade: update all installed packages.
-
apt-get remove package_name: remove a deb package from the system.
-
apt get check: verify the correct resolution of the dependencies.
-
apt-get clean: clear cache from downloaded packages.
-
apt-cache search searched-package: returns a list of packages corresponding to the series "searched packages".
View the content of a file
-
cat file1: view the contents of a file starting from the first row.
-
tock file1: view the contents of a file starting from the last line.
-
more file1: view the content throughout a file.
-
less file1: similar to the 'more' command but allows saving the movement in the file as well as the movement backwards.
-
head -2 file1: see the first two lines of a file.
-
tail -2 file1: see the last two lines of a file.
-
tail -f / var / log / messages: see in real time what has been added to the file.
Text manipulation
-
cat file1 file2 .. | command <> file1_in.txt_or_file1_out.txt- General syntax for manipulating text using PIPE, STDIN, and STDOUT.
-
cat file1 | command (sed, grep, awk, grep, etc ...)> result.txt: general syntax to manipulate a text in a file and write the result in a new file.
-
cat file1 | command (sed, grep, awk, grep, etc ...) »result.txt: general syntax to manipulate a text in a file and add results to an existing file.
-
grep Aug / var / log / messages: search for words “Aug” in the file '/ var / log / messages'.
-
grep ^ Aug / var / log / messages: find words starting with “Aug” in file '/ var / log / messages'
-
grep [0-9] / var / log / messages: select all lines in the file '/ var / log / messages' that contain numbers.
-
grep Aug -R / var / log /*: look for the string “Aug” in the directory '/ var / log' and below.
-
sed 's / stringa1 / stringa2 / g' example.txt: relocate "string1" with "string2" in example.txt
-
sed '/ ^ $ / d' example.txt: remove all blank lines from example.txt
-
sed '/ * # / d; / ^ $ / d 'example.txt: remove comments and blank lines from example.txt
-
echo 'esempio' | tr '[: lower:]' '[: upper:]': convert lowercase to uppercase.
-
sed -e '1d' result.txt: remove the first line of the file example.txt
-
sed -n '/ stringa1 / p': display only the lines that contain the word "string1".
Set character and file conversion
-
dos2unix filesos.txt fileunix.txt: convert a text file format from MSDOS to UNIX.
-
unix2dos fileunix.txt files.txt: convert a text file format from UNIX to MSDOS.
-
recode..HTML <page.txt> page.html: convert a text file into html.
-
recode -l | more- Show all available format conversions.
File system analysis
-
badblocks -v / dev / hda1: Check bad blocks on disk hda1.
-
fsck / dev / hda1: repair / check the integrity of the Linux system file on disk hda1.
-
fsck.ext2 / dev / hda1: repair / check integrity of ext 2 system file on disk hda1.
-
e2fsck / dev / hda1: repair / check integrity of ext 2 system file on disk hda1.
-
e2fsck -j / dev / hda1: repair / check integrity of ext 3 system file on disk hda1.
-
fsck.ext3 / dev / hda1: repair / check integrity of ext 3 system file on disk hda1.
-
fsck.vfat / dev / hda1: repair / check the integrity of the fat system file on disk hda1.
-
fsck.msdos / dev / hda1: repair / check the integrity of a file on system dos on disk hda1.
-
dosfsck / dev / hda1: repair / check the integrity of a file on system dos on disk hda1.
Format a filesystem
-
mkfs / dev / hda1: create a Linux-like system file on partition hda1.
-
mke2fs / dev / hda1: create a Linux ext 2 system file on hda1.
-
mke2fs -j / dev / hda1: create a Linux ext3 (periodic) system file on partition hda1.
-
mkfs -t vfat 32 -F / dev / hda1: create a FAT32 system file on hda1.
-
fdformat -n / dev / fd0: format a flooply disk.
-
mkswap / dev / hda3: create a swap system file.
I work with the SWAP
-
mkswap / dev / hda3: create swap system file.
-
swapon / dev / hda3: activating a new swap partition.
-
swapon / dev / hda2 / dev / hdb3: activate two swap partitions.
Saves (Backup)
-
dump -0aj -f /tmp/home0.bak / home: make a full save of the '/ home' directory.
-
dump -1aj -f /tmp/home0.bak / home: make an incremental save of the '/ home' directory.
-
restore -if /tmp/home0.bak: restoring a salvo interactively.
-
rsync -rogpav –delete / home / tmp: synchronization between directories.
-
rsync -rogpav -e ssh –delete / home ip_address: / tmp: rsync through tunnel SSH.
-
rsync -az -e ssh –delete ip_addr: / home / public / home / local- Synchronize a local directory with a remote directory via ssh and compression.
-
rsync -az -e ssh –delete / home / local ip_addr: / home / public- Synchronize a remote directory with a local directory via ssh and compression.
-
dd bs = 1M if = / dev / hda | gzip | ssh user @ ip_addr 'dd of = hda.gz': save a hard drive on a remote host via ssh.
-
dd if = / dev / sda of = / tmp / file1: save the contents of a hard disk to a file. (In this case the hard disk is "sda" and the file is "file1").
-
tar -Puf backup.tar / home / user: make an incremental save of the directory '/ home / user'.
-
(cd / tmp / local / && tar c.) | ssh -C user @ ip_addr 'cd / home / share / && tar x -p': copy the contents of a directory to a remote directory via ssh.
-
(tar c / home) | ssh -C user @ ip_addr 'cd / home / backup-home && tar x -p': copy a local directory to a remote directory via ssh.
-
tar cf -. | (cd / tmp / backup; tar xf -): local copy preserving licenses and links from one directory to another.
-
find / home / user1 -name '* .txt' | xargs cp -av –target-directory = / home / backup / –parents: find and copy all files with extension '.txt' from one directory to another.
-
find / var / log -name '* .log' | tar cv –files-from = - | bzip2> log.tar.bz2: find all files with the extension '.log' and make a bzip archive.
-
dd if = / dev / hda of = / dev / fd0 bs = 512 count = 1: make a copy of the MRB (Master Boot Record) to a floppy disk.
-
dd if = / dev / fd0 of = / dev / hda bs = 512 count = 1: restore the copy of the MBR (Master Boot Record) saved on a floppy.
CD-ROM
-
cdrecord -v gracetime = 2 dev = / dev / cdrom -eject blank = fast -force: clean or erase a rewritable cd.
-
mkisofs / dev / cdrom> cd.iso: create an iso image of cdrom on disk.
-
mkisofs / dev / cdrom | gzip> cd_iso.gz: create a compressed iso image of cdrom on disk.
-
mkisofs -J -allow-leading-dots -R -V "Label CD" -iso-level 4 -o ./cd.iso data_cd: create an iso image of a directory.
-
cdrecord -v dev = / dev / cdrom cd.iso: burn an iso image.
-
gzip -dc cd_iso.gz | cdrecord dev = / dev / cdrom -: burn a compressed iso image.
-
mount -o loop cd.iso / mnt / iso: mount an iso image.
-
cd-paranoia -B: take songs from a cd to wav files.
-
cd-paranoia - "-3": transfer the first 3 songs from a cd to wav files.
-
Cdrecord –Scanbus: scan bus to identify scsi channel.
-
dd if = / dev / hdc | md5sum: run an md5sum on a device, such as a CD.
I work with the NETWORK ( LAN and Wi-Fi)
-
ifconfig eth0: show the configuration of an Ethernet network card.
-
ifup eth0: activate an interface 'eth0'.
-
ifdown eth0: disable an interface 'eth0'.
-
ifconfig eth0 192.168.1.1 netmask 255.255.255.0: configure an IP address.
-
ifconfig eth0 promisc: configure 'eth0' in common mode to obtain packets (sniffing).
-
dhclient eth0: activate interface 'eth0' in dhcp mode.
-
route: show tour table.
-
route add -net 0/0 gw IP_Gateway: set default input.
-
route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1: configure static route to search the network '192.168.0.0/16'.
-
route 0/0 gw IP_gateway: remove the static route.
-
echo "1"> / proc / sys / net / ipv4 / ip_forward: activate ip tour.
-
hostname: display the hostname of the system.
-
host www.example.com: find the host name to resolve the name to an ip address (1).
-
nslookup www.example.com: find the host name to resolve the name to an ip address and vice versa (2).
-
ip link show: show link status of all interfaces.
-
mii-tool eth0: show link status of 'eth0'.
-
ethtool eth0: show the statistics of network card 'eth0'.
-
netstat-tup- Show all active network connections and their PIDs.
-
netstat-tupl: show all network listeners on the system and their PIDs.
-
tcp dump tcp port 80: show all traffic HTTP.
-
iwlist scan: show wireless networks.
-
iwconfig eth1: show the configuration of a wireless network card.
-
whois www.example.com: search the Whois database.
Microsoft Windows Networks (SAMBA)
-
nbtscan ip_addr: bios network name resolution.
-
nmblookup -A ip_addr: bios network name resolution.
-
smbclient -L ip_addr / hostname: show remote actions of a host in windows.
IP tables (FIREPLACES)
-
iptables -t filter -L: show all strings in the filter table.
-
iptables -t nat -L: show all strings from nat table.
-
iptables -t filter -F: clear all rules from filter table.
-
iptables -t nat -F: clear all rules from nat table.
-
iptables -t filter -X: delete any string created by the user.
-
iptables -t filter -A INPUT -p tcp telnet -j ACCEPT -dport: allow telnet connections to enter.
-
iptables -t filter -A OUTPUT -p tcp -dport http -j DROP: block connections HTTP to go out.
-
iptables -t filter -A FORWARD -p tcp –dport pop3 -j ACCEPT: allow connections POP to a front chain.
-
iptables -t filter -A INPUT -j LOG --log-prefix “DROP INPUT”: registering an input string.
-
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE: configure a PAT (Address Translation Port) on eth0, hiding the force-out packets.
-
iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp -m tcp –dport 22 -j DNAT –to-destination 10.0.0.2:22: redirect packets directed from one host to another.
Monitoring and debugging
-
top: show linux tasks using most cpu.
-
ps-eafw: shows Linux tasks.
-
ps -e -o pid, args –forest- Displays Linux tasks in a hierarchical mode.
-
ptree: show a process system tree.
-
kill -9 Process_ID- Force close a process and terminate it.
-
kill -1 Process_ID: force a process to reload the configuration.
-
lsof -p $$: show a list of files opened by processes.
-
lsof / home / user1: shows a list of open files in a given path of the system.
-
strace -c ls> / dev / null: show the system calls made and received by a process.
-
strace -f -e open ls> / dev / null: show the calls to the library.
-
watch -n1 'cat / proc / interrupts': show interruptions in real time.
-
last reboot: show reboot history.
-
lsmod: show the loaded kernel.
-
free -m- Displays the status of RAM in megabytes.
-
smartctl -A / dev / hda- Monitor the reliability of a hard drive through SMART.
-
smartctl -i / dev / hda: check if SMART is enabled on a hard disk.
-
tail / var / log / dmesg: show events inherent to the kernel loading process.
-
tail / var / log / messages: show system events.
Other useful commands
-
apropos ... keyword: show a list of commands that belong to the keywords of a program; They are useful when you know what your program does, but you do not know the name of the command.
-
manping: show the manual pages online; for example, in a ping command, use the '-k' option to find any related command.
-
whatis… keyword: shows the description of what the program does.
-
mkbootdisk –device / dev / fd0 `uname -r`: create a potable floppy.
-
gpg -c file1: encode a file with GNU security guard.
-
gpg file1.gpg: decode a file with GNU Security Guard.
-
wget -r www.example.com: download a complete website.
-
wget -c www.example.com/file.iso: download a file with the possibility of stopping the download and resuming later.
-
echo 'wget -c www.example.com/files.iso'| at 09:00: Start a download at any time. In this case it would start at 9 o'clock.
-
ldd / usr / bin / ssh: show the shared libraries required by the ssh program.
-
alias hh = 'history': place an alias for a command –hh = History.
-
chsh: change the Shell command.
-
chsh --list-shells: is a suitable command to know if you have to do remote in another terminal.
-
WHO -a: show who is registered, and print time of the last import system, dead processes, system registry processes, active processes produced by init, current operation and last changes of the system clock.
excellent contribution ... thank you ...
Direct to favorites as they say.
Holy God: Or now is what I need to learn 😀 thank you for this contribution 😉
It's definitely a lot of commands.
Nothing is impossible with practice.
Thanks for the contribution 😀
Excellent!
Difficult Linux but the best
Right now I keep them in my huge memory XD
Huge post !! direct to favorites.
Thanks for the contribution, I will send it to a friend who is eager to learn. And I'll also keep it for myself of course.
Wow, direct to favorites, thank you very much.
One of my favorite console programs is ncdu shows the space occupied by each folder, very good when you want to clean the hard disk a bit. I also really like ranger, a very easy to use file manager.
Elav, I have noticed that the numbered lists reset after 9, but this does not happen on the Wiki. Is it intentional, or did you have any difficulty transporting the information?
By the way, I added some more commands to the list and structured the format of the article on the Wiki a bit.
Oops. I hadn't even realized that. Let me check the post's HTML code to see what's up with this. I can't believe WordPress only accepts 9 items in the lists ...
This has me fused. With good reason I had not noticed, because in the WordPress editor, the numbering works well. O_O
Hmm… in that case the problem is apparently one of styles. Let me see…
OK, in the file "themes / arr / css / base.css" look for this line:
.entry-content ul, .entry-content ol { margin: 0 20px; padding: 0 0 1.5em; }
And modify it so that it looks like this:
.entry-content ul, .entry-content ol { margin: 0 20px; padding: 0 0 1.5em 0.5em; }
That should solve the problem (at least for two-digit listings), but obviously I can't give you a guarantee of success.
Thank you, friend. Tomorrow I try that 😀
No need, hopefully it works.
Tomorrow I will be at the Univ until around noon, but if you have any problems write me at gmx.
Well, could you finally take the test?
Not really. Right now I'm going to do it with the Arras that I have local 😀
I just tried and it doesn't work 🙁
You should see my favorite rosetta stone, I can't live without it:
http://cb.vu/unixtoolbox.xhtml
A file at the end with all the commands to download would not be bad, very good post. That speeds up everything 🙂
Thank you, good contribution
Thank you very much, friend, good contribution
Thanks for the input.
Some special reason why you didn't include the "aptitude" command. Very good and practical tips, excellent reference material.
The creator of the original article on the GUTL Wiki probably did not include this command, considering it redundant in relation to apt-get (my deductions, I have not asked). I also prefer aptitude, I find it more useful. Maybe one of these days I will have time to add some examples with aptitude. My favorite is:
aptitude -RvW install paquete
It remains for you to find out what those parameters do, hehe 😉
Thanks for the clarification, I also use aptitude, personally I find it more effective, I was curious about the example you gave, I will surely investigate.
-Wow! I did not think you were serious OO The truth is there are many commands, I add the post to favorites to read it calmly later ...
Elav, if this were Taringa I would not hesitate to leave you my ten points 😀
Excellent post!
Thanks TDE although the credit is not mine, I only brought DesdeLinux the content of the GUTL Wiki. ^^
Impressive, I'll share it wherever I go 🙂
Thank you
awesome post and very very helpful..thanx a lot .. !!!
Thank you. It is an essential material.
Does anyone know the command to close the Gnome Shell session when gnome-session-quit doesn't work?
I don't use Gnome Shell, but try this:
sudo killall gnome-shell
Or maybe this other way:
sudo killall -SIGHUP gnome-shell
logout
remarkable contribution. thanks
Impressive
sudo echo 3> / proc / sys / vm / drop_caches: clear physical memory.
or this one:
sudo sync && sudo sysctl vm.drop_caches = 3: clean up physical memory at runtime.
Very good compilation, with your permission I will copy it to share it on my page with your credit.
Here are 'some' more commands to learn =)
How thick Elav !!! As always, a marvel
THANKS!!
Thank you for stopping by Eugenia 😀
To you 😀
That's so good!!! I'm going to print it and take it with me. Thanks for the input.
A pleasure to help 🙂
Very good!
I like it, the article is so interesting, thank you very much
EXCELLENT, thanks for posting it!
Thank you!
Great thank you very much!
Excellent contribution!
Thank you very much.
Great, thank you very much, another one more to favorites ...
It is the best summary that I have seen of linux commands, Congratulations that excellent contribution!
Dear Elav,
We have taken your article to create an article in our knowledge base, in which of course we have cited you as a source.
You can review the article at the following link:
https://siliconhosting.com/kb/questions/241/
A great contribution, thank you very much.
As long as there is a link to the original article, you can do whatever you want with it. Thanks for notifying. 😉
Of course Elav, you can check the link at the end of the article.
If you wish to take any of our articles, you are completely free to review, reproduce all or part of them.
Thank you again.
Yes, I already checked it and by the way I was seeing a little about the services they offer, because I did not know them .. Thank you for giving me your articles, which I also reviewed and are quite interesting 😉
regards
Many thanks! I'm going to print them in case one day I don't have internet!
Thanks and Salu2
Impressive post, yes sir. And a question, do you know of a book, tutorial or something to learn to use the terminal? I've been using Linux since Ubuntu 9.04 but I know the basics, I'd like to learn more about it. Thanks and best regards.
Awesome!!!!!
Is there a way to get that in text format (word, txt, PDF)?
Thanks for the input.
Wow thanks for the contribution menu 🙂
The linux world fascinates me, this material is gold, greetings from Tijuana Mx.
right now I am re-installing my Linux mint 14, when I re-installed xp the option to choose system before starting was deleted,,,,, greetings again
We thank you for the compilation very good post ...
regards
Excellent information
Thanks to the editor, this could be converted to pdf. It is for printing. Thank you community.
Tremendous contribution, Thank you.
The page is excellent, by far one of the best on the subject.
Thank you very much for stopping by.
regards
I want to find the file that occupies the most space
Raffled the contribution ...
I would like to be able to list the files of each user, and that the one I did only shows me the number of folders and not the ones inside
woowww grandeee .. thanksss !!!
someone who can answer me the definition of this command rpm -Uvh?
How can I use it
Big ELAV …… !!! I had not seen this post ... thank you very much ..
It seems to me a good compilation, I will have it at hand.
Thanks for the input
I congratulate you, excellent information, very useful.
Definitely grax ya favorites goes
Excellent contribution. I was impressed by the effort and the compilation that GTL has made, as well as the presentation and accommodation among others of ELAV.
I copy them and use them in brebe, to learn a little more.
Thank you both for your contribution to the Linux community and your generosity.
A greeting.
Grosso!
Excellent, excellent, thank you very much.
man what a good post I use it every day since I am starting with this, I thank you for sharing it with us.
I like it a lot but it is a bit difficult for me to learn I do not know anything about Linux I am starting a course in the academy of free software well I hope to learn and thank you for your contributions to this community.
Hello, everything is very complete, but I can't find how to repair the system startup.
I use Fedora and after enabling the Gnome desktop it doesn't start unless I enter and type BOOT at the beginning.
I would like the system to automatically enter the Gnome desktop without my intervention.
Any command to use or file to edit ??
Thank you so much!!
Thank excellent contribution
Very good information, very useful…. 🙂
very good information and very detailed thanks
Thanks I did my homework XD
Thank you just or what was I looking for 😀
I'm reading a book from windows to linux and I'm spending little time xD
I hope I can dominate this world 😛
Direct to favorites, evernote, notes, onenote, print, etc etc so that they are always at hand. Thanks a lot!!
Thanks for the input
There is a broken link, at least a 404 error appears via smartphone where you link to "this excellent article"
It's very good!
thanks!
Frankly very good, thank you very much.
Very good blogger contribution direct to favorites
YOU!
Great contribution. Thanks 😀
Excellent! I'll give you 10 points! 😀
Very good post I really like
I imagine the time that would have saved me if I had seen this article a few years ago it is very good, thank you very much
And the command poweroff?
I used it when I started to get to know Linux (using Slax on a USB), for when the environment would freeze and I didn't open any menu or button, then I would turn it off with this command.
Wonderful !! This page has already gotten me out of several troubles. Very good work.
spectacular. Don't you have it in a PDF file or something similar to download it? you don't have the VI editor commands?
Very good list, thanks for the contribution. I share one that I found out there some time ago.
http://ss64.com/
Regards!
ar
Very good blog, I was looking for it. Thank you
Excellent!!! your contribution to free-software is very good
thank you it was very helpful
Thanks for sharing, excellent IT input
Really very useful, especially for Linux newbies and old timers. thanks
Excellent contribution
Very good. I just need to try some ribs
thank you!
Thank you!
a question as it is called in windows in what system administrator is used as and another
the commands also work for windows ?? thanksss.
1-the windows command box is opened by putting «cmd» in the search engine at the beginning
2- These commands, most of them do not work for windows, there are some that coincide like those of «cd» but I advise you to look for another blog where they speak specifically of commands for windows
[CTRL + D]
Tremendous contribution… thank you… !!! saved ...
Thanks for sharing bookmarking the blog to get in touch for more articles
thanks for the input
Friend, thanks for this tremendous contribution, very good contribution, and thank you for sharing it.
Everything is very interesting, it's time to practice ..
-h This help text.
–No-gui Do not use the GTK interface even though it is available.
-s Simulates the actions, but does not actually perform them.
-d Only downloads packages, does not install or uninstall anything.
-p Always ask for confirmation of actions.
-y Assumes that the answer to simple yes / no questions is 'yes'.
-F format Specifies the format for displaying the results of the
searches, read the manual.
-O order Specifies how the search results should be ordered,
read the manual.
-w width Specifies the width of the viewer to format the results
of the search.
-f Aggressively tries to fix broken packages.
-V Shows the version of the packages to install.
-D Show dependencies for automatically changed packages.
-Z Displays the change of the installed size of each package.
-v Show extra information (can occur more than once).
-t [distrib] Sets the distribution from which packages are installed.
-q Does not show incremental progress indicators
in command line mode.
-o opconf = val Directly set the configuration option named "opconf".
–With (out) -recommends, Specifies whether or not the
recommendations like strong dependencies.
-S fname: reads aptitude extended status information from fname.
-u: Download a new package list on boot.
(terminal interface only)
-i: Performs an installation on boot.
(terminal interface only)
Wow, thanks for the contribution, it will really be very useful. Now my problem will be to learn how to use them, xD thanks.
Excellent compilation.
Thanks friend, tremendous contribution! 😀 😀
What is the which command for?
It's like a #locate
# man which
Well friend, thank you very much, it is very helpful for those of us who work in this environment
regards
This is exactly what I am looking for 3 days ago!
Thank you very much, this is priceless 😀
good contribution, very useful
Every time I forget commands, I return to this article.
All the best
Thank you very much.
The manual has been of great use
Caracas Venezuela
very well explained each command, it is a very good reference if you are a system administrator based on unix
thanks I know I'm going to need you
Very helpful thanks
Greetings, excellent blog, thank you very much for that contribution to the GNU / linux community. Cordially Martial.
The tremendous contribution is appreciated
thank you very much
greetings from Chile
alex
very good compilation of commands, quite useful.
Thank you for this excellent contribution.
great thanks for the contribution but I imagine there are millions of command or not
Congratulations!
3 years later it is still a great contribution for the benefit of all!
Thank you.
Thank you very much, it is a great help for my learning.
I loved them! This post is great 😀
Excellent, very good
complete guide thanks for sharing
Hello friends, I am a newbie, the question I want to ask you is if Debian and Ubuntu are fully compatible, what I want to imply if I have been with Ubuntu for 1 year and now I want to switch to Debian, I can do the same procedures in installing dependencies configuration etc., so how is it done in ubuntu is done in debian in the same way ????????… help thanks.
Hi. I have a question when I put cd .. it doesn't work for me, it tells me that it has not found that command, the same thing happens to me when I put tree. Is there someone who can help me, thank you
You have to put the cd command separated from the .. with a space, such that cd ..
The tree command may not be installed in your shell, you can check the commands that you have installed in your shell in the / bin folder
You have to put the cd command separated from the .. with a space, such that cd ..
The tree command may not be installed in your shell, you can check the commands that you have installed in your shell in the / bin folder
Hello, I wanted to know if you authorize me to put this post on my website, for the record that in the said post I will put the source of it
Very good page!
Thank you very much.
Excellent information!!
Can you help me as I install the video drivers AMD / ATI TRINITY RADEON HD7660D I have installed Fedora 24
Thank you
A marvel this post. Indispensable for those of us who are learning, THANK YOU !!!
You are great!!
thanks guys =)
Thank you! Finally a key summary to have as a header.
I have seen many Linuxero throughout my life, but never anything more complete and well organized.
I drag him to the lands of the Chameleon (Forosuse.org), and I thank you on behalf of the Forum and in my person for such magnificent work.
Have a lot of Fun !!
Hello,
Can the article be copied to a text file?
Very kind, thank you,
Tomeu.
Select it with the mouse, then Ctrl-V at the same time, open a word file, press the right mouse button, in the context menu, select the icon with the letter A (only plain text).
Has any of this changed for current versions like Kali 2016.2 or Ubuntu 16? Esq I'm just learning and I tried some commands and directories that after spending days looking for it turned out that they no longer exist or they were moved as the versions pass, and here are courses or pdf that I find are from 2012 2010 a course that is called lpic1 I think that It is about all that and it is outdated, I hope this helps me, regards
you should sign up for LPIC1 and study since the current is valid and touch and read about systemd since you start very late
Friends of the blog, I would like you to help me with a problem that I have quite strong, they hacked my server and changed my root user and I can no longer have access to anything, they took away privileges from everything, some of you will have a solution that can help me with this topic? I would greatly appreciate it.
very good
Buenisimo
Excellent post, great compilation of commands, in truth most are important in the world of work. Thank you!!!
excellent contribution friend thanks for your dedication
Very good work, thanks.
Thank you for bothering to make this contribution.
Thank you very much Elav, I already copied it into a text file to have it handy when you need to consult.
Excellent contribution !!!!
Thanks to the team DesdeLinux for the contribution and also to those of GUTL there in Cuba, from time to time visit their page, it is very good, I say it from experience: gutl.jovenclub.cu
Friend, your contribution is wonderful, thank you, thanks to you, quantum mechanics and particle physics, it is easier to program it… good afternoon….
incredible list of commands, a good season is coming fiddling with linux! I will gain more experience, I love Linux more and more, having control is the best, thanks for the article, I'll tell you how it goes, I hope it's great.
Congratulations and thank you very much for this contribution, your commands and those of the user who mentions the «rosetta stone» are fantastic! Thanks guys, chapó.
excellent contribution. but my memory is volatile to store all those commands
Hello I am from Lima - Ate Vitarte I would like to learn in some classes how to learn to know from scratch Something about Linux, Parrot, fluxion from my NETBOOK and that they advise and help to RECOGNIZE and SEE the Users and passwords around me.
Hi, great article. Very complete.
I wanted to make a point in the fourth command in the Files and Directories section (cd: go to the root directory). This command as is, without arguments, actually takes us to our home directory. To the home of our user, not to the root directory (/).
Greetings and congratulations for the article because it is very good. 😉
Oh my goodness! I think it is the best contribution of all. The VALLIN is saved this year !!
THANK YOU¡¡¡¡¡¡¡ ♥♥ for a little and I get lost for there jjajjjaja
wao, I only knew a few, but thanks to this page, I have learned many more codes for linux. I also have my blog, I leave you. a greeting https://tapicerodemadrid.com/
Excellent contribution!
I just needed a linux tutorial.
Web:https://baquetasteson.com/